diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/parallel/Array-reducePar-mul-short.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/parallel/Array-reducePar-mul-short.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,16 @@ +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 some double value. + + function mul(v, p) { return v*p; } + + // Ensure that the array only contains values between 1 and 4. + var array = range(1, 513).map(function(v) { return (v % 4) + 1; }); + assertArraySeqParResultsEq(array, "reduce", mul, assertAlmostEq); +} + +if (getBuildConfiguration().parallelJS) + testReduce();