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