diff options
Diffstat (limited to 'test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js')
-rw-r--r-- | test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js index 5fe12afb7..9d9cc00c1 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-31.js @@ -9,23 +9,24 @@ description: > terminate iteration on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 0) { - accessed = true; - } - return true; - } +var accessed = false; - var arr = []; - arr[10] = 100; - Object.defineProperty(arr, "0", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + if (idx > 0) { + accessed = true; + } + return true; +} + +var arr = []; +arr[10] = 100; +Object.defineProperty(arr, "0", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.some(callbackfn); + arr.some(callbackfn); }); assert.sameValue(accessed, false, 'accessed'); |