blob: c61191ee5575bc1693407e585cea778ccd4d6be9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
/* Test inlining of Number.isFinite() */
for (var i = 0; i < 200000; i++) {
assertEq(Number.isFinite(NaN), false);
assertEq(Number.isFinite(-NaN), false);
assertEq(Number.isFinite(+Infinity), false);
assertEq(Number.isFinite(-Infinity), false);
assertEq(Number.isFinite(3), true);
assertEq(Number.isFinite(3.141592654), true);
assertEq(Number.isFinite(+0), true);
assertEq(Number.isFinite(-0), true);
assertEq(Number.isFinite(-3), true);
assertEq(Number.isFinite(-3.141592654), true);
assertEq(Number.isFinite({}), false);
}
|