blob: f26dc07605f1af015441ccbb74008a19d562633f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// NaN is equal to itself for the purpose of key lookups.
var m = new Map;
m.set(NaN, "ok");
assertEq(m.has(NaN), true);
assertEq(m.get(NaN), "ok");
assertEq(m.delete(NaN), true);
assertEq(m.has(NaN), false);
assertEq(m.get(NaN), undefined);
var s = new Set;
s.add(NaN);
assertEq(s.has(NaN), true);
assertEq(s.delete(NaN), true);
assertEq(s.has(NaN), false);
|