diff options
Diffstat (limited to 'test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js')
-rw-r--r-- | test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js index 34b6ca18d..08ef5140b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js @@ -10,33 +10,33 @@ description: > property ---*/ -function callbackfn(prevVal, curVal, idx, obj) { - return (obj.length === 2); -} - -var proto = {}; - -Object.defineProperty(proto, "length", { - get: function() { - return 3; - }, - configurable: true -}); - -var Con = function() {}; -Con.prototype = proto; - -var child = new Con(); - -Object.defineProperty(child, "length", { - get: function() { - return 2; - }, - configurable: true -}); - -child[0] = 12; -child[1] = 11; -child[2] = 9; + function callbackfn(prevVal, curVal, idx, obj) { + return (obj.length === 2); + } + + var proto = {}; + + Object.defineProperty(proto, "length", { + get: function () { + return 3; + }, + configurable: true + }); + + var Con = function () { }; + Con.prototype = proto; + + var child = new Con(); + + Object.defineProperty(child, "length", { + get: function () { + return 2; + }, + configurable: true + }); + + child[0] = 12; + child[1] = 11; + child[2] = 9; assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); |