Sign in
cobalt
/
cobalt
/
71840339e1109efe930df5c60712d91cdcc962a8
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
collections
/
Map-constructor-4.js
blob: 22c2c416be4b27ec5cbcc28055f516874e4d078b [
file
] [
log
] [
blame
]
// new Map(x) throws if x is not iterable (unless x is undefined).
load
(
libdir
+
"asserts.js"
);
var
nonIterables
=
[
true
,
1
,
-
0
,
3.14
,
NaN
,
{},
Math
,
this
];
for
(
let k of nonIterables
)
assertThrowsInstanceOf
(
function
()
{
new
Map
(
k
);
},
TypeError
);