diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/parallel/Array-reducePar-mul.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/parallel/Array-reducePar-mul.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,15 @@ +load(libdir + "parallelarray-helpers.js"); + +function testReduce() { + // This test is interesting because during warmup v*p remains an + // integer but this ceases to be true once real execution proceeds. + // By the end, it will just be infinity. Note that this is a case + // where the non-commutative of floating point becomes relevant, + // so we must use assertAlmostEq. + function mul(v, p) { return v*p; } + var array = range(1, 513); + assertArraySeqParResultsEq(array, "reduce", mul, assertAlmostEq); +} + +if (getBuildConfiguration().parallelJS) + testReduce();