diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js index f81ce7b4c..3a209ff40 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js @@ -9,22 +9,28 @@ description: > containing a negative number ---*/ - var testResult1 = true; - var testResult2 = false; - function callbackfn(prevVal, curVal, idx, obj) { - if (idx > 1) { - testResult1 = false; - } +var testResult1 = true; +var testResult2 = false; - if (idx === 1) { - testResult2 = true; - } - return false; - } +function callbackfn(prevVal, curVal, idx, obj) { + if (idx > 1) { + testResult1 = false; + } - var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; + if (idx === 1) { + testResult2 = true; + } + return false; +} - Array.prototype.reduceRight.call(obj, callbackfn, 1); +var obj = { + 0: 11, + 1: 12, + 2: 9, + length: "-4294967294" +}; + +Array.prototype.reduceRight.call(obj, callbackfn, 1); assert(testResult1, 'testResult1 !== true'); assert.sameValue(testResult2, false, 'testResult2'); |