summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/ThrowTypeError/throws-type-error.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/ThrowTypeError/throws-type-error.js')
-rw-r--r--js/src/tests/test262/built-ins/ThrowTypeError/throws-type-error.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/ThrowTypeError/throws-type-error.js b/js/src/tests/test262/built-ins/ThrowTypeError/throws-type-error.js
new file mode 100644
index 0000000000..f7cad44306
--- /dev/null
+++ b/js/src/tests/test262/built-ins/ThrowTypeError/throws-type-error.js
@@ -0,0 +1,25 @@
+// Copyright (C) 2016 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-%throwtypeerror%
+description: >
+ %ThrowTypeError% throws a TypeError when called.
+info: |
+ %ThrowTypeError% ( )
+
+ When %ThrowTypeError% is called it performs the following steps:
+
+ 1. Throw a TypeError exception.
+---*/
+
+var ThrowTypeError = Object.getOwnPropertyDescriptor(function() {
+ "use strict";
+ return arguments;
+}(), "callee").get;
+
+assert.throws(TypeError, function() {
+ ThrowTypeError();
+});
+
+reportCompare(0, 0);