Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
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);