michael@0: if (getBuildConfiguration().parallelJS) { michael@0: function assertParallelExecSucceeds(opFunction) { michael@0: for (var i = 0; i < 100; ++i) { michael@0: opFunction({mode:"compile"}); michael@0: } michael@0: } michael@0: function assertArraySeqParResultsEq(arr, op, func) { michael@0: assertParallelExecSucceeds( michael@0: function (m) { michael@0: return arr[op + "Par"].apply(arr, [func, m]); michael@0: } michael@0: ); michael@0: } michael@0: function range(n, m) { michael@0: var result = []; michael@0: for (var i = n; i < m; i++) michael@0: result.push(i); michael@0: return result; michael@0: } michael@0: assertArraySeqParResultsEq(range(0, 512), "map", function(e) { return e+'x'; }); michael@0: }