blob: cdf0933d4b267b4384e7417b74cc2140b88ea016 [file] [log] [blame]
Test Math.imul behaviour
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS Math.imul(1, 0.5) is 0
PASS Math.imul(1, -0.5) is 0
PASS Math.imul(2, 1<<30) is -2147483648
PASS Math.imul(4, 1<<30) is 0
PASS Math.imul(1, NaN) is 0
PASS Math.imul(1, Infinity) is 0
PASS Math.imul({valueOf:function(){throw 'left'}},{valueOf:function(){throw 'right'}}) threw exception left.
PASS Math.imul(0.5, 1) is 0
PASS Math.imul(-0.5, 1) is 0
PASS Math.imul(1<<30, 2) is -2147483648
PASS Math.imul(1<<30, 4) is 0
PASS Math.imul(NaN, 1) is 0
PASS Math.imul(Infinity, 1) is 0
PASS Math.imul(NaN, NaN) is 0
PASS Math.imul(Infinity, Infinity) is 0
PASS Math.imul(Infinity, -Infinity) is 0
PASS Math.imul(-Infinity, Infinity) is 0
PASS Math.imul(-Infinity, -Infinity) is 0
PASS Math.imul(0xffffffff, 5) is -5
PASS testIMul(2,2,10000) is 40000
PASS testIMul(2.5,2,10000) is 40000
PASS testIMul(2,2.5,10000) is 40000
PASS testIMul(2.5,2.5,10000) is 40000
PASS testIMul(2.5,2.5,10000) is 40000
PASS testIMul(-2,-2,10000) is 40000
PASS testIMul(-2.5,-2,10000) is 40000
PASS testIMul(-2,-2.5,10000) is 40000
PASS testIMul(-2.5,-2.5,10000) is 40000
PASS testIMul(-2.5,-2.5,10000) is 40000
PASS testIMul(-2,2,10000) is -40000
PASS testIMul(-2.5,2,10000) is -40000
PASS testIMul(-2,2.5,10000) is -40000
PASS testIMul(-2.5,2.5,10000) is -40000
PASS testIMul(-2.5,2.5,10000) is -40000
PASS testIMul(2,-2,10000) is -40000
PASS testIMul(2.5,-2,10000) is -40000
PASS testIMul(2,-2.5,10000) is -40000
PASS testIMul(2.5,-2.5,10000) is -40000
PASS testIMul(2.5,-2.5,10000) is -40000
PASS testIMul(NaN, 1, 10000) is 0
PASS testIMul(Infinity, 1, 10000) is 0
PASS testIMul(1e40, 1, 10000) is 0
PASS testIMul(1, NaN, 10000) is 0
PASS testIMul(1, Infinity, 10000) is 0
PASS testIMul(1, 1e40, 10000) is 0
PASS successfullyParsed is true
TEST COMPLETE