Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review: https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1
2 // check correctness of truncation of doubles slightly outside the int32_t range.
3
4 function truncate(x) {
5 return x | 0;
6 }
7
8 assertEq(truncate(0xffffffff), -1);
9 assertEq(truncate(0xffffffff + 5000.5), 4999);
10 assertEq(truncate(-0xffffffff - 5000.5), -4999);