blob: 8ffb23838ffd5e75de17fcb857b75f8dab53ae94 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* Test compiling JSOP_STRICTEQ on known doubles. */
function foo(x) {
return x === x;
}
for (var i = 0; i < 20; i++) {
assertEq(foo(1.2), true);
assertEq(foo(NaN), false);
}
function bar(x) {
if (x === x)
return true;
return false;
}
for (var i = 0; i < 20; i++) {
assertEq(bar(1.2), true);
assertEq(bar(NaN), false);
}
|