Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/WeakSet/undefined-newtarget.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 23.4.1.1
5 esid: sec-weakset-iterable
6 description: >
7 The WeakSet constructor is the %WeakSet% intrinsic object and the initial
8 value of the WeakSet property of the global object.
9 info: |
10 23.4.1.1 WeakSet ( [ iterable ] )
11
12 1. If NewTarget is undefined, throw a TypeError exception.
13 ---*/
14
15 assert.throws(TypeError, function() {
16 WeakSet();
17 });
18
19 assert.throws(TypeError, function() {
20 WeakSet([]);
21 });