]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/float64-array-nan.js
7 function isBigEndian() {
8 var word
= new Int16Array(1);
10 var bytes
= new Int8Array(word
.buffer
);
14 function test(a
, b
, x
) {
15 var intArray
= new Int32Array(2);
18 var floatArray
= new Float64Array(intArray
.buffer
);
19 var element
= foo(floatArray
);
20 var result
= element
+ 1;
21 if (("" + result
) != ("" + x
))
22 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);