From 174f24b2f3f371ae0c816241f094753442a292d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= <andre.bargull@gmail.com> Date: Thu, 6 Aug 2015 18:19:31 +0200 Subject: [PATCH] Replace runTestCase with assert helpers [test/built-ins/Array/prototype/reduceRight] --- .../prototype/reduceRight/15.4.4.22-0-1.js | 9 ++------- .../prototype/reduceRight/15.4.4.22-0-2.js | 8 +------- .../prototype/reduceRight/15.4.4.22-1-11.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-1-12.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-1-14.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-1-15.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-1-4.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-1-6.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-1-7.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-1-8.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-1-9.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-10-1.js | 18 +++++------------- .../prototype/reduceRight/15.4.4.22-10-2.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-10-3.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-10-4.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-10-5.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-10-6.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-10-7.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-10-8.js | 11 +---------- .../prototype/reduceRight/15.4.4.22-2-1.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-10.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-11.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-13.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-14.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-17.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-19.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-2.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-3.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-5.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-6.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-7.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-8.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-2-9.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-3-1.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-3-10.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-3-11.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-12.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-13.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-14.js | 9 ++------- .../prototype/reduceRight/15.4.4.22-3-15.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-16.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-17.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-18.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-3-19.js | 10 ++++------ .../prototype/reduceRight/15.4.4.22-3-2.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-3-20.js | 10 ++++------ .../prototype/reduceRight/15.4.4.22-3-21.js | 11 +++++------ .../prototype/reduceRight/15.4.4.22-3-23.js | 11 +++++------ .../prototype/reduceRight/15.4.4.22-3-24.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-25.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-3.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-3-4.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-3-5.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-3-6.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-7.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-3-9.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-4-12.js | 7 +------ .../prototype/reduceRight/15.4.4.22-8-b-2.js | 7 ++----- .../prototype/reduceRight/15.4.4.22-8-b-3.js | 9 +++------ .../reduceRight/15.4.4.22-8-b-ii-1.js | 7 +------ .../reduceRight/15.4.4.22-8-b-iii-1-1.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-10.js | 7 ++----- .../reduceRight/15.4.4.22-8-b-iii-1-11.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-13.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-15.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-17.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-18.js | 7 +------ .../reduceRight/15.4.4.22-8-b-iii-1-2.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-21.js | 7 +------ .../reduceRight/15.4.4.22-8-b-iii-1-25.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-26.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-27.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-28.js | 7 +------ .../reduceRight/15.4.4.22-8-b-iii-1-29.js | 7 +------ .../reduceRight/15.4.4.22-8-b-iii-1-3.js | 7 +------ .../reduceRight/15.4.4.22-8-b-iii-1-30.js | 7 ++----- .../reduceRight/15.4.4.22-8-b-iii-1-31.js | 7 ++----- .../reduceRight/15.4.4.22-8-b-iii-1-5.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-7.js | 8 ++------ .../reduceRight/15.4.4.22-8-b-iii-1-9.js | 7 +------ .../prototype/reduceRight/15.4.4.22-9-1.js | 7 ++----- .../prototype/reduceRight/15.4.4.22-9-2.js | 10 ++-------- .../prototype/reduceRight/15.4.4.22-9-4.js | 10 ++-------- .../prototype/reduceRight/15.4.4.22-9-5.js | 10 +++------- .../prototype/reduceRight/15.4.4.22-9-7.js | 8 +++----- .../prototype/reduceRight/15.4.4.22-9-8.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-9.js | 6 +----- .../prototype/reduceRight/15.4.4.22-9-b-1.js | 9 ++------- .../prototype/reduceRight/15.4.4.22-9-b-14.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-b-16.js | 7 +------ .../prototype/reduceRight/15.4.4.22-9-b-17.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-b-18.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-b-2.js | 7 +------ .../prototype/reduceRight/15.4.4.22-9-b-21.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-9-b-22.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-9-b-27.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-b-29.js | 7 +------ .../prototype/reduceRight/15.4.4.22-9-b-3.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-b-4.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-b-5.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-b-8.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-9-b-9.js | 9 +++------ .../prototype/reduceRight/15.4.4.22-9-c-1.js | 10 +++------- .../prototype/reduceRight/15.4.4.22-9-c-i-1.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-10.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-11.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-13.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-15.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-17.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-18.js | 9 ++------- .../prototype/reduceRight/15.4.4.22-9-c-i-2.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-21.js | 8 +------- .../reduceRight/15.4.4.22-9-c-i-25.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-26.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-27.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-28.js | 7 +------ .../reduceRight/15.4.4.22-9-c-i-29.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-c-i-3.js | 7 +------ .../reduceRight/15.4.4.22-9-c-i-30.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-i-31.js | 7 +------ .../prototype/reduceRight/15.4.4.22-9-c-i-5.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-c-i-7.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-9-c-i-9.js | 7 +------ .../reduceRight/15.4.4.22-9-c-ii-1.js | 9 ++------- .../reduceRight/15.4.4.22-9-c-ii-10.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-11.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-12.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-13.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-14.js | 7 +------ .../reduceRight/15.4.4.22-9-c-ii-16.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-17.js | 7 +------ .../reduceRight/15.4.4.22-9-c-ii-18.js | 7 +------ .../reduceRight/15.4.4.22-9-c-ii-19.js | 7 +------ .../reduceRight/15.4.4.22-9-c-ii-2.js | 7 ++----- .../reduceRight/15.4.4.22-9-c-ii-20.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-21.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-22.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-23.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-24.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-25.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-26.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-27.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-28.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-29.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-3.js | 10 +++------- .../reduceRight/15.4.4.22-9-c-ii-30.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-31.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-32.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-33.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-34.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-35.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-37.js | 11 +++-------- .../reduceRight/15.4.4.22-9-c-ii-4-s.js | 7 ++----- .../reduceRight/15.4.4.22-9-c-ii-4.js | 9 +++------ .../reduceRight/15.4.4.22-9-c-ii-5.js | 8 +++----- .../reduceRight/15.4.4.22-9-c-ii-8.js | 8 ++------ .../reduceRight/15.4.4.22-9-c-ii-9.js | 8 ++------ 157 files changed, 324 insertions(+), 965 deletions(-) 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 f914b6a16e..1613735e85 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 5b95666576..21322d512d 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 f768d03c49..3d6a69d735 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 5b2d15b994..531dfb8597 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 1e3ef17dea..1c65e3fa60 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 c0c1c36552..bfe6aa0dab 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 2403400861..1a639b1e20 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 d5334eb3a9..91c02f09ca 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 417e0e8a3d..d23acbedc2 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 6fa8455730..1650a9de10 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 61ff346e10..79784772b5 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 475c44bc71..d458395b04 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 b8a31890f1..024efedac2 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 a0b39bbdc3..906e06b920 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 0ac2a1f0b6..23d5cd9b0e 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 1e573abce8..d6368c59d5 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 cbac727f45..6d1c112379 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 eee28a289d..68fc333195 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 5730cf9505..7abfbb823b 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 052f795dcb..cb5037697d 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 fe847a1ec3..75c3c1b79c 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 b6eed8c81b..73e619df97 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 198db20e9d..ccd5f56f73 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 764950ced9..b07a6de91c 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 79f11b3949..a3e0221c94 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 14803ecd3a..5df51113a8 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 2dbfe579e6..210099b9e6 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 717fe7466c..8db6d7d97f 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 10c05bdd2f..4a5c6a06f8 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 8a12b9cb3b..bfd55e5b0b 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 e0ee6f7642..92fb53708d 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 962edb7cda..3b27ced48e 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 f5c121525f..d76e880b48 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 76f1b67675..6b77d18661 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 0e5d728991..26880df418 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 aaaf3ff6bf..d51815e91d 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 7ef635a545..4db2dbc3b0 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 220c7cf4bc..ef58e583ce 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 d96fa4f74a..d02dc0c293 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 f00c19fad1..42031b3830 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 535a258a33..90a64372f7 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 fc3e7a6a6a..1274b3e05f 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 815efbfa35..5830006354 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 4b60d8a60f..26e76ad646 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 e4edc8df68..a7bbc28ad3 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 8dbef1c07a..3ef3882a72 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 8f28247bcb..279afa06dd 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 8d5a1dcb3c..29afac626d 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 63c6dc7cc4..3c1b823c19 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 3cfce6379c..7622c9d2c8 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 142a862c74..4a17ebd34e 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 030d8a606a..d0b2df74e9 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 aa338f40a3..1b3fe25fb5 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 b1c732cd07..318bfcda3a 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 204c9660f7..56efb02617 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 4dc2197b5f..1134e4396d 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 b517a8a773..19fc59d5e7 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 f891552882..2b2f6782cc 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 8ca284eca1..27917b2189 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 b1e9f1eb67..e1481c6389 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 ecfcefef93..3f62c08179 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 d93f4bc612..5a7966fb00 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 88bd387c4d..92443108d1 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 d07dce72a3..4fbbe43431 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 1acfd62d6c..41c5bfd933 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 17f4934078..9caa8138d8 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 24b897f6a4..a1812f67b6 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 736575450a..343b2ebc4b 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 315b62b471..0e30a4fc88 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 b6b05d57c3..02301c4f29 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 23f2f3c5a5..e9cd815639 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 6d66107441..b6d6dea677 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 581113bbb2..273109839e 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 27daefa67f..57e342b465 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 935260a5b6..45bb7057c5 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 d6b13e9193..3b9ebd101f 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 8cf6b99579..ddc4f8150e 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 17bcc4d6fc..9f199971b6 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 dcf654c1a7..17342b7ef6 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 ad91ba7eaa..410109c09d 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 82a10b124c..eaa7fb6944 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 88de693296..f45416de0a 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 7e4f033ad2..232d471c72 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 1dd88b4c41..3675b30e3e 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 a7f6135c4a..470db318fd 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 3cc2181848..8bc875112c 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 ad3fa72ae9..df3e4ba84d 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 3879bbd99a..992aa21bae 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 cdfe5e12f4..be41b73382 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 a2f3a8c647..091eb3661e 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 a2ca32f32b..96fff8c1f4 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 4ab07d3c6d..1dd28c06f9 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 716e50d75e..67b5ecf3ba 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 77a29148b2..3fb93ba783 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 5957f5538d..d46554ee2c 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 53ccc551bd..d31df75af4 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 d3c94f0027..05f5fa817d 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 4d33577284..63fdfed8a2 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 986b88087c..3388f8df67 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 ee279141b3..4efb966402 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 d797f922f9..eee9c4bb02 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 68109d4142..6735bc22e7 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 bcf5d05845..d9a79fecba 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 65588b49a4..bb0198b254 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 a7955ab896..9cda207713 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 d73974d804..893586207a 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 7226702566..67fce87691 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 5a8d7d2cdb..52c6a0e5c1 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 ab3e804680..d7729f5452 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 5abc6ddb42..8817803b70 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 a93f683d7d..199238300e 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 add4fb71e6..19bdc79e88 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 9ae20dd8a4..84ff5ae5e1 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 ba1307f396..865581ff96 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 55937d3b93..51beff0047 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 c082b853cb..9a4b836233 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 cc0154be82..3d7644227f 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 50f3852642..8d23d06ad3 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 0e506efe4a..daafd5efbe 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 77d15615d1..6c43d5a655 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 84991dc580..4eac8d609f 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 56e134c9b7..4a2962f614 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 9ba7519297..fd41b95a26 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 c8f33da1ab..4e00f79f19 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 4e05b457bf..2edd35e221 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 412717055e..c73421a5f0 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 e73aff9ac0..6f79a51ad3 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 4ff0a054b6..e667c25a72 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 4aa8692f7c..97fc6ed617 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 8b65dd94b8..1f549796b3 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 ca51f94137..9c476f63e8 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 9821125609..ead8d933cc 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 79ede14ee7..3fa2509245 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 49017251a1..b794ced025 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 e3e1c76027..d0b5284e45 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 c15d607ef1..e1b4834265 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 3f164b0200..f3455c6c63 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 6819cd576c..d083889704 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 3a4bc24841..004bd3036a 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 6d66283abc..e05a52ac23 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 3b655e8de7..e698c3e1d9 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 6c79e74354..1360396fed 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 cea9bfd3cd..7ea32fc865 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 f8474cdd09..d1c4a4f62c 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 aa6dc8135c..02547b474b 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 abe7bec838..be1537a764 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 8e994aaeb9..e23fb04374 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 ad127bf8a3..f37b1de713 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 7315186644..43a59ec997 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 93e5d7551f..4d3d9fa0e5 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 4103b09c6f..1c58b3f921 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 a13cf668d7..6eecc246ba 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 b446ff6ed3..93c4a012c5 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 852f6336c7..3057e56890 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 426b0e01c7..226eb812a1 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 c8bf8bd198..0518afbc4c 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 7b3baa65f8..f0d0a11ca4 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'); -- GitLab