diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js index 257325e49..643f4ee4a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-33.js @@ -9,25 +9,24 @@ description: > getter terminate iteration on an Array ---*/ -var accessed = false; + var accessed = false; + function callbackfn(prevVal, curVal, idx, obj) { + if (idx <= 1) { + accessed = true; + } + } -function callbackfn(prevVal, curVal, idx, obj) { - if (idx <= 1) { - accessed = true; - } -} + var arr = [0, , 2]; -var arr = [0, , 2]; - -Object.defineProperty(arr, "1", { - get: function() { - throw new Test262Error("unhandle exception happened in getter"); - }, - configurable: true -}); + Object.defineProperty(arr, "1", { + get: function () { + throw new Test262Error("unhandle exception happened in getter"); + }, + configurable: true + }); assert.throws(Test262Error, function() { - arr.reduceRight(callbackfn, "initialValue"); + arr.reduceRight(callbackfn, "initialValue"); }); assert.sameValue(accessed, false, 'accessed'); |