diff options
Diffstat (limited to 'test/built-ins/Array/prototype/every')
194 files changed, 1892 insertions, 1636 deletions
diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js index 32c5b4f6a..0d88f961e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js @@ -8,6 +8,7 @@ description: Array.prototype.every applied to Boolean object ---*/ var accessed = false; + function callbackfn(val, idx, obj) { accessed = true; return obj instanceof Boolean; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-5.js index 91827adfc..7bd133c74 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-5.js @@ -8,6 +8,7 @@ description: Array.prototype.every applied to number primitive ---*/ var accessed = false; + function callbackfn(val, idx, obj) { accessed = true; return obj instanceof Number; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js index 09439db09..255a5afc2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js @@ -8,6 +8,7 @@ description: Array.prototype.every applied to Number object ---*/ var accessed = false; + function callbackfn(val, idx, obj) { accessed = true; return obj instanceof Number; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js index f33885b89..bf6992cf1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js @@ -11,7 +11,7 @@ function callbackfn(val, idx, obj) { return !(obj instanceof Function); } -var obj = function (a, b) { +var obj = function(a, b) { return a + b; }; obj[0] = 11; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js index 88dc9700a..c895c286c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js @@ -17,16 +17,16 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { }; +var proto = {}; Object.defineProperty(proto, "length", { - get: function () { - return 2; + get: function() { + return 2; }, configurable: true }); -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js index 135cc936d..9f2497b6a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js @@ -21,7 +21,7 @@ var obj = { 1: 8 }; Object.defineProperty(obj, "length", { - set: function () { }, + set: function() {}, configurable: true }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-12.js index 2f71539f4..4cc13deab 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-12.js @@ -17,16 +17,19 @@ function callbackfn(val, idx, obj) { } Object.defineProperty(Object.prototype, "length", { - get: function () { - return 2; - }, - configurable: true + get: function() { + return 2; + }, + configurable: true }); -var obj = { 0: 9, 1: 8 }; +var obj = { + 0: 9, + 1: 8 +}; Object.defineProperty(obj, "length", { - set: function () { }, - configurable: true + set: function() {}, + configurable: true }); assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js index 07dc5015e..0c03deb22 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js @@ -12,17 +12,17 @@ description: > var accessed = false; function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; + accessed = true; + return val > 10; } var proto = {}; Object.defineProperty(proto, "length", { - set: function () { }, - configurable: true + set: function() {}, + configurable: true }); -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js index f88589524..eb91b3e56 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js @@ -16,7 +16,10 @@ function callbackfn(val, idx, obj) { return val > 10; } -var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js index bf6fcd0c8..7d4e3200c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js @@ -17,10 +17,10 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var func = function (a, b) { +var func = function(a, b) { arguments[2] = 9; return Array.prototype.every.call(arguments, callbackfn1) && - !Array.prototype.every.call(arguments, callbackfn2); + !Array.prototype.every.call(arguments, callbackfn2); }; assert(func(12, 11), 'func(12, 11) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js index 89977f222..c7c951235 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js @@ -17,7 +17,7 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var fun = function (a, b) { +var fun = function(a, b) { return a + b; }; fun[0] = 12; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js index 57c559260..203eaee8a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js @@ -17,9 +17,11 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { length: 3 }; +var proto = { + length: 3 +}; -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-4.js index c071a8875..cebdab087 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-4.js @@ -10,6 +10,7 @@ description: > ---*/ var arrProtoLen = 0; + function callbackfn1(val, idx, obj) { return val > 10; } diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js index 6cd638bdb..1f4ffc7a8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js @@ -17,16 +17,16 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { }; +var proto = {}; Object.defineProperty(proto, "length", { - get: function () { - return 3; + get: function() { + return 3; }, configurable: true }); -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js index b464e4151..264d43dd2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js @@ -17,9 +17,11 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { length: 2 }; +var proto = { + length: 2 +}; -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js index bcc252a2b..9e29cd715 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js @@ -17,11 +17,11 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { }; +var obj = {}; Object.defineProperty(obj, "length", { - get: function () { - return 2; + get: function() { + return 2; }, configurable: true }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js index 298e148b0..d3a3e96ab 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js @@ -17,16 +17,18 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var proto = { length: 3 }; +var proto = { + length: 3 +}; -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); Object.defineProperty(child, "length", { - get: function () { - return 2; + get: function() { + return 2; }, configurable: true }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js index 48387126b..4dd430d1b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js @@ -20,20 +20,20 @@ function callbackfn2(val, idx, obj) { var proto = {}; Object.defineProperty(proto, "length", { - get: function () { - return 3; + get: function() { + return 3; }, configurable: true }); -var Con = function () { }; +var Con = function() {}; Con.prototype = proto; var child = new Con(); Object.defineProperty(child, "length", { - get: function () { - return 2; + get: function() { + return 2; }, configurable: true }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js index b745f20c1..a72ca6863 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js @@ -14,7 +14,10 @@ function callbackfn(val, idx, obj) { return val > 10; } -var obj = { 0: 9, length: undefined }; +var obj = { + 0: 9, + length: undefined +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js index c8029d4a0..b381ef7d2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js @@ -16,7 +16,10 @@ function callbackfn(val, idx, obj) { return val > 10; } -var obj = { 0: 9, length: NaN }; +var obj = { + 0: 9, + length: NaN +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js index 9b27d025a..ab5fa5744 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "2" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js index 0c2a3f97e..bdf1ee93e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; +var obj = { + 0: 11, + 1: 12, + 2: 9, + length: "-4294967294" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js index 0043f34ee..23c734251 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "2.5" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js index 1d99f1e2e..c20b8194a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js @@ -10,13 +10,22 @@ description: Array.prototype.every - 'length' is a string containing +/-Infinity var accessed = false; function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; + accessed = true; + return val > 10; } -var objOne = { 0: 9, length: "Infinity" }; -var objTwo = { 0: 9, length: "+Infinity" }; -var objThree = { 0: 9, length: "-Infinity" }; +var objOne = { + 0: 9, + length: "Infinity" +}; +var objTwo = { + 0: 9, + length: "+Infinity" +}; +var objThree = { + 0: 9, + length: "-Infinity" +}; assert.sameValue(Array.prototype.every.call(objOne, callbackfn), false, 'Array.prototype.every.call(objOne, callbackfn)'); assert.sameValue(Array.prototype.every.call(objTwo, callbackfn), false, 'Array.prototype.every.call(objTwo, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js index dcdda5fae..63ceb586e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "2E0" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js index 4e7f6f97c..ea0e8386c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "0x0002" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js index eb35d70b1..0125b2b77 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js @@ -17,7 +17,12 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: "0002.00" +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js index 96846f106..c06bc6c27 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js @@ -16,7 +16,11 @@ function callbackfn(val, idx, obj) { return val > 10; } -var obj = { 0: 9, 1: 8, length: "two" }; +var obj = { + 0: 9, + 1: 8, + length: "two" +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js index 15d3f5af9..a2bc1211f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js @@ -10,25 +10,25 @@ description: > ---*/ function callbackfn1(val, idx, obj) { - return val > 10; + return val > 10; } function callbackfn2(val, idx, obj) { - return val > 11; + return val > 11; } var toStringAccessed = false; var obj = { - 0: 12, - 1: 11, - 2: 9, + 0: 12, + 1: 11, + 2: 9, - length: { - toString: function () { - toStringAccessed = true; - return '2'; - } + length: { + toString: function() { + toStringAccessed = true; + return '2'; } + } }; // objects inherit the default valueOf() method from Object diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js index bb2431acb..fb8444d54 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js @@ -17,7 +17,11 @@ function callbackfn2(val, idx, obj) { return val > 11; } -var obj = { 0: 11, 1: 9, length: true }; +var obj = { + 0: 11, + 1: 9, + length: true +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js index 4f12b7bd7..a642c0ad1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js @@ -24,10 +24,10 @@ var obj = { 1: 11, 2: 9, length: { - valueOf: function () { - valueOfAccessed = true; - return 2; - } + valueOf: function() { + valueOfAccessed = true; + return 2; + } } }; diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js index cc8359790..7f57fb9f2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js @@ -11,30 +11,30 @@ description: > ---*/ function callbackfn1(val, idx, obj) { - return val > 10; + return val > 10; } function callbackfn2(val, idx, obj) { - return val > 11; + return val > 11; } var toStringAccessed = false; var valueOfAccessed = false; var obj = { - 0: 12, - 1: 11, - 2: 9, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return '2'; - } + 0: 12, + 1: 11, + 2: 9, + length: { + valueOf: function() { + valueOfAccessed = true; + return {}; + }, + toString: function() { + toStringAccessed = true; + return '2'; } + } }; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-22.js index 44c8deb75..a0f549b95 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-22.js @@ -10,32 +10,32 @@ description: > primitive values ---*/ - var callbackfnAccessed = false; - var toStringAccessed = false; - var valueOfAccessed = false; +var callbackfnAccessed = false; +var toStringAccessed = false; +var valueOfAccessed = false; - function callbackfn(val, idx, obj) { - callbackfnAccessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + callbackfnAccessed = true; + return val > 10; +} - var obj = { - 0: 11, - 1: 12, +var obj = { + 0: 11, + 1: 12, - length: { - valueOf: function () { - valueOfAccessed = true; - return {}; - }, - toString: function () { - toStringAccessed = true; - return {}; - } - } - }; + length: { + valueOf: function() { + valueOfAccessed = true; + return {}; + }, + toString: function() { + toStringAccessed = true; + return {}; + } + } +}; assert.throws(TypeError, function() { - Array.prototype.every.call(obj, callbackfn); + Array.prototype.every.call(obj, callbackfn); }); assert(toStringAccessed, 'toStringAccessed !== true'); assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js index e282dd269..19f4be0b2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js @@ -9,40 +9,40 @@ description: > is an object with an own toString and inherited valueOf methods ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } - - function callbackfn2(val, idx, obj) { - return val > 11; - } - - var valueOfAccessed = false; - var toStringAccessed = false; - - var proto = { - valueOf: function () { - valueOfAccessed = true; - return 2; - } - }; - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - - child.toString = function () { - toStringAccessed = true; - return '1'; - }; - - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: child - }; +function callbackfn1(val, idx, obj) { + return val > 10; +} + +function callbackfn2(val, idx, obj) { + return val > 11; +} + +var valueOfAccessed = false; +var toStringAccessed = false; + +var proto = { + valueOf: function() { + valueOfAccessed = true; + return 2; + } +}; + +var Con = function() {}; +Con.prototype = proto; + +var child = new Con(); + +child.toString = function() { + toStringAccessed = true; + return '1'; +}; + +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: child +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js index 61c2e627b..88db17559 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js @@ -9,15 +9,20 @@ description: > non-integer, ensure truncation occurs in the proper direction ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2.685 +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js index 3d052320a..d6a174f87 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js @@ -7,20 +7,20 @@ es5id: 15.4.4.16-3-25 description: Array.prototype.every - value of 'length' is a negative non-integer ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { - 0: 12, - 1: 11, - 2: 9, - length: -4294967294.5 - }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: -4294967294.5 +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js index 9abe0e936..eaf990b5b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js @@ -9,19 +9,19 @@ description: > + 1) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { - 0: 11, - 1: 9, - length: 4294967297 - }; +var obj = { + 0: 11, + 1: 9, + length: 4294967297 +}; assert.sameValue(Array.prototype.every.call(obj, callbackfn1), false, 'Array.prototype.every.call(obj, callbackfn1)'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js index c792c27c6..4636ccf3e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js @@ -7,14 +7,17 @@ es5id: 15.4.4.16-3-3 description: Array.prototype.every - value of 'length' is a number (value is 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: 0 }; +var obj = { + 0: 9, + length: 0 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js index c17e335a4..68a0bf50a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js @@ -7,14 +7,17 @@ es5id: 15.4.4.16-3-4 description: Array.prototype.every - value of 'length' is a number (value is +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: +0 }; +var obj = { + 0: 9, + length: +0 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js index eb9f48ba3..d041e7add 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js @@ -7,14 +7,17 @@ es5id: 15.4.4.16-3-5 description: Array.prototype.every - value of 'length' is a number (value is -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: -0 }; +var obj = { + 0: 9, + length: -0 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js index 1d1b15ef1..0ea6839cb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js @@ -9,15 +9,20 @@ description: > positive) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 12, 1: 11, 2: 9, length: 2 }; +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js index 977bb65f9..880c26aab 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js @@ -9,15 +9,20 @@ description: > negative) ---*/ - function callbackfn1(val, idx, obj) { - return val > 10; - } +function callbackfn1(val, idx, obj) { + return val > 10; +} - function callbackfn2(val, idx, obj) { - return val > 11; - } +function callbackfn2(val, idx, obj) { + return val > 11; +} - var obj = { 0: 12, 1: 11, 2: 9, length: -4294967294 }; //length used to exec while loop is 0 +var obj = { + 0: 12, + 1: 11, + 2: 9, + length: -4294967294 +}; //length used to exec while loop is 0 assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js index 6496da4f0..47a09300d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js @@ -9,14 +9,17 @@ description: > Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: Infinity }; +var obj = { + 0: 9, + length: Infinity +}; assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js index 9499801b8..7166e98b8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js @@ -9,14 +9,17 @@ description: > -Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 9, length: -Infinity }; +var obj = { + 0: 9, + length: -Infinity +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-1.js index 8cefedbe0..c0d6ba0cb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-1 description: Array.prototype.every throws TypeError if callbackfn is undefined ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every(); + arr.every(); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-10.js index abbff39d2..2f458442b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-10.js @@ -9,15 +9,18 @@ description: > was thrown by step 2 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - throw new Test262Error(); - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + throw new Test262Error(); + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.every.call(obj, undefined); + Array.prototype.every.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-11.js index 4e4b09b69..2cd9bba54 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-11.js @@ -9,19 +9,22 @@ description: > was thrown by step 3 ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - throw new Test262Error(); - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + throw new Test262Error(); + } + }; + }, + configurable: true +}); assert.throws(Test262Error, function() { - Array.prototype.every.call(obj, undefined); + Array.prototype.every.call(obj, undefined); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js index ded81c8a4..a137acbc3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js @@ -7,8 +7,8 @@ es5id: 15.4.4.16-4-12 description: Array.prototype.every - 'callbackfn' is a function ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} assert.sameValue([11, 9].every(callbackfn), false, '[11, 9].every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-15.js index 2f4fa8f8c..207a615ff 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-15.js @@ -9,27 +9,29 @@ description: > passing undefined for callbackfn ---*/ - var obj = { 10: 10 }; - var lengthAccessed = false; - var loopAccessed = false; +var obj = { + 10: 10 +}; +var lengthAccessed = false; +var loopAccessed = false; - Object.defineProperty(obj, "length", { - get: function () { - lengthAccessed = true; - return 20; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + lengthAccessed = true; + return 20; + }, + configurable: true +}); - Object.defineProperty(obj, "0", { - get: function () { - loopAccessed = true; - return 10; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + loopAccessed = true; + return 10; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.every.call(obj); + Array.prototype.every.call(obj); }); assert(lengthAccessed, 'lengthAccessed !== true'); assert.sameValue(loopAccessed, false, 'loopAccessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-3.js index 103f22d6a..2613f1cf3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-3.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-3 description: Array.prototype.every throws TypeError if callbackfn is null ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every(null); + arr.every(null); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-4.js index 1b7631332..6a1c03772 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-4.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-4 description: Array.prototype.every throws TypeError if callbackfn is boolean ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every(true); + arr.every(true); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-5.js index deb04c6f2..a2d5c7aef 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-5.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-5 description: Array.prototype.every throws TypeError if callbackfn is number ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every(5); + arr.every(5); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-6.js index 6597e4599..eb07314b1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-6.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-4-6 description: Array.prototype.every throws TypeError if callbackfn is string ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every("abc"); + arr.every("abc"); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-7.js index f512f2151..51e13d6d1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-7.js @@ -9,7 +9,7 @@ description: > without a Call internal method ---*/ - var arr = new Array(10); +var arr = new Array(10); assert.throws(TypeError, function() { - arr.every( {} ); + arr.every({}); }); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-8.js index a3e75ff59..cb6ef73b1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-8.js @@ -9,18 +9,21 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - accessed = true; - return 2; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + accessed = true; + return 2; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.every.call(obj, null); + Array.prototype.every.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-9.js index fc1acaa02..efe205eb4 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-9.js @@ -9,22 +9,25 @@ description: > visible when an exception occurs ---*/ - var obj = { 0: 11, 1: 12 }; +var obj = { + 0: 11, + 1: 12 +}; - var accessed = false; +var accessed = false; - Object.defineProperty(obj, "length", { - get: function () { - return { - toString: function () { - accessed = true; - return "2"; - } - }; - }, - configurable: true - }); +Object.defineProperty(obj, "length", { + get: function() { + return { + toString: function() { + accessed = true; + return "2"; + } + }; + }, + configurable: true +}); assert.throws(TypeError, function() { - Array.prototype.every.call(obj, null); + Array.prototype.every.call(obj, null); }); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js index 989a6ee20..2d906315f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js @@ -8,14 +8,14 @@ description: Array.prototype.every - thisArg not passed to strict callbackfn flags: [noStrict] ---*/ - var innerThisCorrect = false; +var innerThisCorrect = false; - function callbackfn(val, idx, obj) { - "use strict"; - innerThisCorrect = this===undefined; - return true; - } +function callbackfn(val, idx, obj) { + "use strict"; + innerThisCorrect = this === undefined; + return true; +} - [1].every(callbackfn); +[1].every(callbackfn); assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js index 360f9850f..a3bdbc170 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js @@ -10,11 +10,11 @@ flags: [noStrict] var global = this; - function callbackfn(val, idx, obj) - { - return this === global; - } +function callbackfn(val, idx, obj) +{ + return this === global; +} - var arr = [1]; +var arr = [1]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js index 5d7c8a6e9..087f9c2a3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-10 description: Array.prototype.every - Array Object can be used as thisArg ---*/ - var accessed = false; - var objArray = []; +var accessed = false; +var objArray = []; - function callbackfn(val, idx, obj) { - accessed = true; - return this === objArray; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objArray; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js index 41792ec1d..dce15d0f4 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-11 description: Array.prototype.every - String Object can be used as thisArg ---*/ - var accessed = false; - var objString = new String(); +var accessed = false; +var objString = new String(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objString; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objString; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js index cbb7ddf8b..97b5771b3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-12 description: Array.prototype.every - Boolean Object can be used as thisArg ---*/ - var accessed = false; - var objBoolean = new Boolean(); +var accessed = false; +var objBoolean = new Boolean(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objBoolean; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objBoolean; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js index 34e73df32..da8f79938 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-13 description: Array.prototype.every - Number Object can be used as thisArg ---*/ - var accessed = false; - var objNumber = new Number(); +var accessed = false; +var objNumber = new Number(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objNumber; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objNumber; +} assert([11].every(callbackfn, objNumber), '[11].every(callbackfn, objNumber) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js index 697ef848e..a5cc48fbf 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-14 description: Array.prototype.every - the Math object can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === Math; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === Math; +} assert([11].every(callbackfn, Math), '[11].every(callbackfn, Math) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js index 66a64d987..7133cd487 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-15 description: Array.prototype.every - Date Object can be used as thisArg ---*/ - var accessed = false; - var objDate = new Date(); +var accessed = false; +var objDate = new Date(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objDate; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objDate; +} assert([11].every(callbackfn, objDate), '[11].every(callbackfn, objDate) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js index 091caa14c..1edd76714 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-16 description: Array.prototype.every - RegExp Object can be used as thisArg ---*/ - var accessed = false; - var objRegExp = new RegExp(); +var accessed = false; +var objRegExp = new RegExp(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objRegExp; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objRegExp; +} assert([11].every(callbackfn, objRegExp), '[11].every(callbackfn, objRegExp) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js index 9e9bd18e8..2a5162a9c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-17 description: Array.prototype.every - the JSON object can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === JSON; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === JSON; +} assert([11].every(callbackfn, JSON), '[11].every(callbackfn, JSON) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js index a944bff81..bae882c7c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-18 description: Array.prototype.every - Error Object can be used as thisArg ---*/ - var accessed = false; - var objError = new RangeError(); +var accessed = false; +var objError = new RangeError(); - function callbackfn(val, idx, obj) { - accessed = true; - return this === objError; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objError; +} assert([11].every(callbackfn, objError), '[11].every(callbackfn, objError) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js index 7a3e06e09..3b39e1826 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js @@ -7,17 +7,17 @@ es5id: 15.4.4.16-5-19 description: Array.prototype.every - the Arguments object can be used as thisArg ---*/ - var accessed = false; - var arg; +var accessed = false; +var arg; - function callbackfn(val, idx, obj) { - accessed = true; - return this === arg; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === arg; +} - (function fun() { - arg = arguments; - }(1, 2, 3)); +(function fun() { + arg = arguments; +}(1, 2, 3)); assert([11].every(callbackfn, arg), '[11].every(callbackfn, arg) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js index f15102c64..96c0d39a4 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js @@ -7,14 +7,15 @@ es5id: 15.4.4.16-5-2 description: Array.prototype.every - thisArg is Object ---*/ - var res = false; - var o = new Object(); - o.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var o = new Object(); +o.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var arr = [1]; assert.sameValue(arr.every(callbackfn, o), true, 'arr.every(callbackfn, o)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js index 7da5e8193..50d36ddce 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js @@ -8,12 +8,12 @@ description: Array.prototype.every - the global object can be used as thisArg ---*/ var global = this; - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === global; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === global; +} assert([11].every(callbackfn, global), '[11].every(callbackfn, global) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js index d580818a6..90dcfb2df 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-22 description: Array.prototype.every - boolean primitive can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === false; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === false; +} assert([11].every(callbackfn, false), '[11].every(callbackfn, false) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js index 7953a7006..ba19fd209 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-23 description: Array.prototype.every - number primitive can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === 101; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === 101; +} assert([11].every(callbackfn, 101), '[11].every(callbackfn, 101) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js index c9da3d991..4439dca25 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-24 description: Array.prototype.every - string primitive can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() === "abc"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() === "abc"; +} assert([11].every(callbackfn, "abc"), '[11].every(callbackfn, "abc") !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js index 69f614ff8..1a1bb9b7d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js @@ -7,14 +7,15 @@ es5id: 15.4.4.16-5-3 description: Array.prototype.every - thisArg is Array ---*/ - var res = false; - var a = new Array(); - a.res = true; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; +var a = new Array(); +a.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} + +var arr = [1]; assert.sameValue(arr.every(callbackfn, a), true, 'arr.every(callbackfn, a)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js index 45ee186d1..b3e03058a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js @@ -9,15 +9,16 @@ description: > template(prototype) ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.prototype.res = true; - var f = new foo(); - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} -assert.sameValue(arr.every(callbackfn,f), true, 'arr.every(callbackfn,f)'); +function foo() {} +foo.prototype.res = true; +var f = new foo(); +var arr = [1]; + +assert.sameValue(arr.every(callbackfn, f), true, 'arr.every(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js index c0447933f..47ce23ac6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js @@ -7,15 +7,16 @@ es5id: 15.4.4.16-5-5 description: Array.prototype.every - thisArg is object from object template ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - var f = new foo(); - f.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} -assert.sameValue(arr.every(callbackfn,f), true, 'arr.every(callbackfn,f)'); +function foo() {} +var f = new foo(); +f.res = true; +var arr = [1]; + +assert.sameValue(arr.every(callbackfn, f), true, 'arr.every(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js index f871e3a43..a71c98ee2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js @@ -7,14 +7,15 @@ es5id: 15.4.4.16-5-6 description: Array.prototype.every - thisArg is function ---*/ - var res = false; - function callbackfn(val, idx, obj) - { - return this.res; - } +var res = false; - function foo(){} - foo.res = true; - var arr = [1]; +function callbackfn(val, idx, obj) +{ + return this.res; +} -assert.sameValue(arr.every(callbackfn,foo), true, 'arr.every(callbackfn,foo)'); +function foo() {} +foo.res = true; +var arr = [1]; + +assert.sameValue(arr.every(callbackfn, foo), true, 'arr.every(callbackfn,foo)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js index 3fa6fc9e7..ff38fcdc4 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-5-7 description: Array.prototype.every - built-in functions can be used as thisArg ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this === eval; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === eval; +} assert([11].every(callbackfn, eval), '[11].every(callbackfn, eval) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js index 400c0ca84..275789142 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-5-9 description: Array.prototype.every - Function Object can be used as thisArg ---*/ - var accessed = false; - var objFunction = function () { }; +var accessed = false; +var objFunction = function() {}; - function callbackfn(val, idx, obj) { - accessed = true; - return this === objFunction; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this === objFunction; +} assert([11].every(callbackfn, objFunction), '[11].every(callbackfn, objFunction) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js index e8d6745dd..22bcfaff6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js @@ -9,18 +9,18 @@ description: > the call ---*/ - var calledForThree = false; +var calledForThree = false; - function callbackfn(val, Idx, obj) - { - arr[2] = 3; - if(val == 3) - calledForThree = true; - return true; - } +function callbackfn(val, Idx, obj) +{ + arr[2] = 3; + if (val == 3) + calledForThree = true; + return true; +} - var arr = [1,2,,4,5]; +var arr = [1, 2, , 4, 5]; - var res = arr.every(callbackfn); +var res = arr.every(callbackfn); assert(calledForThree, 'calledForThree !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js index fcb91af17..47d3ed4e5 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js @@ -9,16 +9,16 @@ description: > after the call ---*/ - function callbackfn(val, Idx, obj) - { - arr[4] = 6; - if(val < 6) - return true; - else - return false; - } +function callbackfn(val, Idx, obj) +{ + arr[4] = 6; + if (val < 6) + return true; + else + return false; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js index 214575295..08531fe61 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js @@ -9,16 +9,16 @@ description: > after the call ---*/ - function callbackfn(val, Idx, obj) - { - delete arr[2]; - if(val == 3) - return false; - else - return true; - } +function callbackfn(val, Idx, obj) +{ + delete arr[2]; + if (val == 3) + return false; + else + return true; +} - var arr = [1,2,3,4,5]; +var arr = [1, 2, 3, 4, 5]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js index 0cfdd4ebc..9cbb2eda0 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js @@ -9,16 +9,16 @@ description: > Array.length is decreased ---*/ - function callbackfn(val, Idx, obj) - { - arr.length = 3; - if(val < 4) - return true; - else - return false; - } +function callbackfn(val, Idx, obj) +{ + arr.length = 3; + if (val < 4) + return true; + else + return false; +} - var arr = [1,2,3,4,6]; +var arr = [1, 2, 3, 4, 6]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js index c7cfcd23e..c4c062bdf 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js @@ -9,18 +9,18 @@ description: > sparse array ---*/ - function callbackfn(val, Idx, obj) - { - arr[1000] = 3; - if(val < 3) - return true; - else - return false; - } +function callbackfn(val, Idx, obj) +{ + arr[1000] = 3; + if (val < 3) + return true; + else + return false; +} - var arr = new Array(10); - arr[1] = 1; - arr[2] = 2; +var arr = new Array(10); +arr[1] = 1; +arr[2] = 2; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js index 1cf937c7c..45bcdd29a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js @@ -9,19 +9,19 @@ description: > call when same index is also present in prototype ---*/ - function callbackfn(val, Idx, obj) - { - delete arr[2]; - if(val == 3) - return false; - else - return true; - } +function callbackfn(val, Idx, obj) +{ + delete arr[2]; + if (val == 3) + return false; + else + return true; +} - Array.prototype[2] = 3; - var arr = [1,2,3,4,5]; +Array.prototype[2] = 3; +var arr = [1, 2, 3, 4, 5]; - var res = arr.every(callbackfn); - delete Array.prototype[2]; +var res = arr.every(callbackfn); +delete Array.prototype[2]; assert.sameValue(res, false, 'res'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js index 7eaab5078..d25bd744d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js @@ -10,16 +10,16 @@ description: > Array.prototype.every is called for all elements ---*/ - var o = new Object(); - o.arr = [1, 2, 3, 4, 5]; +var o = new Object(); +o.arr = [1, 2, 3, 4, 5]; - function callbackfn(val, Idx, obj) { - delete o.arr; - if (val === Idx + 1) - return true; - else - return false; - } +function callbackfn(val, Idx, obj) { + delete o.arr; + if (val === Idx + 1) + return true; + else + return false; +} assert(o.arr.every(callbackfn), 'o.arr.every(callbackfn) !== true'); assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js index 079db7b2d..ff2f0f8be 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js @@ -7,14 +7,18 @@ es5id: 15.4.4.16-7-8 description: Array.prototype.every - no observable effects occur if len is 0 ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val > 10; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val > 10; +} - var obj = { 0: 11, 1: 12, length: 0 }; +var obj = { + 0: 11, + 1: 12, + length: 0 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js index ded5d48e2..c1bbdfc1b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js @@ -9,22 +9,26 @@ description: > number of iterations ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val > 10; - } +function callbackfn(val, idx, obj) { + called++; + return val > 10; +} - var obj = { 1: 12, 2: 9, length: 2 }; +var obj = { + 1: 12, + 2: 9, + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - obj.length = 3; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + obj.length = 3; + return 11; + }, + configurable: true +}); assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js index e0f07ee54..abcf91365 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js @@ -9,15 +9,16 @@ description: > been assigned values ---*/ - var callCnt = 0.; - function callbackfn(val, Idx, obj) - { - callCnt++; - return true; - } +var callCnt = 0.; - var arr = new Array(10); - arr[1] = undefined; - arr.every(callbackfn); +function callbackfn(val, Idx, obj) +{ + callCnt++; + return true; +} + +var arr = new Array(10); +arr[1] = undefined; +arr.every(callbackfn); assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-10.js index e27ff642f..913796b1f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-10.js @@ -9,22 +9,26 @@ description: > prototype index property not to be visited on an Array-like Object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var arr = { 2: 2, length: 20 }; +var accessed = false; - Object.defineProperty(arr, "0", { - get: function () { - delete Object.prototype[1]; - return 0; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; +} +var arr = { + 2: 2, + length: 20 +}; - Object.prototype[1] = 1; +Object.defineProperty(arr, "0", { + get: function() { + delete Object.prototype[1]; + return 0; + }, + configurable: true +}); + +Object.prototype[1] = 1; assert(Array.prototype.every.call(arr, callbackfn), 'Array.prototype.every.call(arr, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-11.js index 54c86d50e..c9ff957cb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-11.js @@ -9,22 +9,23 @@ description: > prototype index property not to be visited on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var arr = [0, , 2]; +var accessed = false; - Object.defineProperty(arr, "0", { - get: function () { - delete Array.prototype[1]; - return 0; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; +} +var arr = [0, , 2]; - Array.prototype[1] = 1; +Object.defineProperty(arr, "0", { + get: function() { + delete Array.prototype[1]; + return 0; + }, + configurable: true +}); + +Array.prototype[1] = 1; assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-12.js index fda1fe2a7..63282ca55 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-12.js @@ -10,23 +10,28 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - var arr = { 0: 0, 1: 111, 2: 2, length: 10 }; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} +var arr = { + 0: 0, + 1: 111, + 2: 2, + length: 10 +}; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Object.prototype[1] = 1; +Object.prototype[1] = 1; assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-13.js index 4032502e5..26f3f17d1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-13.js @@ -9,23 +9,23 @@ description: > property causes prototype index property to be visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } - var arr = [0, 111, 2]; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} +var arr = [0, 111, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); - Array.prototype[1] = 1; +Array.prototype[1] = 1; assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js index 5115a27a3..a017ff964 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js @@ -9,20 +9,21 @@ description: > property not to be visited ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 3; - } - var arr = [0, 1, 2, "last"]; +var accessed = false; - Object.defineProperty(arr, "0", { - get: function () { - arr.length = 3; - return 0; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 3; +} +var arr = [0, 1, 2, "last"]; + +Object.defineProperty(arr, "0", { + get: function() { + arr.length = 3; + return 0; + }, + configurable: true +}); assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-15.js index 03fa5344f..eeb2786e3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-15.js @@ -9,28 +9,28 @@ description: > property causes prototype index property to be visited ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "prototype") { - return false; - } else { - return true; - } - } - var arr = [0, 1, 2]; +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "prototype") { + return false; + } else { + return true; + } +} +var arr = [0, 1, 2]; - Object.defineProperty(Array.prototype, "2", { - get: function () { - return "prototype"; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "2", { + get: function() { + return "prototype"; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js index 602b4b80c..2bd39ef0a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js @@ -10,29 +10,29 @@ description: > flags: [noStrict] ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "unconfigurable") { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "unconfigurable") { + return false; + } else { + return true; + } +} - var arr = [0, 1, 2]; +var arr = [0, 1, 2]; - Object.defineProperty(arr, "2", { - get: function () { - return "unconfigurable"; - }, - configurable: false - }); +Object.defineProperty(arr, "2", { + get: function() { + return "unconfigurable"; + }, + configurable: false +}); - Object.defineProperty(arr, "1", { - get: function () { - arr.length = 2; - return 1; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + arr.length = 2; + return 1; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js index fca306466..56c5b404f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js @@ -7,22 +7,22 @@ es5id: 15.4.4.16-7-b-2 description: Array.prototype.every - added properties in step 2 are visible here ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2 && val === "length") { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2 && val === "length") { + return false; + } else { + return true; + } +} - var arr = { }; +var arr = {}; - Object.defineProperty(arr, "length", { - get: function () { - arr[2] = "length"; - return 3; - }, - configurable: true - }); +Object.defineProperty(arr, "length", { + get: function() { + arr[2] = "length"; + return 3; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js index 9c7afe89a..ca526b8ca 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js @@ -9,20 +9,24 @@ description: > here ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 2; - } - var arr = { 2: 6.99, 8: 19}; +var accessed = false; - Object.defineProperty(arr, "length", { - get: function () { - delete arr[2]; - return 10; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 2; +} +var arr = { + 2: 6.99, + 8: 19 +}; + +Object.defineProperty(arr, "length", { + get: function() { + delete arr[2]; + return 10; + }, + configurable: true +}); assert(Array.prototype.every.call(arr, callbackfn), 'Array.prototype.every.call(arr, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js index dbcbe21dd..691affd2c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js @@ -9,27 +9,29 @@ description: > current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} - var arr = { length: 2 }; +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js index 5fd08b67e..75cff0bfe 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js @@ -9,27 +9,27 @@ description: > current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 1) { - return false; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 1) { + return false; + } else { + return true; + } +} - var arr = [0, , 2]; +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(arr, "1", { - get: function () { - return 1; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(arr, "1", { + get: function() { + return 1; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-6.js index 4a71a8389..27663980c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-6.js @@ -9,26 +9,28 @@ description: > current position are visited on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var arr = { length: 2 }; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } +} +var arr = { + length: 2 +}; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Object.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Object.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-7.js index 692c399de..92daa04a1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-7.js @@ -9,26 +9,26 @@ description: > current position are visited on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1 && val === 6.99) { - return false; - } else { - return true; - } - } - var arr = [0, , 2]; +function callbackfn(val, idx, obj) { + if (idx === 1 && val === 6.99) { + return false; + } else { + return true; + } +} +var arr = [0, , 2]; - Object.defineProperty(arr, "0", { - get: function () { - Object.defineProperty(Array.prototype, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + Object.defineProperty(Array.prototype, "1", { + get: function() { + return 6.99; + }, + configurable: true + }); + return 0; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js index 4bb911375..76f5f1cc0 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js @@ -9,27 +9,30 @@ description: > property not to be visited on an Array-like object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var obj = { length: 2 }; +var accessed = false; - Object.defineProperty(obj, "1", { - get: function () { - return 6.99; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; +} +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - delete obj[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 6.99; + }, + configurable: true +}); + +Object.defineProperty(obj, "0", { + get: function() { + delete obj[1]; + return 0; + }, + configurable: true +}); assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js index 2c340f8d6..9159db986 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js @@ -9,27 +9,28 @@ description: > property not to be visited on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return idx !== 1; - } - var arr = [1, 2]; +var accessed = false; - Object.defineProperty(arr, "1", { - get: function () { - return "6.99"; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + accessed = true; + return idx !== 1; +} +var arr = [1, 2]; - Object.defineProperty(arr, "0", { - get: function () { - delete arr[1]; - return 0; - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + return "6.99"; + }, + configurable: true +}); + +Object.defineProperty(arr, "0", { + get: function() { + delete arr[1]; + return 0; + }, + configurable: true +}); assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js index 579deb13d..fd1e28b5f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js @@ -9,15 +9,19 @@ description: > property on an Array-like object ---*/ - var kValue = { }; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val !== kValue; - } else { - return true; - } - } +var kValue = {}; - var obj = { 5: kValue, length: 100 }; +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val !== kValue; + } else { + return true; + } +} + +var obj = { + 5: kValue, + length: 100 +}; assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js index 1357bbb23..653e5e244 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js @@ -9,21 +9,21 @@ description: > property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 2) { - return val !== 12; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 2) { + return val !== 12; + } else { + return true; + } +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "2", { - get: function () { - return 12; - }, - configurable: true - }); +Object.defineProperty(arr, "2", { + get: function() { + return 12; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js index 9527daf83..4168c98f9 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js @@ -10,27 +10,30 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 5; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 5; + } else { + return true; + } +} - var proto = { 0: 5, 1: 6 }; +var proto = { + 0: 5, + 1: 6 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; - Object.defineProperty(child, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(child, "0", { + get: function() { + return 11; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-12.js index 54751e566..c1f29b18b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-12.js @@ -9,23 +9,23 @@ description: > property that overrides an inherited data property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 10; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 10; + } else { + return true; + } +} - var arr = []; +var arr = []; - Array.prototype[0] = 10; +Array.prototype[0] = 10; - Object.defineProperty(arr, "0", { - get: function () { - return 111; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return 111; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js index aff2f0b0e..5ffb1d544 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js @@ -10,35 +10,35 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val === 6; - } else { - return true; - } - } - - var proto = {}; - - Object.defineProperty(proto, "1", { - get: function () { - return 6; - }, - configurable: true - }); - - var Con = function () { }; - Con.prototype = proto; - - var child = new Con(); - child.length = 10; - - Object.defineProperty(child, "1", { - get: function () { - return 12; - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val === 6; + } else { + return true; + } +} + +var proto = {}; + +Object.defineProperty(proto, "1", { + get: function() { + return 6; + }, + configurable: true +}); + +var Con = function() {}; +Con.prototype = proto; + +var child = new Con(); +child.length = 10; + +Object.defineProperty(child, "1", { + get: function() { + return 12; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-14.js index 544ef938b..1cf1f75a2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-14.js @@ -9,28 +9,28 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 5; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 5; + } else { + return true; + } +} - var arr = []; +var arr = []; - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 5; + }, + configurable: true +}); - Object.defineProperty(arr, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + return 11; + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js index bc8906dfc..aab698397 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js @@ -9,27 +9,27 @@ description: > accessor property on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val !== 11; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val !== 11; + } else { + return true; + } +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "1", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(proto, "1", { + get: function() { + return 11; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 20; +var child = new Con(); +child.length = 20; assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-16.js index 20a274180..c249d76b1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-16.js @@ -9,19 +9,19 @@ description: > accessor property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val !== 11; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val !== 11; + } else { + return true; + } +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 11; + }, + configurable: true +}); assert.sameValue([, , , ].every(callbackfn), false, '[, , , ].every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js index 948c741bd..9b52fef8f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js @@ -9,18 +9,20 @@ description: > property without a get function on an Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js index 7911ea384..300d32b82 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js @@ -9,19 +9,19 @@ description: > property without a get function on an Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-19.js index 26ae16c5a..cc150375a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-19.js @@ -10,20 +10,22 @@ description: > accessor property on an Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var obj = { length: 2 }; - Object.defineProperty(obj, "1", { - set: function () { }, - configurable: true - }); +var obj = { + length: 2 +}; +Object.defineProperty(obj, "1", { + set: function() {}, + configurable: true +}); - Object.prototype[1] = 10; +Object.prototype[1] = 10; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js index 5a201fde8..5afcd1e0b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js @@ -9,12 +9,12 @@ description: > property on an Array ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val === 11; - } +function callbackfn(val, idx, obj) { + called++; + return val === 11; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-20.js index 38e384bb2..8a5fa3139 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-20.js @@ -10,21 +10,21 @@ description: > accessor property on an Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var arr = []; +var arr = []; - Object.defineProperty(arr, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(arr, "0", { + set: function() {}, + configurable: true +}); - Array.prototype[0] = 100; +Array.prototype[0] = 100; assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js index c905856ef..b6d06142e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js @@ -9,24 +9,24 @@ description: > accessor property without a get function on an Array-like object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - var proto = {}; - Object.defineProperty(proto, "1", { - set: function () { }, - configurable: true - }); +var proto = {}; +Object.defineProperty(proto, "1", { + set: function() {}, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; +var child = new Con(); +child.length = 2; assert(Array.prototype.every.call(child, callbackfn), 'Array.prototype.every.call(child, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-22.js index aaa682d44..9477b201f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-22.js @@ -9,17 +9,17 @@ description: > accessor property without a get function on an Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return typeof val === "undefined"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return typeof val === "undefined"; +} - Object.defineProperty(Array.prototype, "0", { - set: function () { }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + set: function() {}, + configurable: true +}); assert([, ].every(callbackfn), '[, ].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js index 2900f5033..c39d50664 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js @@ -10,16 +10,16 @@ description: > less than number of parameters) ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val === 11; - } +function callbackfn(val, idx, obj) { + called++; + return val === 11; +} - var func = function (a, b) { - return Array.prototype.every.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.every.call(arguments, callbackfn); +}; assert(func(11), 'func(11) !== true'); assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js index 6e636fbb9..3e1c7da80 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js @@ -10,22 +10,22 @@ description: > number of parameters) ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (idx === 0) { - return val === 11; - } else if (idx === 1) { - return val === 9; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + called++; + if (idx === 0) { + return val === 11; + } else if (idx === 1) { + return val === 9; + } else { + return false; + } +} - var func = function (a, b) { - return Array.prototype.every.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.every.call(arguments, callbackfn); +}; assert(func(11, 9), 'func(11, 9) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js index c1c2719de..2002d812a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js @@ -10,22 +10,22 @@ description: > greater than number of parameters) ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (idx < 2) { - return val > 10; - } else if (idx === 2) { - return val < 10; - } else { - return false; - } - } +function callbackfn(val, idx, obj) { + called++; + if (idx < 2) { + return val > 10; + } else if (idx === 2) { + return val < 10; + } else { + return false; + } +} - var func = function (a, b) { - return Array.prototype.every.call(arguments, callbackfn); - }; +var func = function(a, b) { + return Array.prototype.every.call(arguments, callbackfn); +}; assert(func(11, 12, 9), 'func(11, 12, 9) !== true'); assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js index d39ed23c0..425efe589 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js @@ -9,30 +9,30 @@ description: > iterations is observed on an Array ---*/ - var preIterVisible = false; - var arr = []; +var preIterVisible = false; +var arr = []; - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - Object.defineProperty(arr, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(arr, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(arr, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 11; - } - }, - configurable: true - }); +Object.defineProperty(arr, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 11; + } + }, + configurable: true +}); assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js index dbc91eb15..90c121c97 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js @@ -9,30 +9,32 @@ description: > iterations is observed on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - return val > 10; - } +function callbackfn(val, idx, obj) { + return val > 10; +} - var preIterVisible = false; - var obj = { length: 2 }; +var preIterVisible = false; +var obj = { + length: 2 +}; - Object.defineProperty(obj, "0", { - get: function () { - preIterVisible = true; - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + preIterVisible = true; + return 11; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - if (preIterVisible) { - return 9; - } else { - return 13; - } - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + if (preIterVisible) { + return 9; + } else { + return 13; + } + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js index c4fe3a814..d0eac70c0 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js @@ -9,21 +9,24 @@ description: > property that overrides an inherited data property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val === 100; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val === 100; + } else { + return true; + } +} - var proto = { 0: 11, 5: 100 }; +var proto = { + 0: 11, + 5: 100 +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child[5] = "abc"; - child.length = 10; +var child = new Con(); +child[5] = "abc"; +child.length = 10; assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-30.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-30.js index 3bd5fd649..04f0d5138 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-30.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-30.js @@ -9,22 +9,28 @@ description: > terminate iteration on an Array-like object ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } +var accessed = false; - var obj = { 0: 11, 5: 10, 10: 8, length: 20 }; - Object.defineProperty(obj, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; +} + +var obj = { + 0: 11, + 5: 10, + 10: 8, + length: 20 +}; +Object.defineProperty(obj, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - Array.prototype.every.call(obj, callbackfn); + Array.prototype.every.call(obj, callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-31.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-31.js index 3214e3376..b28796ac8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-31.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-31.js @@ -9,25 +9,26 @@ description: > terminate iteration on an Array ---*/ - var accessed = false; - function callbackfn(val, idx, obj) { - if (idx > 1) { - accessed = true; - } - return true; - } +var accessed = false; - var arr = []; - arr[5] = 10; - arr[10] = 100; +function callbackfn(val, idx, obj) { + if (idx > 1) { + accessed = true; + } + return true; +} - Object.defineProperty(arr, "1", { - get: function () { - throw new RangeError("unhandle exception happened in getter"); - }, - configurable: true - }); +var arr = []; +arr[5] = 10; +arr[10] = 100; + +Object.defineProperty(arr, "1", { + get: function() { + throw new RangeError("unhandle exception happened in getter"); + }, + configurable: true +}); assert.throws(RangeError, function() { - arr.every(callbackfn); + arr.every(callbackfn); }); assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-4.js index 9c598c783..d9e81c6df 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-4.js @@ -9,14 +9,15 @@ description: > property that overrides an inherited data property on an Array ---*/ - var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val === 12; - } +var called = 0; - Array.prototype[0] = 11; - Array.prototype[1] = 11; +function callbackfn(val, idx, obj) { + called++; + return val === 12; +} + +Array.prototype[0] = 11; +Array.prototype[1] = 11; assert([12, 12].every(callbackfn), '[12, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js index 988ac8f6e..25c267078 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js @@ -10,32 +10,32 @@ description: > Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val === 5; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val === 5; + } else { + return true; + } +} - var proto = {}; +var proto = {}; - Object.defineProperty(proto, "0", { - get: function () { - return 5; - }, - configurable: true - }); +Object.defineProperty(proto, "0", { + get: function() { + return 5; + }, + configurable: true +}); - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 2; - Object.defineProperty(child, "0", { - value: 11, - configurable: true - }); - child[1] = 12; +var child = new Con(); +child.length = 2; +Object.defineProperty(child, "0", { + value: 11, + configurable: true +}); +child[1] = 12; assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-6.js index da98350be..9575fe8ad 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-6.js @@ -9,19 +9,19 @@ description: > property that overrides an inherited accessor property on an Array ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return val === 11; - } +function callbackfn(val, idx, obj) { + accessed = true; + return val === 11; +} - Object.defineProperty(Array.prototype, "0", { - get: function () { - return 9; - }, - configurable: true - }); +Object.defineProperty(Array.prototype, "0", { + get: function() { + return 9; + }, + configurable: true +}); assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js index f0d11eb5b..10d9ab7db 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js @@ -9,22 +9,24 @@ description: > property on an Array-like object ---*/ - var kValue = 'abc'; +var kValue = 'abc'; - function callbackfn(val, idx, obj) { - if (idx === 5) { - return val !== kValue; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 5) { + return val !== kValue; + } else { + return true; + } +} - var proto = { 5: kValue }; +var proto = { + 5: kValue +}; - var Con = function () { }; - Con.prototype = proto; +var Con = function() {}; +Con.prototype = proto; - var child = new Con(); - child.length = 10; +var child = new Con(); +child.length = 10; assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-8.js index f36b54236..507af757a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-8.js @@ -9,14 +9,14 @@ description: > property on an Array ---*/ - function callbackfn(val, idx, obj) { - if (idx === 1) { - return val !== 13; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 1) { + return val !== 13; + } else { + return true; + } +} - Array.prototype[1] = 13; +Array.prototype[1] = 13; assert.sameValue([, , , ].every(callbackfn), false, '[, , , ].every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js index 5b37f8ab4..49392cb8a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js @@ -9,22 +9,25 @@ description: > property on an Array-like object ---*/ - function callbackfn(val, idx, obj) { - if (idx === 0) { - return val !== 11; - } else { - return true; - } - } +function callbackfn(val, idx, obj) { + if (idx === 0) { + return val !== 11; + } else { + return true; + } +} - var obj = { 10: 10, length: 20 }; +var obj = { + 10: 10, + length: 20 +}; - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return 11; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js index 559925a69..fff7c361c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js @@ -7,13 +7,13 @@ es5id: 15.4.4.16-7-c-ii-1 description: Array.prototype.every - callbackfn called with correct parameters ---*/ - function callbackfn(val, Idx, obj) - { - if(obj[Idx] === val) - return true; - } +function callbackfn(val, Idx, obj) +{ + if (obj[Idx] === val) + return true; +} - var arr = [0,1,2,3,4,5,6,7,8,9]; +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js index 3a67002bf..118130921 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn(val) { - called++; - return val > 10; - } +function callbackfn(val) { + called++; + return val > 10; +} assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js index 41797d60c..1ed6ecb0d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx) { - called++; - return val > 10 && arguments[2][idx] === val; - } +function callbackfn(val, idx) { + called++; + return val > 10 && arguments[2][idx] === val; +} assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js index 0724d0b3f..62eefe55b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val > 10 && obj[idx] === val; - } +function callbackfn(val, idx, obj) { + called++; + return val > 10 && obj[idx] === val; +} assert([11, 12, 13].every(callbackfn), '[11, 12, 13].every(callbackfn) !== true'); assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js index 340b49aff..8f30c0a8c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js @@ -9,12 +9,12 @@ description: > get parameter value ---*/ - var called = 0; +var called = 0; - function callbackfn() { - called++; - return arguments[2][arguments[1]] === arguments[0]; - } +function callbackfn() { + called++; + return arguments[2][arguments[1]] === arguments[0]; +} assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js index f9a5dc890..379efe765 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js @@ -9,14 +9,17 @@ description: > when T is not an object (T is a boolean primitive) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return this.valueOf() !== false; - } +function callbackfn(val, idx, obj) { + accessed = true; + return this.valueOf() !== false; +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert.sameValue(Array.prototype.every.call(obj, callbackfn, false), false, 'Array.prototype.every.call(obj, callbackfn, false)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js index 3732ea441..f9d83678e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js @@ -9,14 +9,17 @@ description: > when T is not an object (T is a number primitive) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, o) { - accessed = true; - return 5 === this.valueOf(); - } +function callbackfn(val, idx, o) { + accessed = true; + return 5 === this.valueOf(); +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn, 5), 'Array.prototype.every.call(obj, callbackfn, 5) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js index 3392433cb..17c1668bc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js @@ -9,14 +9,17 @@ description: > when T is not an object (T is a string primitive) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 'hello' === this.valueOf(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return 'hello' === this.valueOf(); +} - var obj = { 0: 11, length: 2 }; +var obj = { + 0: 11, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn, "hello"), 'Array.prototype.every.call(obj, callbackfn, "hello") !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js index f861f38e6..cc7626465 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js @@ -7,14 +7,19 @@ es5id: 15.4.4.16-7-c-ii-19 description: Array.prototype.every - non-indexed properties are not called ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - return val !== 8; - } +function callbackfn(val, idx, obj) { + called++; + return val !== 8; +} - var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; +var obj = { + 0: 11, + 10: 12, + non_index_property: 8, + length: 20 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js index 0194ce387..daacdfda4 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js @@ -7,14 +7,14 @@ es5id: 15.4.4.16-7-c-ii-2 description: Array.prototype.every - callbackfn takes 3 arguments ---*/ - function callbackfn(val, Idx, obj) - { - if(arguments.length === 3) //verify if callbackfn was called with 3 parameters - return true; - } +function callbackfn(val, Idx, obj) +{ + if (arguments.length === 3) //verify if callbackfn was called with 3 parameters + return true; +} - var arr = [0,1,true,null,new Object(),"five"]; - arr[999999] = -6.6; +var arr = [0, 1, true, null, new Object(), "five"]; +arr[999999] = -6.6; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js index 9cb001e0c..23fe1f4c1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js @@ -9,15 +9,20 @@ description: > (thisArg is correct) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 10 === this.threshold; - } +function callbackfn(val, idx, obj) { + accessed = true; + return 10 === this.threshold; +} - var thisArg = { threshold: 10 }; +var thisArg = { + threshold: 10 +}; - var obj = { 0: 11, length: 1 }; +var obj = { + 0: 11, + length: 1 +}; assert(Array.prototype.every.call(obj, callbackfn, thisArg), 'Array.prototype.every.call(obj, callbackfn, thisArg) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js index 2d193c698..415365713 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js @@ -9,21 +9,25 @@ description: > (kValue is correct) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - if (idx === 0) { - return val === 11; - } +function callbackfn(val, idx, obj) { + accessed = true; + if (idx === 0) { + return val === 11; + } - if (idx === 1) { - return val === 12; - } + if (idx === 1) { + return val === 12; + } - } +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js index 524d61965..bd56fc0a9 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js @@ -9,21 +9,25 @@ description: > (the index k is correct) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - if (val === 11) { - return idx === 0; - } +function callbackfn(val, idx, obj) { + accessed = true; + if (val === 11) { + return idx === 0; + } - if (val === 12) { - return idx === 1; - } + if (val === 12) { + return idx === 1; + } - } +} - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js index e5567884b..59a1e5566 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js @@ -9,13 +9,17 @@ description: > (this object O is correct) ---*/ - var called = 0; - var obj = { 0: 11, 1: 12, length: 2 }; +var called = 0; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - function callbackfn(val, idx, o) { - called++; - return obj === o; - } +function callbackfn(val, idx, o) { + called++; + return obj === o; +} assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js index 39da9d01f..f35df8913 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js @@ -9,17 +9,18 @@ description: > returns false ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - if(idx > 5) - return false; - else - return true; - } +var callCnt = 0; - var arr = [0,1,2,3,4,5,6,7,8,9]; +function callbackfn(val, idx, obj) +{ + callCnt++; + if (idx > 5) + return false; + else + return true; +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js index 9a4216a67..07a4d691a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js @@ -9,18 +9,19 @@ description: > order ---*/ - var arr = [0, 1, 2, 3, 4, 5]; - var lastIdx = 0; - var called = 0; - function callbackfn(val, idx, o) { - called++; - if (lastIdx !== idx) { - return false; - } else { - lastIdx++; - return true; - } - } +var arr = [0, 1, 2, 3, 4, 5]; +var lastIdx = 0; +var called = 0; + +function callbackfn(val, idx, o) { + called++; + if (lastIdx !== idx) { + return false; + } else { + lastIdx++; + return true; + } +} assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); assert.sameValue(arr.length, called, 'arr.length'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js index edd62427f..f604f9672 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js @@ -9,24 +9,24 @@ description: > iteration and not prior to starting the loop on an Array ---*/ - var called = 0; - var kIndex = []; +var called = 0; +var kIndex = []; - //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. - function callbackfn(val, idx, obj) { - called++; - //Each position should be visited one time, which means k is accessed one time during iterations. - if (typeof kIndex[idx] === "undefined") { - //when current position is visited, its previous index should has been visited. - if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { - return false; - } - kIndex[idx] = 1; - return true; - } else { - return false; - } - } +//By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. +function callbackfn(val, idx, obj) { + called++; + //Each position should be visited one time, which means k is accessed one time during iterations. + if (typeof kIndex[idx] === "undefined") { + //when current position is visited, its previous index should has been visited. + if (idx !== 0 && typeof kIndex[idx - 1] === "undefined") { + return false; + } + kIndex[idx] = 1; + return true; + } else { + return false; + } +} assert([11, 12, 13, 14].every(callbackfn, undefined), '[11, 12, 13, 14].every(callbackfn, undefined) !== true'); assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js index d1c33e967..df9f83143 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js @@ -7,17 +7,20 @@ es5id: 15.4.4.16-7-c-ii-6 description: Array.prototype.every - arguments to callbackfn are self consistent ---*/ - var accessed = false; - var thisArg = {}; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var thisArg = {}; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn() { - accessed = true; - return this === thisArg && - arguments[0] === 11 && - arguments[1] === 0 && - arguments[2] === obj; - } +function callbackfn() { + accessed = true; + return this === thisArg && + arguments[0] === 11 && + arguments[1] === 0 && + arguments[2] === obj; +} assert(Array.prototype.every.call(obj, callbackfn, thisArg), 'Array.prototype.every.call(obj, callbackfn, thisArg) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-7.js index d3f0f8eff..c1a6345d8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-7.js @@ -9,20 +9,25 @@ description: > callbackfn terminate iteration ---*/ - var called = 0; +var called = 0; - function callbackfn(val, idx, obj) { - called++; - if (called === 1) { - throw new Test262Error("Exception occurred in callbackfn"); - } - return true; - } +function callbackfn(val, idx, obj) { + called++; + if (called === 1) { + throw new Test262Error("Exception occurred in callbackfn"); + } + return true; +} - var obj = { 0: 11, 4: 10, 10: 8, length: 20 }; +var obj = { + 0: 11, + 4: 10, + 10: 8, + length: 20 +}; assert.throws(Test262Error, function() { - Array.prototype.every.call(obj, callbackfn); + Array.prototype.every.call(obj, callbackfn); }); assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js index 26fb2b97a..6f015b207 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js @@ -9,14 +9,18 @@ description: > iterations is observed ---*/ - var obj = { 0: 11, 1: 12, length: 2 }; +var obj = { + 0: 11, + 1: 12, + length: 2 +}; - function callbackfn(val, idx, o) { - if (idx === 0) { - obj[idx + 1] = 8; - } - return val > 10; - } +function callbackfn(val, idx, o) { + if (idx === 0) { + obj[idx + 1] = 8; + } + return val > 10; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js index dfc3894db..b03364275 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js @@ -9,12 +9,12 @@ description: > parameter ---*/ - var called = 0; +var called = 0; - function callbackfn() { - called++; - return true; - } +function callbackfn() { + called++; + return true; +} assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js index f29e4f155..bafc7b841 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js @@ -7,13 +7,16 @@ es5id: 15.4.4.16-7-c-iii-1 description: Array.prototype.every - return value of callbackfn is undefined ---*/ - var accessed = false; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn(val, idx, o) { - accessed = true; - return undefined; - } +function callbackfn(val, idx, o) { + accessed = true; + return undefined; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js index 6f806273d..f495dd02c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js @@ -9,12 +9,12 @@ description: > (value is Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return Infinity; - } +function callbackfn(val, idx, obj) { + accessed = true; + return Infinity; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js index 923f6e28b..b761964ae 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js @@ -9,12 +9,12 @@ description: > (value is -Infinity) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return -Infinity; - } +function callbackfn(val, idx, obj) { + accessed = true; + return -Infinity; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js index a8ee187e3..0ac2e5536 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js @@ -9,12 +9,12 @@ description: > (value is NaN) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return NaN; - } +function callbackfn(val, idx, obj) { + accessed = true; + return NaN; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js index 4185bfa74..931cb99ca 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js @@ -9,12 +9,12 @@ description: > string ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return ""; - } +function callbackfn(val, idx, obj) { + accessed = true; + return ""; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js index 5e7cbea1c..ce75448e9 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js @@ -9,12 +9,12 @@ description: > string ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return "non-empty string"; - } +function callbackfn(val, idx, obj) { + accessed = true; + return "non-empty string"; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js index 2b577983b..0ab89ec09 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return function () { }; - } +function callbackfn(val, idx, obj) { + accessed = true; + return function() {}; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js index eec81ccd6..f7f6f6873 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return []; - } +function callbackfn(val, idx, obj) { + accessed = true; + return []; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js index bdf6d7314..273fb64fd 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new String(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new String(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js index 37d3ecc27..7cde6eabf 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new Boolean(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new Boolean(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js index f9ef17f28..7306e5e45 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new Number(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new Number(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js index 7084a3776..62e4d0589 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js @@ -7,13 +7,16 @@ es5id: 15.4.4.16-7-c-iii-2 description: Array.prototype.every - return value of callbackfn is null ---*/ - var accessed = false; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn(val, idx, obj) { - accessed = true; - return null; - } +function callbackfn(val, idx, obj) { + accessed = true; + return null; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js index 7a68faf9f..2026f6357 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return Math; - } +function callbackfn(val, idx, obj) { + accessed = true; + return Math; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js index ef6432c3d..3b16afa42 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js @@ -7,12 +7,12 @@ es5id: 15.4.4.16-7-c-iii-21 description: Array.prototype.every - return value of callbackfn is a Date object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new Date(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new Date(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js index b7b1437a8..3616be141 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new RegExp(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new RegExp(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js index 80b30b5f6..87151094b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return JSON; - } +function callbackfn(val, idx, obj) { + accessed = true; + return JSON; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js index 3075fcdb6..7141b6a71 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js @@ -9,12 +9,12 @@ description: > object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new EvalError(); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new EvalError(); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js index fcfc6b35c..8efc3f174 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js @@ -9,12 +9,12 @@ description: > Arguments object ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return arguments; - } +function callbackfn(val, idx, obj) { + accessed = true; + return arguments; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js index 5f962f32f..2b650660b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js @@ -10,12 +10,12 @@ description: > ---*/ var global = this; - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return global; - } +function callbackfn(val, idx, obj) { + accessed = true; + return global; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js index 7c1df38b4..0475c7ff5 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js @@ -7,37 +7,39 @@ es5id: 15.4.4.16-7-c-iii-28 description: Array.prototype.every - false prevents further side effects ---*/ - var result = false; - var obj = { length: 20 }; +var result = false; +var obj = { + length: 20 +}; - function callbackfn(val, idx, obj) { - if (idx > 1) { - result = true; - } - return val > 10; - } +function callbackfn(val, idx, obj) { + if (idx > 1) { + result = true; + } + return val > 10; +} - Object.defineProperty(obj, "0", { - get: function () { - return 11; - }, - configurable: true - }); +Object.defineProperty(obj, "0", { + get: function() { + return 11; + }, + configurable: true +}); - Object.defineProperty(obj, "1", { - get: function () { - return 8; - }, - configurable: true - }); +Object.defineProperty(obj, "1", { + get: function() { + return 8; + }, + configurable: true +}); - Object.defineProperty(obj, "2", { - get: function () { - result = true; - return 8; - }, - configurable: true - }); +Object.defineProperty(obj, "2", { + get: function() { + result = true; + return 8; + }, + configurable: true +}); assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); assert.sameValue(result, false, 'result'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js index 796bd2ea5..7571d0ec3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js @@ -9,12 +9,12 @@ description: > callbackfn is treated as true value ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return new Boolean(false); - } +function callbackfn(val, idx, obj) { + accessed = true; + return new Boolean(false); +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js index c8583c061..bcd7891c7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js @@ -9,13 +9,16 @@ description: > (value is false) ---*/ - var accessed = false; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn(val, idx, obj) { - accessed = true; - return false; - } +function callbackfn(val, idx, obj) { + accessed = true; + return false; +} assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js index 31b4185b9..34469360c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js @@ -9,13 +9,16 @@ description: > (value is true) ---*/ - var accessed = false; - var obj = { 0: 11, length: 1 }; +var accessed = false; +var obj = { + 0: 11, + length: 1 +}; - function callbackfn(val, idx, obj) { - accessed = true; - return true; - } +function callbackfn(val, idx, obj) { + accessed = true; + return true; +} diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js index 93790b433..b1ce805ac 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js @@ -9,12 +9,12 @@ description: > (value is 0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return 0; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js index fc0eaa069..5ca005865 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js @@ -9,12 +9,12 @@ description: > (value is +0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return +0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return +0; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js index 4ec5e4a5e..3b152c86b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js @@ -9,12 +9,12 @@ description: > (value is -0) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return -0; - } +function callbackfn(val, idx, obj) { + accessed = true; + return -0; +} assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js index 59a89680e..0c2b63f00 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js @@ -9,12 +9,12 @@ description: > (value is positive number) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return 5; - } +function callbackfn(val, idx, obj) { + accessed = true; + return 5; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js index 18ff44cc4..1830a7d9a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js @@ -9,12 +9,12 @@ description: > (value is negative number) ---*/ - var accessed = false; +var accessed = false; - function callbackfn(val, idx, obj) { - accessed = true; - return -5; - } +function callbackfn(val, idx, obj) { + accessed = true; + return -5; +} assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js index d074dbf34..e5fb2db83 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js @@ -7,7 +7,7 @@ es5id: 15.4.4.16-8-1 description: Array.prototype.every returns true if 'length' is 0 (empty array) ---*/ - function cb() {} - var i = [].every(cb); +function cb() {} +var i = [].every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js index e69633f91..a865a6c4b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js @@ -7,19 +7,20 @@ es5id: 15.4.4.16-8-10 description: Array.prototype.every - subclassed array when length is reduced ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 2; +foo.prototype = new Array(1, 2, 3); - function cb(val) - { - if(val>2) - return false; - else - return true; - } - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = 2; + +function cb(val) +{ + if (val > 2) + return false; + else + return true; +} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js index 9403b2acd..b407fe4e7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js @@ -9,14 +9,15 @@ description: > return true ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return true; - } +var callCnt = 0; - var arr = [0,1,2,3,4,5,6,7,8,9]; +function callbackfn(val, idx, obj) +{ + callCnt++; + return true; +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js index 844e0bf62..7100aecd5 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js @@ -9,12 +9,12 @@ description: > called on ---*/ - function callbackfn(val, idx, obj) - { - return true; - } - var arr = [1,2,3,4,5]; - arr.every(callbackfn); +function callbackfn(val, idx, obj) +{ + return true; +} +var arr = [1, 2, 3, 4, 5]; +arr.every(callbackfn); assert.sameValue(arr[0], 1, 'arr[0]'); assert.sameValue(arr[1], 2, 'arr[1]'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js index 3a41b2c36..66b56af96 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js @@ -7,16 +7,17 @@ es5id: 15.4.4.16-8-13 description: Array.prototype.every doesn't visit expandos ---*/ - var callCnt = 0; - function callbackfn(val, idx, obj) - { - callCnt++; - return true; - } +var callCnt = 0; - var arr = [0,1,2,3,4,5,6,7,8,9]; - arr["i"] = 10; - arr[true] = 11; +function callbackfn(val, idx, obj) +{ + callCnt++; + return true; +} + +var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; +arr["i"] = 10; +arr[true] = 11; assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js index 9d9d694b1..90ef805f6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js @@ -9,13 +9,14 @@ description: > Array, length overridden to null (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = null; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = null; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js index 6cf241998..746ea3c4d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js @@ -9,13 +9,14 @@ description: > Array, length overridden to false (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = false; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = false; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js index f296ed79c..802f85d32 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js @@ -9,13 +9,14 @@ description: > Array, length overridden to 0 (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = 0; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = 0; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js index 49d510f6b..cd8513fb4 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js @@ -9,13 +9,14 @@ description: > Array, length overridden to '0' (type conversion)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - f.length = '0'; +foo.prototype = new Array(1, 2, 3); - function cb(){} - var i = f.every(cb); +function foo() {} +var f = new foo(); +f.length = '0'; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js index de58615e3..17d0d8834 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js @@ -9,15 +9,20 @@ description: > Array, length overridden with obj with valueOf) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { valueOf: function () { return 0;}}; - f.length = o; +function foo() {} +var f = new foo(); - function cb(){} - var i = f.every(cb); +var o = { + valueOf: function() { + return 0; + } +}; +f.length = o; + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js index 170831065..f23dc8cff 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js @@ -9,20 +9,25 @@ description: > Array, length overridden with obj w/o valueOf (toString)) ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); +foo.prototype = new Array(1, 2, 3); - var o = { toString: function () { return '0';}}; - f.length = o; +function foo() {} +var f = new foo(); - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - function cb(){} - var i = f.every(cb); +var o = { + toString: function() { + return '0'; + } +}; +f.length = o; + +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js index 8d1854e45..75f2878c3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js @@ -9,28 +9,29 @@ description: > Array, length overridden with [] ---*/ - foo.prototype = new Array(1, 2, 3); - function foo() {} - var f = new foo(); - - f.length = []; - - // objects inherit the default valueOf method of the Object object; - // that simply returns the itself. Since the default valueOf() method - // does not return a primitive value, ES next tries to convert the object - // to a number by calling its toString() method and converting the - // resulting string to a number. - // - // The toString( ) method on Array converts the array elements to strings, - // then returns the result of concatenating these strings, with commas in - // between. An array with no elements converts to the empty string, which - // converts to the number 0. If an array has a single element that is a - // number n, the array converts to a string representation of n, which is - // then converted back to n itself. If an array contains more than one element, - // or if its one element is not a number, the array converts to NaN. - - function cb(){} - var i = f.every(cb); +foo.prototype = new Array(1, 2, 3); + +function foo() {} +var f = new foo(); + +f.length = []; + +// objects inherit the default valueOf method of the Object object; +// that simply returns the itself. Since the default valueOf() method +// does not return a primitive value, ES next tries to convert the object +// to a number by calling its toString() method and converting the +// resulting string to a number. +// +// The toString( ) method on Array converts the array elements to strings, +// then returns the result of concatenating these strings, with commas in +// between. An array with no elements converts to the empty string, which +// converts to the number 0. If an array has a single element that is a +// number n, the array converts to a string representation of n, which is +// then converted back to n itself. If an array contains more than one element, +// or if its one element is not a number, the array converts to NaN. + +function cb() {} +var i = f.every(cb); assert.sameValue(i, true, 'i'); |