summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Object/assign/invoked-as-ctor.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Object/assign/invoked-as-ctor.js')
-rw-r--r--js/src/tests/test262/built-ins/Object/assign/invoked-as-ctor.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Object/assign/invoked-as-ctor.js b/js/src/tests/test262/built-ins/Object/assign/invoked-as-ctor.js
new file mode 100644
index 0000000000..e60b4ff645
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Object/assign/invoked-as-ctor.js
@@ -0,0 +1,18 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es6id: 19.1.2.1
+description: Invoked as a constructor
+info: |
+ ES6 Section 9.3:
+
+ Built-in function objects that are not identified as constructors do not
+ implement the [[Construct]] internal method unless otherwise specified in
+ the description of a particular function.
+---*/
+
+assert.throws(TypeError, function() {
+ new Object.assign({});
+});
+
+reportCompare(0, 0);