Sign in
webkit
/
WebKit
/
51972bd7547e172b0df1f6839bf46f5093904ce3
/
.
/
JSTests
/
es6
/
Map_-0_key_converts_to_+0.js
blob: 9ad40670b22778891166621637320ffc9e179a02 [
file
] [
log
] [
blame
]
function
test
()
{
var
map
=
new
Map
();
map
.
set
(-
0
,
"foo"
);
var
k
;
map
.
forEach
(
function
(
value
,
key
)
{
k
=
1
/
key
;
});
return
k
===
Infinity
&&
map
.
get
(+
0
)
==
"foo"
;
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);