diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-1.js index f914b6a16ecef322f4e65ea4d7c3816edd92ecb0..1613735e8596ee2d7c6b5affa478e30869d49488 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.22-0-1 description: Array.prototype.reduceRight must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.reduceRight; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-2.js index 5b956665764d75d482c93a4717a3dc1c8a2008f7..21322d512d0bb93a26052c986120ce3869c84a83 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.22-0-2 description: Array.prototype.reduceRight.length must be 1 -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.reduceRight.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.length, 1, 'Array.prototype.reduceRight.length'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js index f768d03c49f8296ff7b8545d498d90a469d36cf0..3d6a69d7359d5ff08d4e2f73935a481661fe8122 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-11 description: Array.prototype.reduceRight applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Date(); obj.length = 1; obj[0] = 1; @@ -19,6 +16,5 @@ function testcase() { return obj instanceof Date; } - return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 1), 'Array.prototype.reduceRight.call(obj, callbackfn, 1) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js index 5b2d15b994209d6bfe1f0fd67743e600766d0c86..531dfb85970fceefdc09aab8b49d1c6e4170186d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-12 description: Array.prototype.reduceRight applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new RegExp(); obj.length = 1; obj[0] = 1; @@ -19,6 +16,5 @@ function testcase() { return o instanceof RegExp; } - return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 1), 'Array.prototype.reduceRight.call(obj, callbackfn, 1) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js index 1e3ef17deae948c4aff4514ae9a99a8a17da3c82..1c65e3fa60eb8338d489ab3c2c66c63be9977bd9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-14 description: Array.prototype.reduceRight applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Error(); obj.length = 1; obj[0] = 1; @@ -19,6 +16,5 @@ function testcase() { return o instanceof Error; } - return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 1), 'Array.prototype.reduceRight.call(obj, callbackfn, 1) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js index c0c1c36552627935f3c0d307fee30c0ca1e822cc..bfe6aa0dab1c943a43d21fd6e963e3e9042c4ba5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-15 description: Array.prototype.reduceRight applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { return arguments; }("a", "b")); - return Array.prototype.reduceRight.call(obj, callbackfn, "a") && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, "a"), 'Array.prototype.reduceRight.call(obj, callbackfn, "a") !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js index 240340086137ac9fe35c230d0c796daa856ae81c..1a639b1e20ab033765508707b8795d68c95574c1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-4 description: Array.prototype.reduceRight applied to Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Boolean(true); obj.length = 2; obj[0] = 11; @@ -20,6 +17,5 @@ function testcase() { return obj instanceof Boolean; } - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js index d5334eb3a9e94adb82958fd401011da549503526..91c02f09ca1c236cfa9587eacfa4f34dfb8bdc76 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-6 description: Array.prototype.reduceRight applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Number(-128); obj.length = 2; obj[0] = 11; @@ -20,6 +17,5 @@ function testcase() { return o instanceof Number; } - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js index 417e0e8a3da7173cf11f631c6991e3cf7c7ba9c7..d23acbedc2cb9545e119f67a8ab284a9fa8104f3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-7 description: Array.prototype.reduceRight applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { return obj instanceof String; } - return Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h") && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h"), 'Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h") !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js index 6fa8455730aaa0643ae4e30f843e0a83b88412e0..1650a9de1032684232ffde4db0257d4e1d68373d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-8 description: Array.prototype.reduceRight applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new String("hello\nworld\\!"); var accessed = false; @@ -17,6 +14,5 @@ function testcase() { return o instanceof String; } - return Array.prototype.reduceRight.call(obj, callbackfn, "h") && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, "h"), 'Array.prototype.reduceRight.call(obj, callbackfn, "h") !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js index 61ff346e107edfa449fb4cf5037e00153de6eb14..79784772b5cb9e96adab0f66409f88422b3edcdc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-9 description: Array.prototype.reduceRight applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = function (a, b) { return a + b; }; @@ -21,6 +18,5 @@ function testcase() { return o instanceof Function; } - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js index 475c44bc714b935418052bb4289063c8a9fcb743..d458395b049efdf75cfd8b33915b37f16095e485 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js @@ -6,25 +6,17 @@ es5id: 15.4.4.22-10-1 description: > Array.prototype.reduceRight doesn't mutate the Array on which it is called on -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return 1; } var srcArr = [1,2,3,4,5]; srcArr.reduceRight(callbackfn); - if(srcArr[0] === 1 && - srcArr[1] === 2 && - srcArr[2] === 3 && - srcArr[3] === 4 && - srcArr[4] === 5) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(srcArr[0], 1, 'srcArr[0]'); +assert.sameValue(srcArr[1], 2, 'srcArr[1]'); +assert.sameValue(srcArr[2], 3, 'srcArr[2]'); +assert.sameValue(srcArr[3], 4, 'srcArr[3]'); +assert.sameValue(srcArr[4], 5, 'srcArr[4]'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js index b8a31890f1f25550f82015a22a9b8733eedd396f..024efedac2218924a9f8f8ee6ce33acbd5e4ccf5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js @@ -6,20 +6,12 @@ es5id: 15.4.4.22-10-2 description: > Array.prototype.reduceRight reduces array in descending order of indices -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return prevVal + curVal; } var srcArr = ['1','2','3','4','5']; - if(srcArr.reduceRight(callbackfn) === '54321') - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(srcArr.reduceRight(callbackfn), '54321', 'srcArr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js index a0b39bbdc362198e7934e11b448a2d984f01830a..906e06b920937bc1b83c24b4b5fb689f5b3680a3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.22-10-3 description: Array.prototype.reduceRight - subclassed array with length 1 -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = [1]; function foo() {} var f = new foo(); function cb(){} - if(f.reduceRight(cb) === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduceRight(cb), 1, 'f.reduceRight(cb)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js index 0ac2a1f0b6c7da65d0e9c861b2766e78561fee92..23d5cd9b0e7fa86df3358f54cc6323cbbb2f02d2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js @@ -6,16 +6,12 @@ es5id: 15.4.4.22-10-4 description: > Array.prototype.reduceRight - subclassed array with length more than 1 -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(0, 1, 2, 3); function foo() {} var f = new foo(); function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduceRight(cb) === 6) - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduceRight(cb), 6, 'f.reduceRight(cb)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js index 1e573abce859ef19a1662087933dc69cc1be2131..d6368c59d5f549d7fc7cb92d29cd6c0b3b792ed7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js @@ -6,20 +6,12 @@ es5id: 15.4.4.22-10-5 description: > Array.prototype.reduceRight reduces array in descending order of indices(initialvalue present) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return prevVal + curVal; } var srcArr = ['1','2','3','4','5']; - if(srcArr.reduceRight(callbackfn,'6') === '654321') - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(srcArr.reduceRight(callbackfn,'6'), '654321', 'srcArr.reduceRight(callbackfn,"6")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js index cbac727f45566081fff22c686b8089d49d0d4ed4..6d1c112379e736fb945f490cf1faad518daea780 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js @@ -6,16 +6,12 @@ es5id: 15.4.4.22-10-6 description: > Array.prototype.reduceRight - subclassed array when initialvalue provided -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(0, 1, 2, 3); function foo() {} var f = new foo(); function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduceRight(cb,"4") === "43210") - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduceRight(cb,"4"), "43210", 'f.reduceRight(cb,"4")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js index eee28a289d3188f77d65d42f0f45e38656844a08..68fc333195cdccfac644d802ca251592711997b4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js @@ -6,16 +6,12 @@ es5id: 15.4.4.22-10-7 description: > Array.prototype.reduceRight - subclassed array when length to 1 and initialvalue provided -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = [1]; function foo() {} var f = new foo(); function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduceRight(cb,"4") === "41") - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduceRight(cb,"4"), "41", 'f.reduceRight(cb,"4")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js index 5730cf95059f3ae8d46666d0804e7775da37cf4e..7abfbb823bdbf0c35abfc516405781c0814a10ef 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-10-8 description: Array.prototype.reduceRight doesn't visit expandos -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,10 +17,4 @@ function testcase() { srcArr.reduceRight(callbackfn); - if(callCnt == 4) - { - return true; - } - - } -runTestCase(testcase); +assert.sameValue(callCnt, 4, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js index 052f795dcb5f3998769a0a378c3b3b05c277ab14..cb5037697df1a23df13381c6db59bbf613fa91d4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-1 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var obj = { 0: 12, @@ -24,6 +21,5 @@ function testcase() { return obj.length === 2; } - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js index fe847a1ec330fcd33f42387b6332803eea69aeba..75c3c1b79cfee760462dd7681a4f4b2ffa9c2b13 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-10 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var Con = function () { }; @@ -37,6 +34,5 @@ function testcase() { child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn, 11), 'Array.prototype.reduceRight.call(child, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js index b6eed8c81b7dce5b092f014eaf95640af8b265ef..73e619df97554bb0a2abb5569cd738879ddc47b2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-11 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,5 @@ function testcase() { configurable: true }); - return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 111), 111, 'Array.prototype.reduceRight.call(obj, callbackfn, 111)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js index 198db20e9d7198968d5a764b59af1832bf956c91..ccd5f56f73b12bbe219c37904e1a0ca31768c415 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-13 description: > Array.prototype.reduceRight applied to the Array-like object that 'length' is inherited accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -31,6 +28,5 @@ function testcase() { child[0] = 11; child[1] = 12; - return Array.prototype.reduceRight.call(child, callbackfn, 111) === 111 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(child, callbackfn, 111), 111, 'Array.prototype.reduceRight.call(child, callbackfn, 111)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js index 764950ced92c5ca19d6fbc41402e9bb7c30c213d..b07a6de91c011b942be3cdf1e45ae4556064eeef 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-14 description: > Array.prototype.reduceRight applied to the Array-like object that 'length' property doesn't exist -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, 1: 12 }; var accessed = false; @@ -19,6 +16,5 @@ function testcase() { return curVal > 10; } - return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 111), 111, 'Array.prototype.reduceRight.call(obj, callbackfn, 111)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js index 79f11b3949e2fdea7a624a155764b2a96a99c026..a3e0221c945babeaf84e79a11211592c0e2ed936 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-17 description: > Array.prototype.reduceRight applied to the Arguments object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var arg; var accessed = false; @@ -24,6 +21,5 @@ function testcase() { return Array.prototype.reduceRight.call(arguments, callbackfn, 11); }; - return func(12, 11) && accessed; - } -runTestCase(testcase); +assert(func(12, 11), 'func(12, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js index 14803ecd3a04306e106974703dc88564d8a8c923..5df51113a8faeb46f140ab9fc9edafe35c14c5f8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-19 description: > Array.prototype.reduceRight applied to Function object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var fun = function (a, b) { return a + b; @@ -24,6 +21,5 @@ function testcase() { return obj.length === 2; } - return Array.prototype.reduceRight.call(fun, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(fun, callbackfn, 11), 'Array.prototype.reduceRight.call(fun, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js index 2dbfe579e64e714511ef897d1c62d56f70e52e20..210099b9e6ca592e2472d2fbfed5f86f8a47a168 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-2 description: > Array.prototype.reduceRight - 'length' is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return obj.length === 2; } - return [12, 11].reduceRight(callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert([12, 11].reduceRight(callbackfn, 11), '[12, 11].reduceRight(callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js index 717fe7466c8b6c338d04a0559646215ce155977f..8db6d7d97fd6703de6e6664b32504f2e6bdcdf5d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-3 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = true; function callbackfn(prevVal, curVal, idx, obj) { @@ -29,6 +26,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn), 'Array.prototype.reduceRight.call(child, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js index 10c05bdd2f204ded49724dba63da6afd49624797..4a5c6a06f820036dcc1d3f0f4ee11513f2427c75 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -39,6 +36,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn), 'Array.prototype.reduceRight.call(child, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js index 8a12b9cb3b0ba4e90db74b29f9891a53a647e601..bfd55e5b0ba4de5b6deb106c2054ff527b942445 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-6 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var proto = { length: 2 }; var Con = function () { }; @@ -26,6 +23,5 @@ function testcase() { return obj.length === 2; } - return Array.prototype.reduceRight.call(child, callbackfn1, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn1, 11), 'Array.prototype.reduceRight.call(child, callbackfn1, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js index e0ee6f7642384621948b8203c733d1889a7706bd..92fb53708db0ca43edb81e1ede4fa29403648786 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-7 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = true; var obj = {}; obj[0] = 12; @@ -29,6 +26,5 @@ function testcase() { configurable: true }); - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js index 962edb7cdad47d1237fbd071ddac9aea7c57ecbd..3b27ced48e84a4530664e3168d8aeb91447a679c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -37,6 +34,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn, 11), 'Array.prototype.reduceRight.call(child, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js index f5c121525fa183f751903ffe0d33a689323c3ef9..d76e880b48a5ae88a332270e399e6701121e83ae 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn1(prevVal, curVal, idx, obj) { @@ -41,6 +38,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn1, 111) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn1, 111), 'Array.prototype.reduceRight.call(child, callbackfn1, 111) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js index 76f1b67675bb5a173a6f5a4fd10da51d3261b842..6b77d18661c14fedc3688b45253f0e62b946f35c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-3-1 description: Array.prototype.reduceRight - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 9, length: undefined }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js index 0e5d72899182d8cd49ed93e2ba61102b3d4a13bb..26880df418adab4599d2b79f499db92e3640cbcd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-10 description: > Array.prototype.reduceRight - value of 'length' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: NaN }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js index aaaf3ff6bfdde230031bfad9357f9585af9b6b3f..d51815e91da06d7d96646c0491a5b12fa0533973 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-11 description: > Array.prototype.reduceRight - value of 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js index 7ef635a545fb88edb882e37b27758f4d578404a0..4db2dbc3b05ed100181d4ba0f5a4e4f0f4a36ab1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-12 description: > Array.prototype.reduceRight - value of 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && !testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert.sameValue(testResult2, false, 'testResult2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js index 220c7cf4bc99d438afe07e2a7c1c9a49ea63beb5..ef58e583ce6c3d783c0efd6d3fd2f714e00074e2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-13 description: > Array.prototype.reduceRight - value of 'length' is a string containing a decimal number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js index d96fa4f74a39688692a4ae873216760e9f859e60..d02dc0c293e41b25fc38b28b9c62c399f04dc9d8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-14 description: > Array.prototype.reduceRight - value of 'length' is a string containing -Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed2 = false; function callbackfn2(prevVal, curVal, idx, obj) { @@ -19,7 +16,5 @@ function testcase() { var obj2 = { 0: 9, length: "-Infinity" }; - return Array.prototype.reduceRight.call(obj2, callbackfn2, 2) === 2 && - !accessed2; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj2, callbackfn2, 2), 2, 'Array.prototype.reduceRight.call(obj2, callbackfn2, 2)'); +assert.sameValue(accessed2, false, 'accessed2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js index f00c19fad1d3ed4c85544fc33a9291674535ce1f..42031b3830b7e6194a9be5f083374109b46cb3e4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-15 description: > Array.prototype.reduceRight - value of 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js index 535a258a334e1536ac04a9eeee9a9372afa4c536..90a64372f77f46740dbd957949e73921d49c91f2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-16 description: > Array.prototype.reduceRight - value of 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js index fc3e7a6a6a61e4ca8b7fec2fea913b1ddd0797c7..1274b3e05f22448a2080cc21707d6a8e9632ba35 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-17 description: > Array.prototype.reduceRight - value of 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js index 815efbfa3509500702197e44e2a5234e9dbdb574..58300063544cdae9a954f01d61462721c1d361b9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-18 description: > Array.prototype.reduceRight - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, 1: 8, length: "two" }; - return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 11), 11, 'Array.prototype.reduceRight.call(obj, callbackfn, 11)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js index 4b60d8a60f31b9ae9c3ba35bd1bc29388c28002f..26e76ad646d6f350b2d702a57be6845571e70a97 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-19 description: > Array.prototype.reduceRight - value of 'length' is an object which has an own toString method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -44,6 +41,7 @@ function testcase() { // resulting string to a number. Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && toStringAccessed; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); +assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js index e4edc8df685dfba062adbd5ba756a83ab3b5cd6c..a7bbc28ad3cea84c11c8dc60cbfe57df9eb3bd1d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-2 description: > Array.prototype.reduceRight applied to an Array-like object, 'length' is 0 (length overridden to false(type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(preVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: false }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js index 8dbef1c07a49cc7cf5c1a0ac49f47c8a8f6e81bf..3ef3882a72c11cc44e684bc086e976ede3dafee1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-20 description: > Array.prototype.reduceRight - value of 'length' is an Object which has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -39,6 +36,7 @@ function testcase() { }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && valueOfAccessed; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js index 8f28247bcb6357fe252c6f04fe5d4365904ff762..279afa06dd56d1b5edc6801da9fda195d5fe7ffa 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -45,6 +42,8 @@ function testcase() { }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js index 8d5a1dcb3cc2617132a29f870ac88e1c1f823bc0..29afac626d15d47a92a821ad64def1612afa6936 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; var valueOfAccessed = false; @@ -51,6 +48,8 @@ function testcase() { }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js index 63c6dc7cc4ce3d434fbf2740b9708f32ad970863..3c1b823c19baf85a2545f10fca18179d7c0a0233 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-24 description: > Array.prototype.reduceRight - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js index 3cfce6379c5b533aaa018728a4383ba3780369de..7622c9d2c822a60269f6bed278a7c12017ef8cd0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-25 description: > Array.prototype.reduceRight - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -32,6 +29,6 @@ function testcase() { }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && !testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert.sameValue(testResult2, false, 'testResult2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js index 142a862c7420aea333a191c43f66608ca2b1c651..4a17ebd34e4ed8709408691f668ff50eac950d1a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-3 description: > Array.prototype.reduceRight - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: 0 }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js index 030d8a606a6043ac237210fecc2d51d700b1c70d..d0b2df74e95d3df7f9f35edc2fda9b1456e51d8a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-4 description: > Array.prototype.reduceRight - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: +0 }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js index aa338f40a31fcd13c4432c0df5ac668fd7b424c3..1b3fe25fb5dc0b48fe291a525696ae0f3fedb9ce 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-5 description: > Array.prototype.reduceRight - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(preVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: -0 }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js index b1c732cd07be7a8176745c3bb107fd3d979ae585..318bfcda3a5d3784bf38e2a5dc029d5e6d5a0f42 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-6 description: > Array.prototype.reduceRight - value of 'length' is a number (value is positive) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 1: 11, 2: 9, length: 2 }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js index 204c9660f7de58425ea0532adeb43a02f1e2c110..56efb026174b153c889d73323ff0f5460e310fee 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-7 description: > Array.prototype.reduceRight - value of 'length' is a number (value is negative) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 1: 11, 2: 9, length: -4294967294 }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && !testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert.sameValue(testResult2, false, 'testResult2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js index 4dc2197b5fe2016f05a1244c63da02b1b90c379a..1134e4396de5ff7ecd71bc49bbe64485ec3e69ad 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-9 description: > Array.prototype.reduceRight - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: -Infinity }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js index b517a8a7738d1371e40f9334c1d82d8584a21c74..19fc59d5e7bd7667cef8b46f1d1b4a5347283e41 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.22-4-12 description: Array.prototype.reduceRight - 'callbackfn' is a function -includes: [runTestCase.js] ---*/ -function testcase() { - var initialValue = 0; function callbackfn(accum, val, idx, obj) { accum += val; return accum; } - return 20 === [11, 9].reduceRight(callbackfn, initialValue); - } -runTestCase(testcase); +assert.sameValue([11, 9].reduceRight(callbackfn, initialValue), 20, '[11, 9].reduceRight(callbackfn, initialValue)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js index f8915528823bb7177f881f10a27914b207b8899c..2b2f6782cce8eed62f49c3f832c5998093c306f7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-8-b-2 description: > Array.prototype.reduceRight - modifications to length don't change number of iterations in step 9 -includes: [runTestCase.js] ---*/ -function testcase() { var called = 0; function callbackfn(prevVal, curVal, idx, obj) { called++; @@ -27,6 +25,5 @@ function testcase() { var preVal = arr.reduceRight(callbackfn); - return preVal === 11 && called === 2; - } -runTestCase(testcase); +assert.sameValue(preVal, 11, 'preVal'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js index 8ca284eca19c7e4cde2d09e88ee0b6b9d594c6d9..27917b2189d4679a7b53453e26abba6c0a2ddb1c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-3 description: > Array.prototype.reduceRight - while loop is breaken once 'kPresent' is true -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; var testResult = false; var firstCalled = 0; @@ -43,6 +40,6 @@ function testcase() { arr.reduceRight(callbackfn); - return testResult && firstCalled === 1 && secondCalled === 1; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert.sameValue(firstCalled, 1, 'firstCalled'); +assert.sameValue(secondCalled, 1, 'secondCalled'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js index b1e9f1eb67462d7f27052c9d259231b7a7fa7f64..e1481c638993c5be66043c143f7b309c89c900a1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-ii-1 description: > Array.prototype.reduceRight - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = {}; function callbackfn(prevVal, curVal, idx, obj) { } @@ -23,6 +20,4 @@ function testcase() { configurable: true }); - return Array.prototype.reduceRight.call(obj, callbackfn) === "accumulator"; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn), "accumulator", 'Array.prototype.reduceRight.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js index ecfcefef933783cb848de59111b16e5ceee4539f..3f62c08179aeb4dcc47049edb35b260c9a265804 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-1 description: > Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -21,6 +18,5 @@ function testcase() { var obj = { 0: 0, 1: 1, length: 2 }; Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js index d93f4bc612cee17dc466363f1e621a414b3c30ca..5a7966fb0043cfad23c152c06b01b70d14c4d8b6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-10 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 2) { @@ -27,6 +25,5 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js index 88bd387c4d4c26e3a9cf37b7f2ec0ced8550a8b7..92443108d1823a101812b8e9eaf7260ee386e5e4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js index d07dce72a352b775ac0238fbdbc80fc017800913..4fbbe43431009e5c322207359e89351ce1cd806a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -42,6 +39,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js index 1acfd62d6c7e61b7e186c8a0287939ddf8e29b6b..41c5bfd933f4dddd2a34ea1e61c4fce3a4c17c36 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-15 description: > Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -34,6 +31,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js index 17f4934078818ddf8f630be9401c135141e1ba96..9caa8138d85c34021dc24057f0119066f83e4928 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-17 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,6 +23,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js index 24b897f6a47df9ea1961ab075e50123c2e3af3a6..a1812f67b6f1b4b4700a62eba63e55438ae7454c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-18 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,7 +23,5 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js index 736575450a9f6f5e8967f26be40bc6bb3fe2ba0e..343b2ebc4b0bea7243cf6511dd52aa0ba9a2bd32 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-2 description: > Array.prototype.reduceRight - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -21,6 +18,5 @@ function testcase() { var arr = [0, 1, 2]; arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js index 315b62b47142d78dbe02740b2ded6ff8c1a5c593..0e30a4fc8848b8075e9c81061ba0933315335cde 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-21 description: > Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -32,7 +29,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js index b6b05d57c30226a0e8f3448a9a038e4e5d0bf283..02301c4f29f73e42c7b829dce2806c6f1b28c1ae 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js index 23f2f3c5a5028436c4ccdf41f6bc8e4d5510334c..e9cd815639d1783ed6c2ed6d121eb81e116278af 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1, 2); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js index 6d66107441de4fdc5be91b6cfe38d25bdd315064..b6d6dea6779de624432ac4d4aa596b6513136dc4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 2) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js index 581113bbb271db91c13b420d6a9212ac69a6c15a..273109839ee65e29410f67ec888c4241ab323004 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-28 description: > Array.prototype.reduceRight applied to String object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -21,7 +18,5 @@ function testcase() { var str = new String("012"); Array.prototype.reduceRight.call(str, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js index 27daefa67f7c0cf369bd533a38514f3a284e7a37..57e342b465d7a0080117484bf9828b106b31bb18 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-29 description: > Array.prototype.reduceRight applied to Function object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -27,7 +24,5 @@ function testcase() { obj[2] = 2; Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js index 935260a5b61e602b2b6ed79b4a8646f16937bb47..45bb7057c501041cd471f8d34e9b74f947e1e2ed 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -29,7 +26,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js index d6b13e9193354c3787e9092781de9f2ac24e0e07..3b9ebd101f2e9997c0a43a1757a3bc2b7e92d2b2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-30 description: > Array.prototype.reduceRight - element changed by getter on current iteration is observed in subsequent iterations on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -40,6 +38,5 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js index 8cf6b99579f36545bb7c8f735471d06cb3da3341..ddc4f8150ed09669fedbaaf1a113e5fa10bfcb32 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-31 description: > Array.prototype.reduceRight - element changed by getter on current iteration is observed subsequetly on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -40,6 +38,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js index 17bcc4d6fccb8fef2245ef404e0f85e088f3b9a8..9f199971b6fff29657d3081854b6ddc830fbee8a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -41,6 +38,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js index dcf654c1a7500e64b95beb35d73eff7d9bec0774..17342b7ef6377a77fb5e085e657cd7c55fd68eac 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-7 description: > Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -25,6 +22,5 @@ function testcase() { var child = new Con(); Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js index ad91ba7eaaee82c4b0b52330286bf13f1ac84ee9..410109c09db3ba74c7769fa16576e4054a9f16d4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-9 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -27,7 +24,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js index 82a10b124c7002a61a970d36fd92ba0c4c07f74d..eaa7fb694418b058d376f225e993777dfe2ea007 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js @@ -8,10 +8,8 @@ description: > index is larger than array original length added to array after it is called, consider new elements which index is smaller than array length -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { arr[5] = 6; arr[2] = 3; @@ -19,6 +17,5 @@ function testcase() { } var arr = ['1', 2, , 4, '5']; - return arr.reduceRight(callbackfn) === "54321"; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), "54321", 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js index 88de6932969b776de934a8f8e9d20a803aa60268..f45416de0a1c4e6778b2175a0dc4a78542fb338b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-2 description: > Array.prototype.reduceRight considers new value of elements in array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { arr[3] = -2; @@ -19,8 +16,5 @@ function testcase() { } var arr = [1,2,3,4,5]; - if(arr.reduceRight(callbackfn) === 13) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), 13, 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js index 7e4f033ad248c89d073d3802939506527615c315..232d471c7205a7fcdfa59da642325bfbca2e0e81 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-4 description: > Array.prototype.reduceRight doesn't consider unvisited deleted elements when Array.length is decreased -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { arr.length = 2; @@ -18,8 +15,5 @@ function testcase() { } var arr = [1,2,3,4,5]; - if(arr.reduceRight(callbackfn) === 12 ) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), 12, 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js index 1dd88b4c412a04dd23fc93793d888431ffe431b4..3675b30e3e7d4367bb26c1d81fd486819cf2e7e7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-5 description: > Array.prototype.reduceRight - callbackfn not called for array with one element -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,7 +16,6 @@ function testcase() { } var arr = [1]; - if(arr.reduceRight(callbackfn) === 1 && callCnt === 0 ) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), 1, 'arr.reduceRight(callbackfn)'); +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js index a7f6135c4a401201abdd9c3f170d2d2bc798811b..470db318fdb2706fc744766886bf86a6b1075159 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-9-7 description: > Array.prototype.reduceRight not affect call when the array is deleted during the call -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { delete o.arr; return prevVal + curVal; @@ -17,6 +15,6 @@ function testcase() { var o = new Object(); o.arr = ['1', 2, 3, 4, 5]; - return o.arr.reduceRight(callbackfn) === "141" && !o.hasOwnProperty("arr"); - } -runTestCase(testcase); + +assert.sameValue(o.arr.reduceRight(callbackfn), "141", 'o.arr.reduceRight(callbackfn)'); +assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js index 3cc2181848a7dbd5ae22b4fa5bebf5a716513cc0..8bc875112c74406e4404868d32443d6b5f575f3b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-8 description: > Array.prototype.reduceRight - no observable effects occur if 'len' is 0 -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn() { accessed = true; @@ -27,6 +24,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, function () { }, "initialValue"); - return !accessed; - } -runTestCase(testcase); + +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js index ad3fa72ae9ce878d0cf0082e6d081a12f4ffc437..df3e4ba84ded79b43234a08d62e3bd3535cfa9c5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-9-9 description: > Array.prototype.reduceRight - modifications to length will change number of iterations -includes: [runTestCase.js] ---*/ -function testcase() { var called = 0; function callbackfn(preVal, val, idx, obj) { called++; @@ -25,6 +23,4 @@ function testcase() { arr.reduceRight(callbackfn, "initialValue"); - return called === 3; - } -runTestCase(testcase); +assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js index 3879bbd99a7f93d92bcf7405dddceeab39400346..992aa21bae936c022ddffb2bd77623db201d2079 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js @@ -6,18 +6,13 @@ es5id: 15.4.4.22-9-b-1 description: > Array.prototype.reduceRight returns initialvalue when Array is empty and initialValue is not present -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { } var arr = new Array(10); - if(arr.reduceRight(callbackfn,5) === 5) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn,5), 5, 'arr.reduceRight(callbackfn,5)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js index cdfe5e12f4af55156db3e5adcfe9b2ecb07da1aa..be41b733826e8004024a228042a126e5692731e8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-14 description: > Array.prototype.reduceRight - decreasing length of array in step 8 causes deleted index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { arr.reduceRight(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js index a2f3a8c64753e24d3b72ab7bd40de6f191850ef1..091eb3661eebf0b58e665c76967856c5d017a473 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - decreasing length of array in step 8 does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -39,6 +36,4 @@ function testcase() { arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js index a2ca32f32b55ab14cd5a01f8c42ac88d13d4fd35..96fff8c1f43641391437ff4833a3ae2e797c02ea 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-17 description: > Array.prototype.reduceRight - properties added into own object are visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js index 4ab07d3c6dcc1c0dadc1ef351a12edbf83388c69..1dd28c06f94191c7f905364f01b511a27da7601a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-18 description: > Array.prototype.reduceRight - properties added into own object are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js index 716e50d75e37fa38fad12b88572c4e9e74ebc371..67b5ecf3ba582294d213989c94b831ea8fddc9e0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-2 description: > Array.prototype.reduceRight - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -31,6 +28,4 @@ function testcase() { Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js index 77a29148b2fcd67aca4f0c1d723b416eb15cda8c..3fb93ba78386a476dc9da4699ba0b382f673401a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-21 description: > Array.prototype.reduceRight - deleting own property causes deleted index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js index 5957f5538d144fbdd8a4c4c62c9a1a31c34d56a0..d46554ee2cb3403655184fae7c3a0a9707040baf 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-22 description: > Array.prototype.reduceRight - deleting own property causes deleted index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js index 53ccc551bd9f1fe481ddf0f727666f5285dca4fe..d31df75af4bb899e1a7bf3bbe335efd375dfdbe4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-27 description: > Array.prototype.reduceRight - decreasing length of array causes deleted index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { arr.reduceRight(callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js index d3c94f0027aea1584b6176b3c9104df17a86ab7c..05f5fa817d331e0ca0b9650ad8b440eee52dfe9d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - decreasing length of array does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -39,6 +36,4 @@ function testcase() { arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js index 4d33577284bc2ac0c55f819321c8aa7576f7fb55..63fdfed8a22cadad2aa9eaeaaaa9299ba4cc3442 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-3 description: > Array.prototype.reduceRight - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return accessed && testResult; - } -runTestCase(testcase); +assert(accessed, 'accessed !== true'); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js index 986b88087cfa0f31f879538889ffd684d8a5a6b6..3388f8df67a67daf97044b5230c137ebab1d7d6a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-4 description: > Array.prototype.reduceRight - properties added into own object in step 8 can be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(preVal, curVal, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js index ee279141b3cbf64ad98b80d2bf2886f888a36015..4efb966402483030b7a15c06e3603fbf45801103 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-5 description: > Array.prototype.reduceRight - properties added into own object in step 8 can be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(preVal, curVal, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js index d797f922f9b11a4aaaaa356baa5d3bffec88cb53..eee9c4bb0267c94d3ee60dece5c6212295c97ed5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - deleting own property in step 8 causes deleted index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -40,6 +37,6 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js index 68109d41420f07ada33ab9712a81268b42af74b1..6735bc22e7039cff3d8c08af44273d438c1ef77c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-9 description: > Array.prototype.reduceRight - deleting own property in step 8 causes deleted index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js index bcf5d058451ade38313fc9871a26d83e7213ac00..d9a79fecbabb0303f0f99d3ecdae5b626460b871 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-1 description: > Array.prototype.reduceRight - callbackfn not called for indexes never been assigned values -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,7 +17,6 @@ function testcase() { var arr = new Array(10); arr[0] = arr[1] = undefined; //explicitly assigning a value - if( arr.reduceRight(callbackfn) === undefined && callCnt === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), undefined, 'arr.reduceRight(callbackfn)'); +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js index 65588b49a430a3f21bd30a06d22100a2e26f6be0..bb0198b254eae3b8c8cf4bb9b044bfa5a39c1ade 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-1 description: > Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js index a7955ab8963f7b7899529f32b48048c2a1d1966b..9cda2077135c66229599c38ada32bc02bba252dc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-10 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -28,6 +25,5 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js index d73974d8049714e4ccbdc9353a07f44e5ffadf23..893586207af71a04f456a5139c2bb5c5ec91d255 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js index 72267025668324ef541213682744b415cf43c2a7..67fce876910cccb91f23110cf2727f8990c1a3cd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -42,6 +39,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js index 5a8d7d2cdb30f9373c5b931143ceb655d5e3104f..52c6a0e5c18a06a9e22910404aebf6f53ad98726 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-15 description: > Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -34,6 +31,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js index ab3e8046808e1c0a5091c21c6222473e918a17d9..d7729f5452b309568be86623ab97c3cb3e2d2c19 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-17 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,6 +23,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js index 5abc6ddb427b838fe91d412c20725b90ae856184..8817803b706dac845a0437dc95ddba31fbc2274b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-18 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,7 +23,5 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult; - - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js index a93f683d7d4e1dd66aca4ba8eaff862bd62c3c7e..199238300e0181101d994d3d2965efd00918511d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-2 description: > Array.prototype.reduceRight - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -20,6 +17,5 @@ function testcase() { var arr = [0, 1, 2]; arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js index add4fb71e63b7126ff1b64960c643df16ffc7365..19bdc79e884840982294ab3be0d80b0bda5cb580 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-21 description: > Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -32,8 +29,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js index 9ae20dd8a4ae10c0dccff27e7e571d55afd50e9e..84ff5ae5e1c608eb487dd0806becb6fc2327b1bd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js index ba1307f396e49810c2c727156f999183ac7773bd..865581ff96faaa3f40007e3586c121172377cc1c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 2) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1, 2); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js index 55937d3b93de03b4809a8c6531df31328c8e8643..51beff004709569825bd58fd2dad5a51ea7f33d0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 3) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js index c082b853cba88491f6f304a556cd176f63159686..9a4b836233454609e2f17fa9bd482c3277ec601a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-28 description: > Array.prototype.reduceRight applied to String object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -20,7 +17,5 @@ function testcase() { var str = new String("012"); Array.prototype.reduceRight.call(str, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js index cc0154be82b423be2c848945b52f0523e17f0bf3..3d7644227f3ec3681dcf36593594dcdc81f47fdd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-29 description: > Array.prototype.reduceRight applied to Function object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -28,6 +25,5 @@ function testcase() { obj[3] = 3; Array.prototype.reduceRight.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js index 50f3852642cb67e8b8b8c83dc4fab5289bb12a8e..8d23d06ad37738cdaba4692f7c3a253072a4a8e0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -29,7 +26,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js index 0e506efe4abe3b7650c1762b923046ad7ba1fd91..daafd5efbeef2cfca1bdf36b622108ca54e1a7a0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-30 description: > Array.prototype.reduceRight - element changed by getter on previous iterations is observed on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -41,6 +38,5 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js index 77d15615d1555af70e59f11ed0e0f64c87908689..6c43d5a655c5561d53c7b23680e71134bbb76dab 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-31 description: > Array.prototype.reduceRight - element changed by getter on previous iterations is observed on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -41,7 +38,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js index 84991dc580a382ff59377c2dab1cc7ec716b4703..4eac8d609f7555a7027b00cfa6b9db6d74f12df2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -40,6 +37,5 @@ function testcase() { child[1] = "1"; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js index 56e134c9b7b1ea02796179fcb8b138104670b4d1..4a2962f614a23051863e919ee0fe2e7c4da0018c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-7 description: > Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,6 +23,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js index 9ba7519297f6b7ebe839e0ddf10afec5de98b4a2..fd41b95a26d8fc86f479df9860481af97436c144 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-9 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -27,7 +24,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js index c8f33da1abfe93f6e87d93135a1e41dc1b07d336..4e00f79f1927419b2e969133439a9e1a30c74609 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-1 description: > Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue not passed) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { if(idx+1 < obj.length && obj[idx] === curVal && obj[idx+1] === prevVal) @@ -20,7 +17,5 @@ function testcase() { } var arr = [0,1,true,null,new Object(),"five"]; - if( arr.reduceRight(callbackfn) === 0) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), 0, 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js index 4e05b457bf61f306fac2beaf8dd1ddd9dd80b6ff..2edd35e2211c7ab3596eab0b52615646a7b295a6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-10 description: > Array.prototype.reduceRight - callbackfn is called with 1 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(prevVal) { @@ -18,6 +15,5 @@ function testcase() { return prevVal; } - return [11, 12].reduceRight(callbackfn, 100) === 100 && 2 === called; - } -runTestCase(testcase); +assert.sameValue([11, 12].reduceRight(callbackfn, 100), 100, '[11, 12].reduceRight(callbackfn, 100)'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js index 412717055e18b05ca649958e2990b083a79e9427..c73421a5f0341a0bd70ca99f96b63ef8bdc125bb 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-11 description: > Array.prototype.reduceRight - callbackfn is called with 2 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal) { @@ -20,6 +17,5 @@ function testcase() { return curVal > 10; } - return [11].reduceRight(callbackfn, 100) === true && testResult; - } -runTestCase(testcase); +assert.sameValue([11].reduceRight(callbackfn, 100), true, '[11].reduceRight(callbackfn, 100)'); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js index e73aff9ac0a8060ccfb9cefff59dbe8731c4a7d5..6f79a51ad348e469ece0ec855e1cd6cd1184e831 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-12 description: > Array.prototype.reduceRight - callbackfn is called with 3 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var arr = [11, 12, 13]; var initVal = 6.99; @@ -22,6 +19,5 @@ function testcase() { return curVal > 10 && arguments[3][idx] === curVal; } - return arr.reduceRight(callbackfn, initVal) === true && testResult; - } -runTestCase(testcase); +assert.sameValue(arr.reduceRight(callbackfn, initVal), true, 'arr.reduceRight(callbackfn, initVal)'); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js index 4ff0a054b65a067b00c519b8f5d8d2bc263671a8..e667c25a7221742645e3132f5c30582c535b677d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-13 description: > Array.prototype.reduceRight - callbackfn is called with 4 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [11, 12, 13]; var initVal = 6.99; var testResult = false; @@ -22,6 +19,5 @@ function testcase() { return curVal > 10 && obj[idx] === curVal; } - return arr.reduceRight(callbackfn, initVal) === true && testResult; - } -runTestCase(testcase); +assert.sameValue(arr.reduceRight(callbackfn, initVal), true, 'arr.reduceRight(callbackfn, initVal)'); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js index 4aa8692f7c3085e53e94fb891a0fdd9aaa143d09..97fc6ed617ad29bbd9990d18da999e3852f0896b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.22-9-c-ii-14 description: Array.prototype.reduceRight - callbackfn uses arguments -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return arguments[0] === 100 && arguments[3][arguments[2]] === arguments[1]; } - return [11].reduceRight(callbackfn, 100) === true; - } -runTestCase(testcase); +assert.sameValue([11].reduceRight(callbackfn, 100), true, '[11].reduceRight(callbackfn, 100)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js index 8b65dd94b8e4fb1cb04902e1ea0abebd8369104d..1f549796b3811499224baf234a2513f366af4f36 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-16 description: > Array.prototype.reduceRight - non-indexed properties are not called on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -21,6 +18,5 @@ function testcase() { var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return !testResult; - } -runTestCase(testcase); + +assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js index ca51f9413780a77d0367dc9f6b560328b62769ae..9c476f63e884cc428d24d6af6ec25ed40a2445bf 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-17 description: > Array.prototype.reduceRight - 'accumulator' used for current iteration is the result of previous iteration on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [11, 12, 13]; var testResult = true; var initVal = 6.99; @@ -26,6 +23,4 @@ function testcase() { arr.reduceRight(callbackfn, initVal); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js index 982112560987b522a36452fc217b870da85a8919..ead8d933cc8c8e1ef381b55dbd715695d3e9a0d8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - 'accumulator' used for first iteration is the value of 'initialValue' when it is present on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [11, 12]; var testResult = false; var initVal = 6.99; @@ -25,6 +22,4 @@ function testcase() { arr.reduceRight(callbackfn, initVal); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js index 79ede14ee7b6a9259fc911e896bcd8f88b541ba3..3fa250924570ac103377abeafa9297711e888aff 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - value of 'accumulator' used for first iteration is the value of max index property which is not undefined when 'initialValue' is not present on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [11, 12, 13]; var testResult = false; @@ -23,6 +20,4 @@ function testcase() { } arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js index 49017251a1cf743a2786efaf436d5137067c6a5c..b794ced025d4b4b15ecb387c12444add69890d77 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-9-c-ii-2 description: > Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue passed) -includes: [runTestCase.js] ---*/ -function testcase() { var bParCorrect = false; var arr = [0, 1, true, null, new Object(), "five"]; var initialValue = 5.5; @@ -22,6 +20,5 @@ function testcase() { else return false; } - return arr.reduceRight(callbackfn, initialValue) === 0; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn, initialValue), 0, 'arr.reduceRight(callbackfn, initialValue)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js index e3e1c76027fb7688966484f68405f50773461856..d0b5284e451eb385a28ea7cca586e6fd70018ed7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-9-c-ii-20 description: Array.prototype.reduceRight - undefined can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, undefined) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, undefined), true, 'Array.prototype.reduceRight.call(obj, callbackfn, undefined)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js index c15d607ef1d34d3c807a93299e3433507086ce66..e1b4834265bcb7e018d0845b6bb81761fe4a678e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-9-c-ii-21 description: Array.prototype.reduceRight - null can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, null) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, null), true, 'Array.prototype.reduceRight.call(obj, callbackfn, null)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js index 3f164b020066f3b5ac4fb6ac7e645e4850aa6383..f3455c6c63330bc14700ae0de5a554f421aafd71 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-22 description: > Array.prototype.reduceRight - boolean primitive can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, false) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, false), true, 'Array.prototype.reduceRight.call(obj, callbackfn, false)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js index 6819cd576cbe2348beeb8e2f5a695c6e2027e9d4..d083889704379c461fa55a544e364bc62cce93c1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-23 description: > Array.prototype.reduceRight - number primitive can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, 12) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 12), true, 'Array.prototype.reduceRight.call(obj, callbackfn, 12)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js index 3a4bc24841db443318d64d63691e137a3cdab85a..004bd3036a12c2c0fcc9e2c429e42da9cb935e95 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-24 description: > Array.prototype.reduceRight - string primitive can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, "hello_") === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, "hello_"), true, 'Array.prototype.reduceRight.call(obj, callbackfn, "hello_")'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js index 6d66283abcc59166f0fd725a63efed531bd78cbd..e05a52ac2385303b4050e5463be2b69d93439819 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-25 description: > Array.prototype.reduceRight - Function Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objFunction = function () { }; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objFunction) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objFunction), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objFunction)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js index 3b655e8de7e8115609a6cc2f01120ccc777c893d..e698c3e1d92a50b489826eec7e95e547aa80e579 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-26 description: > Array.prototype.reduceRight - Array Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objArray = []; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objArray) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objArray), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objArray)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js index 6c79e74354c022d2162d3802167e5caf4dc434e5..1360396fedb69d1d7bddcdc4a4626c3c68694869 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-27 description: > Array.prototype.reduceRight - String Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objString = new String(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objString) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objString), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objString)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js index cea9bfd3cdfd7aab5c6a9fc6de6dd008227ea1a0..7ea32fc865459cbc7b8e9b981fa46a688de1875f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-28 description: > Array.prototype.reduceRight - Boolean Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objBoolean = new Boolean(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objBoolean) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objBoolean), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objBoolean)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js index f8474cdd09759812c1b1acb8afe45403e3f2fa94..d1c4a4f62c869278c13aab86045c0349d1ad8e3d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-29 description: > Array.prototype.reduceRight - Number Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objNumber = new Number(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objNumber) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objNumber), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objNumber)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js index aa6dc8135c62fa245b2c0dbc9969c452292ef9c0..02547b474b046e957dc35a7645e2cec82cbe4202 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-9-c-ii-3 description: Array.prototype.reduceRight - callbackfn takes 4 arguments -includes: [runTestCase.js] ---*/ -function testcase() { - var bCalled = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,7 +16,6 @@ function testcase() { return false; } var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.reduceRight(callbackfn,true) === true && bCalled === true) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn,true), true, 'arr.reduceRight(callbackfn,true)'); +assert.sameValue(bCalled, true, 'bCalled'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js index abe7bec838e381d31f9ce3b1d2c27802c82cb574..be1537a764cb5c15dea5ee48ef4b9081f950194a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-30 description: > Array.prototype.reduceRight - the Math Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, Math) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, Math), true, 'Array.prototype.reduceRight.call(obj, callbackfn, Math)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js index 8e994aaeb91406a4dc052bef566e43db6f8a226e..e23fb04374dfa051e35f61b46bd3cc64ffdf650d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-31 description: > Array.prototype.reduceRight - Date Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objDate = new Date(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objDate) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objDate), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objDate)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js index ad127bf8a3379e984362bd31f8b724ef651b0e2b..f37b1de713bc3dbd49471d4c95a2fa4be83a690c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-32 description: > Array.prototype.reduceRight - RegExp Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objRegExp = new RegExp(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objRegExp) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objRegExp), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objRegExp)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js index 7315186644c2410f89b3e587b7bc367dfa9599aa..43a59ec99735bcf727c836da1b3590e0b0493d12 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-9-c-ii-33 description: Array.prototype.reduceRight - the JSON can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, JSON) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, JSON), true, 'Array.prototype.reduceRight.call(obj, callbackfn, JSON)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js index 93e5d7551ff954afa182c4b1160deeb45a68568d..4d3d9fa0e5eb31cb0d89f8462198c0fb93e4aaf7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-34 description: > Array.prototype.reduceRight - Error Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objError = new RangeError(); function callbackfn(prevVal, curVal, idx, obj) { @@ -21,6 +18,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objError) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objError), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objError)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js index 4103b09c6f2a06c4b96af30975ed4a811cb7e611..1c58b3f921058e3a7fb4b7738ac6d52de6b2b89d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-35 description: > Array.prototype.reduceRight - the Arguments object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var arg; @@ -25,6 +22,5 @@ function testcase() { arg = arguments; }(10, 11, 12, 13)); - return Array.prototype.reduceRight.call(obj, callbackfn, arg) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, arg), true, 'Array.prototype.reduceRight.call(obj, callbackfn, arg)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js index a13cf668d7814559d61a082677dc14776bd27e7e..6eecc246ba90a140191f7dd2650d35781e974817 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js @@ -6,13 +6,9 @@ es5id: 15.4.4.22-9-c-ii-37 description: > Array.prototype.reduceRight - the global object can be used as accumulator -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -21,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject()) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject()), true, 'Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject())'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js index b446ff6ed327db241b2e0ef2fef1532a124307a9..93c4a012c545bb37582a24afbd8bcdb31f96458c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduceRight - undefined passed as thisValue to strict callbackfn flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var innerThisCorrect = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +17,5 @@ function testcase() { return true; } [0].reduceRight(callbackfn,true); - return innerThisCorrect; - } -runTestCase(testcase); + +assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js index 852f6336c70ab19c89fdcff4d4cc223483a76807..3057e56890ca0fe3c256764b7fd48567d314cde9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-4 description: > Array.prototype.reduceRight - k values are passed in acending numeric order -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3, 4, 5]; var lastIdx = arr.length - 1; var accessed = false; @@ -25,6 +22,6 @@ function testcase() { } } arr.reduceRight(callbackfn, 1); - return result && accessed; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js index 426b0e01c7c58df99d887fd708d2fede9b0a84c4..226eb812a125425eb314f2d64589c515a5873788 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-9-c-ii-5 description: > Array.prototype.reduceRight - k values are accessed during each iteration and not prior to starting the loop on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var arr = [11, 12, 13, 14]; var kIndex = []; var result = true; @@ -31,6 +29,6 @@ function testcase() { } arr.reduceRight(callbackfn, 1); - return result && called === 4; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js index c8bf8bd198f32979817280ccd08e456b10eb33ee..0518afbc4c3d222973cdacc44669f54d4c5405a0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-8 description: > Array.prototype.reduceRight - element changed by callbackfn on previous iterations is observed -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var obj = { 0: 11, 1: 12, length: 2 }; function callbackfn(prevVal, curVal, idx, obj) { @@ -21,6 +18,5 @@ function testcase() { return curVal > 10; } - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === false && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), false, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js index 7b3baa65f839b7ac43a886a917ab0cdc3faad165..f0d0a11ca4674eb5222fbdc4b39f802cec5ccd8c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-9 description: > Array.prototype.reduceRight - callbackfn is called with 0 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn() { @@ -18,6 +15,5 @@ function testcase() { return true; } - return [11, 12].reduceRight(callbackfn, 11) === true && 2 === called; - } -runTestCase(testcase); +assert.sameValue([11, 12].reduceRight(callbackfn, 11), true, '[11, 12].reduceRight(callbackfn, 11)'); +assert.sameValue(called, 2, 'called');