Sign in
webkit
/
WebKit
/
6756d1c4625eeb8d03076cb127515d00fa7c2e16
/
.
/
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"
);