diff options
Diffstat (limited to 'test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js')
-rw-r--r-- | test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js index bbd62f9dc..f0c2c4a15 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js @@ -10,28 +10,30 @@ description: > Array-like object ---*/ - var kValue = "abc"; - - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === kValue; - } - return false; - } - - var proto = { 1: 6 }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "1", { - get: function () { - return kValue; - }, - configurable: true - }); +var kValue = "abc"; + +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === kValue; + } + return false; +} + +var proto = { + 1: 6 +}; + +var Con = function() {}; +Con.prototype = proto; + +var child = new Con(); +child.length = 10; + +Object.defineProperty(child, "1", { + get: function() { + return kValue; + }, + configurable: true +}); assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); |