summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Class/defaultConstructorNotCallable.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/ecma_6/Class/defaultConstructorNotCallable.js')
-rw-r--r--js/src/tests/ecma_6/Class/defaultConstructorNotCallable.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/Class/defaultConstructorNotCallable.js b/js/src/tests/ecma_6/Class/defaultConstructorNotCallable.js
new file mode 100644
index 000000000..558f8dcc2
--- /dev/null
+++ b/js/src/tests/ecma_6/Class/defaultConstructorNotCallable.js
@@ -0,0 +1,8 @@
+class badBase {}
+assertThrowsInstanceOf(badBase, TypeError);
+
+class badSub extends (class {}) {}
+assertThrowsInstanceOf(badSub, TypeError);
+
+if (typeof reportCompare === 'function')
+ reportCompare(0,0,"OK");