Debian Codegraph @

js/src/tests/test262/built-ins/WeakMap/iterable-failure.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 esid: sec-weakmap-iterable
5 description: >
6 If the iterable argument is undefined, return new WeakMap object.
7 info: |
8 23.3.1.1 WeakMap ( [ iterable ] )
9
10 ...
11 7. Else,
12 d. Let iter be GetIterator(iterable).
13 e. ReturnIfAbrupt(iter).
14 ...
15 ---*/
16
17 assert.throws(TypeError, function() {
18 new WeakMap({});
19 });
20
21 reportCompare(0, 0);