]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/float64-array-nan-inlined.js
5 function isBigEndian() {
6 var word
= new Int16Array(1);
8 var bytes
= new Int8Array(word
.buffer
);
12 function test(a
, b
, x
) {
13 var intArray
= new Int32Array(2);
16 var floatArray
= new Float64Array(intArray
.buffer
);
17 var element
= foo(floatArray
);
18 var result
= element
+ 1;
19 if (("" + result
) != ("" + x
))
20 throw "Error: bad result for " + a
+ ", " + b
+ ": " + result
+ ", but expected: " + x
+ "; loaded " + element
+ " from the array";
25 for (var i
= 0; i
< 100000; ++i
)
29 test(0xFFFF0000, 0, 0/0);
30 test(0, 0xFFFF0000, 1);
32 test(0xFFFF0000, 0, 1);
33 test(0, 0xFFFF0000, 0/0);