Sign in
webkit
/
WebKit
/
3480786af6abe0fbd0f86124e6c6350c8ceacd89
/
.
/
JSTests
/
es6
/
Set_-0_key_converts_to_+0.js
blob: 318c4a3d12aba9db168d172468599dd6e2802780 [
file
] [
log
] [
blame
]
function
test
()
{
var
set
=
new
Set
();
set
.
add
(-
0
);
var
k
;
set
.
forEach
(
function
(
value
)
{
k
=
1
/
value
;
});
return
k
===
Infinity
&&
set
.
has
(+
0
);
}
if
(!
test
())
throw
new
Error
(
"Test failed"
);