From 976a687b27a696a9954180501109ef4a3b05eddb 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:18:33 +0200 Subject: [PATCH] Replace runTestCase with assert helpers [test/built-ins/Array/prototype/map] --- .../Array/prototype/map/15.4.4.19-0-1.js | 9 ++------- .../Array/prototype/map/15.4.4.19-0-2.js | 8 +------- .../Array/prototype/map/15.4.4.19-1-11.js | 6 +----- .../Array/prototype/map/15.4.4.19-1-12.js | 6 +----- .../Array/prototype/map/15.4.4.19-1-14.js | 6 +----- .../Array/prototype/map/15.4.4.19-1-15.js | 6 +----- .../Array/prototype/map/15.4.4.19-1-4.js | 7 ++----- .../Array/prototype/map/15.4.4.19-1-6.js | 7 ++----- .../Array/prototype/map/15.4.4.19-1-7.js | 8 +++----- .../Array/prototype/map/15.4.4.19-1-8.js | 8 +++----- .../Array/prototype/map/15.4.4.19-1-9.js | 7 ++----- .../Array/prototype/map/15.4.4.19-2-1.js | 6 +----- .../Array/prototype/map/15.4.4.19-2-10.js | 6 +----- .../Array/prototype/map/15.4.4.19-2-11.js | 7 +------ .../Array/prototype/map/15.4.4.19-2-13.js | 7 +------ .../Array/prototype/map/15.4.4.19-2-14.js | 7 +------ .../Array/prototype/map/15.4.4.19-2-17.js | 6 +----- .../Array/prototype/map/15.4.4.19-2-19.js | 6 +----- .../Array/prototype/map/15.4.4.19-2-2.js | 7 ++----- .../Array/prototype/map/15.4.4.19-2-3.js | 6 +----- .../Array/prototype/map/15.4.4.19-2-5.js | 6 +----- .../Array/prototype/map/15.4.4.19-2-6.js | 6 +----- .../Array/prototype/map/15.4.4.19-2-7.js | 6 +----- .../Array/prototype/map/15.4.4.19-2-8.js | 6 +----- .../Array/prototype/map/15.4.4.19-2-9.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-1.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-10.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-11.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-12.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-13.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-15.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-16.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-17.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-18.js | 7 +------ .../Array/prototype/map/15.4.4.19-3-19.js | 7 +------ .../Array/prototype/map/15.4.4.19-3-2.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-20.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-21.js | 9 +++------ .../Array/prototype/map/15.4.4.19-3-23.js | 9 +++------ .../Array/prototype/map/15.4.4.19-3-24.js | 7 +------ .../Array/prototype/map/15.4.4.19-3-25.js | 7 +------ .../Array/prototype/map/15.4.4.19-3-3.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-4.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-5.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-6.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-7.js | 6 +----- .../Array/prototype/map/15.4.4.19-3-9.js | 6 +----- .../Array/prototype/map/15.4.4.19-4-12.js | 10 ++++------ .../Array/prototype/map/15.4.4.19-5-1-s.js | 7 ++----- .../Array/prototype/map/15.4.4.19-5-10.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-11.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-12.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-13.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-14.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-15.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-16.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-17.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-18.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-19.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-2.js | 7 +------ .../Array/prototype/map/15.4.4.19-5-21.js | 11 +++-------- .../Array/prototype/map/15.4.4.19-5-22.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-23.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-24.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-3.js | 7 +------ .../Array/prototype/map/15.4.4.19-5-4.js | 7 +------ .../Array/prototype/map/15.4.4.19-5-5.js | 7 +------ .../Array/prototype/map/15.4.4.19-5-6.js | 7 +------ .../Array/prototype/map/15.4.4.19-5-7.js | 8 ++------ .../Array/prototype/map/15.4.4.19-5-9.js | 8 ++------ .../Array/prototype/map/15.4.4.19-6-1.js | 8 +------- .../Array/prototype/map/15.4.4.19-6-2.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-1.js | 10 ++-------- .../Array/prototype/map/15.4.4.19-8-2.js | 11 +++-------- .../Array/prototype/map/15.4.4.19-8-3.js | 11 +++-------- .../Array/prototype/map/15.4.4.19-8-4.js | 12 ++++-------- .../Array/prototype/map/15.4.4.19-8-5.js | 11 +++-------- .../Array/prototype/map/15.4.4.19-8-6.js | 11 +++-------- .../Array/prototype/map/15.4.4.19-8-7.js | 8 +++----- .../Array/prototype/map/15.4.4.19-8-8.js | 8 ++------ .../Array/prototype/map/15.4.4.19-8-9.js | 8 +++----- .../Array/prototype/map/15.4.4.19-8-b-1.js | 10 +++------- .../Array/prototype/map/15.4.4.19-8-b-14.js | 8 ++------ .../Array/prototype/map/15.4.4.19-8-b-16.js | 8 +++----- .../Array/prototype/map/15.4.4.19-8-b-2.js | 7 ++----- .../Array/prototype/map/15.4.4.19-8-b-3.js | 7 ++----- .../Array/prototype/map/15.4.4.19-8-b-4.js | 9 +++------ .../Array/prototype/map/15.4.4.19-8-b-5.js | 8 +++----- .../Array/prototype/map/15.4.4.19-8-b-8.js | 8 +++----- .../Array/prototype/map/15.4.4.19-8-b-9.js | 9 +++------ .../Array/prototype/map/15.4.4.19-8-c-i-1.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-10.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-11.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-13.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-15.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-17.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-18.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-2.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-20.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-21.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-25.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-26.js | 8 ++------ .../Array/prototype/map/15.4.4.19-8-c-i-27.js | 9 +++------ .../Array/prototype/map/15.4.4.19-8-c-i-28.js | 8 ++------ .../Array/prototype/map/15.4.4.19-8-c-i-29.js | 8 ++------ .../Array/prototype/map/15.4.4.19-8-c-i-3.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-5.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-7.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-i-9.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-1.js | 10 +++------- .../Array/prototype/map/15.4.4.19-8-c-ii-10.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-11.js | 6 +----- .../Array/prototype/map/15.4.4.19-8-c-ii-12.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-13.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-16.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-17.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-18.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-19.js | 9 +++------ .../Array/prototype/map/15.4.4.19-8-c-ii-2.js | 10 ++-------- .../Array/prototype/map/15.4.4.19-8-c-ii-20.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-21.js | 8 ++------ .../Array/prototype/map/15.4.4.19-8-c-ii-22.js | 8 ++------ .../Array/prototype/map/15.4.4.19-8-c-ii-23.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-4.js | 9 +++------ .../Array/prototype/map/15.4.4.19-8-c-ii-5.js | 13 +++++-------- .../Array/prototype/map/15.4.4.19-8-c-ii-6.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-8.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-ii-9.js | 7 +------ .../Array/prototype/map/15.4.4.19-8-c-iii-2.js | 8 ++------ .../Array/prototype/map/15.4.4.19-8-c-iii-4.js | 7 +------ .../Array/prototype/map/15.4.4.19-9-1.js | 18 +++++------------- .../Array/prototype/map/15.4.4.19-9-10.js | 8 ++------ .../Array/prototype/map/15.4.4.19-9-11.js | 9 ++------- .../Array/prototype/map/15.4.4.19-9-12.js | 9 ++------- .../Array/prototype/map/15.4.4.19-9-13.js | 13 +++++-------- .../Array/prototype/map/15.4.4.19-9-2.js | 18 +++++------------- .../Array/prototype/map/15.4.4.19-9-3.js | 11 +++-------- .../Array/prototype/map/15.4.4.19-9-4.js | 10 +--------- .../Array/prototype/map/15.4.4.19-9-5.js | 7 +------ .../Array/prototype/map/15.4.4.19-9-6.js | 8 ++------ .../Array/prototype/map/15.4.4.19-9-7.js | 7 +------ .../Array/prototype/map/15.4.4.19-9-8.js | 7 +------ .../Array/prototype/map/15.4.4.19-9-9.js | 7 +------ 143 files changed, 246 insertions(+), 859 deletions(-) diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-0-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-0-1.js index e4d4b2f2e6..8d05c641ec 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-0-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.19-0-1 description: Array.prototype.map must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.map; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-0-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-0-2.js index 7bddbc2fe5..6d2d6f65bd 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-0-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.19-0-2 description: Array.prototype.map.length must be 1 -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.map.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.map.length, 1, 'Array.prototype.map.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js index fa115d9de5..e514ba9d85 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-11 description: Array.prototype.map - applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Date; } @@ -18,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js index 58d55ea04f..79c16ba375 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-12 description: Array.prototype.map - applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof RegExp; } @@ -18,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js index 8f5a5bbd1d..93e5dae755 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-14 description: Array.prototype.map - applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Error; } @@ -18,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js index c7ded2b3db..7f68999e61 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-15 description: Array.prototype.map - applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return ('[object Arguments]' === Object.prototype.toString.call(obj)); } @@ -18,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js index 91d5b64da7..c4b6763521 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-4 description: Array.prototype.map - applied to Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Boolean; } @@ -19,6 +17,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js index f0ada3f690..bf6b29c01c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-6 description: Array.prototype.map - applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Number; } @@ -19,6 +17,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js index 5b30d162c8..5e2841e89c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js @@ -4,16 +4,14 @@ /*--- es5id: 15.4.4.19-1-7 description: Array.prototype.map - applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof String; } var testResult = Array.prototype.map.call("abc", callbackfn); - return testResult[0] === true && testResult[1] === true && testResult[2] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); +assert.sameValue(testResult[2], true, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js index 2a86aa7013..ddc3dbf0b5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-8 description: Array.prototype.map - applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof String; } @@ -15,6 +13,6 @@ function testcase() { var obj = new String("abc"); var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true && testResult[2] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); +assert.sameValue(testResult[2], true, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js index adeaad7fa1..ec91b16d09 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-9 description: Array.prototype.map - applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Function; } @@ -20,6 +18,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js index f58e41c0cf..c1c71c7653 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-1 description: > Array.prototype.map - applied to Array-like object when 'length' is an own data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -23,6 +21,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js index cf99f39d48..d6fc11dfe9 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-10 description: > Array.prototype.map - applied to Array-like object, 'length' is an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -33,6 +31,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js index 0814862ba1..6c0386eba8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-2-11 description: > Array.prototype.map - applied to Array-like object when 'length' is an own accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -26,6 +23,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return 0 === testResult.length; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js index b54b970a10..e04daf059d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-2-13 description: > Array.prototype.map - applied to the Array-like object when 'length' is inherited accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -30,6 +27,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return 0 === testResult.length; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js index 9303d83f8d..798af3aca8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-2-14 description: > Array.prototype.map - applied to the Array-like object that 'length' property doesn't exist -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return 0 === testResult.length; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js index 3691818d5b..64dc777bdf 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-17 description: > Array.prototype.map - applied to Arguments object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -20,6 +18,4 @@ function testcase() { var testResult = func(12, 11); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js index ef7d50c801..70600db5b6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-19 description: > Array.prototype.map - applied to Function object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -23,6 +21,4 @@ function testcase() { var testResult = Array.prototype.map.call(fun, callbackfn); - return 2 === testResult.length; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js index ddbbdc5b73..feae653255 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js @@ -6,15 +6,12 @@ es5id: 15.4.4.19-2-2 description: > Array.prototype.map - when 'length' is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } var testResult = [12, 11].map(callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js index 2591265b98..f0f3423e14 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-3 description: > Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -27,6 +25,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js index 93ac029027..ef5f878a2a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-5 description: > Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -37,6 +35,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js index d130e751bb..764e73c102 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-6 description: > Array.prototype.map - applied to Array-like object, 'length' is an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -26,6 +24,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js index 1e2c7a9f82..23bb799e6d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-7 description: > Array.prototype.map - applied to Array-like object, 'length' is an own accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -29,6 +27,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js index 65a36ac609..4657bd29c6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-8 description: > Array.prototype.map - applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -34,6 +32,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js index 62c343ffe3..68b8eeb84d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js @@ -7,10 +7,8 @@ description: > Array.prototype.map - applied to Array-like object when 'length' is an own accessor property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -42,6 +40,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js index 767a09e45b..fe7fba99c6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-1 description: Array.prototype.map - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js index 4366bca5d1..818353a02b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-10 description: Array.prototype.map - value of 'length' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js index 1bc227723b..cd0ea5b099 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-11 description: > Array.prototype.map - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js index 33b21348c1..b31d62059c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-12 description: > Array.prototype.map - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js index 3677588b08..2c97e017e9 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-13 description: > Array.prototype.map - value of 'length' is string that is able to convert to number primitive (value is a decimal number) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js index 0425de952d..7cd17e4ae1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-15 description: > Array.prototype.map - 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js index 5b68c30851..041d081f7b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-16 description: Array.prototype.map - 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js index 1342d77b1f..13fac983f8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-17 description: > Array.prototype.map - when 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js index e825d6ed5d..daba6b35e1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-3-18 description: > Array.prototype.map - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -19,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js index a0eac24c22..2e24f1677e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-3-19 description: > Array.prototype.map - value of 'length' is an Object which has an own toString method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -28,6 +25,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js index b123736a9e..d5c4e68f53 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-2 description: > Array.prototype.map on an Array-like object if 'length' is 1 (length overridden to true(type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 1; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js index b80c12366d..73b1bcf0bc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-20 description: > Array.prototype.map - value of 'length' is an Object which has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -27,6 +25,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js index 9a7970e2f7..3e7d013466 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - '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() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -36,6 +33,6 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2 && firstStepOccured && secondStepOccured; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); +assert(firstStepOccured, 'firstStepOccured !== true'); +assert(secondStepOccured, 'secondStepOccured !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js index 157c6a039b..c958113651 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-3-23 description: > Array.prototype.map uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -43,6 +40,6 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js index 29a0f9339b..78ac44bb4f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-3-24 description: > Array.prototype.map - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -23,6 +20,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js index e4491787b3..5aea98f4f4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-3-25 description: Array.prototype.map - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -21,6 +18,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js index 33326ebd41..2811585496 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-3 description: Array.prototype.map - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js index dc96b88782..47e24eed5d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-4 description: Array.prototype.map - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js index 6295296160..14c9a279f2 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-5 description: Array.prototype.map - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js index f6ccb10a35..a27aab6c6e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-6 description: > Array.prototype.map - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js index 6f7b1df234..838ce7b4ee 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-7 description: > Array.prototype.map - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js index 5aab7c323b..6d891e2c14 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-9 description: > Array.prototype.map - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js index d95dba528b..efc01ed4ac 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js @@ -4,16 +4,14 @@ /*--- es5id: 15.4.4.19-4-12 description: Array.prototype.map - 'callbackfn' is a function -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } var testResult = [11, 9].map(callbackfn); - return testResult.length === 2 && testResult[0] === true && testResult[1] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 2, 'testResult.length'); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js index 9db2bbe0bb..ac74c0a42b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js @@ -5,10 +5,8 @@ es5id: 15.4.4.19-5-1-s description: Array.prototype.map - thisArg not passed to strict callbackfn flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var innerThisCorrect = false; function callbackfn(val, idx, obj) { @@ -18,6 +16,5 @@ function testcase() { } [1].map(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); + +assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js index 4b87507a53..3e53cbe9b5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-10 description: Array.prototype.map - Array object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objArray = new Array(2); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objArray); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js index cd5aa5e430..40a9ae70b2 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-11 description: Array.prototype.map - String object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objString = new String(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objString); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js index e2c8b9eb0f..1227e5b5b8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-12 description: Array.prototype.map - Boolean object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objBoolean = new Boolean(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objBoolean); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js index 6a2cec23d2..8571d3cc6d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-13 description: Array.prototype.map - Number object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objNumber = new Number(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objNumber); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js index 573e588245..1f1d06b03c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-14 description: Array.prototype.map - the Math object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === Math; } var testResult = [11].map(callbackfn, Math); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js index 043bcb3f0e..fcaaccb1de 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-15 description: Array.prototype.map - Date object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objDate = new Date(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objDate); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js index e4bb588415..7aa94c8535 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-16 description: Array.prototype.map - RegExp object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objRegExp = new RegExp(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objRegExp); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js index 7276e9e2cf..b801f2d7dc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-17 description: Array.prototype.map - the JSON object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === JSON; } var testResult = [11].map(callbackfn, JSON); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js index 874a446b23..c086d0ec66 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-18 description: Array.prototype.map - Error object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objError = new RangeError(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objError); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js index 9138eb2abe..bd74085e17 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-19 description: Array.prototype.map - the Arguments object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var arg; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { }(1, 2, 3)); var testResult = [11].map(callbackfn, arg); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js index c1a5b58af4..b13fe07d37 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-5-2 description: Array.prototype.map - thisArg is Object -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var o = new Object(); o.res = true; @@ -18,8 +16,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,o); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js index b00ebbc66f..099adba0f6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js @@ -4,18 +4,13 @@ /*--- es5id: 15.4.4.19-5-21 description: Array.prototype.map - the global object can be used as thisArg -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === fnGlobalObject(); } var testResult = [11].map(callbackfn, fnGlobalObject()); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js index 1e31612e34..ed8fb89c84 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-22 description: Array.prototype.map - boolean primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === false; } var testResult = [11].map(callbackfn, false); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js index b2aad18879..ff77be07c4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-23 description: Array.prototype.map - number primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === 101; } var testResult = [11].map(callbackfn, 101); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js index e00487da5b..31d0bc52c1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-24 description: Array.prototype.map - string primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === "abc"; } var testResult = [11].map(callbackfn, "abc"); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js index dd3687056a..99606d5ba5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-5-3 description: Array.prototype.map - thisArg is Array -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var a = new Array(); a.res = true; @@ -18,8 +16,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,a); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js index dd4a03b546..b4a94e4fcd 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-5-4 description: > Array.prototype.map - thisArg is object from object template(prototype) -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -22,8 +20,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,f); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js index 6c023be2d8..bb24fb6176 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-5-5 description: Array.prototype.map - thisArg is object from object template -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -20,8 +18,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,f); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js index 23d6c0092a..4afa6b356e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-5-6 description: Array.prototype.map - thisArg is function -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -19,8 +17,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,foo); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js index 28ea08de05..60c9a3c302 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-7 description: Array.prototype.map - built-in functions can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === eval; } var testResult = [11].map(callbackfn, eval); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js index 6c651a0519..927d5a55c2 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-9 description: Array.prototype.map - Function object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objFunction = function () { }; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objFunction); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js index 144a0bac61..689aea7378 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js @@ -6,14 +6,8 @@ es5id: 15.4.4.19-6-1 description: > Array.prototype.map - Array.isArray returns true when input argument is the ourput array -includes: [runTestCase.js] ---*/ -function testcase() { - var newArr = [11].map(function () { }); - return Array.isArray(newArr); - - } -runTestCase(testcase); +assert(Array.isArray(newArr), 'Array.isArray(newArr) !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js index 79ed739f8f..93a1b3a59e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.19-6-2 description: Array.prototype.map - the returned array is instanceof Array -includes: [runTestCase.js] ---*/ -function testcase() { - var newArr = [11].map(function () { }); - return newArr instanceof Array; - } -runTestCase(testcase); +assert(newArr instanceof Array, 'newArr instanceof Array !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js index e6eebaccbd..813d2a9a0b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-1 description: > Array.prototype.map doesn't consider new elements added to array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { srcArr[2] = 3; @@ -20,8 +17,5 @@ function testcase() { var srcArr = [1,2,,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr.length === 5) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js index 3a3cbdc89e..728f6e6637 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-2 description: > Array.prototype.map considers new value of elements in array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { srcArr[4] = -1; @@ -22,8 +19,6 @@ function testcase() { var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr.length === 5 && resArr[4] === 0) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); +assert.sameValue(resArr[4], 0, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js index ff9bf8077c..c0392d6333 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-3 description: > Array.prototype.map doesn't visit deleted elements in array after the call -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { delete srcArr[4]; @@ -23,8 +20,6 @@ function testcase() { var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr.length === 5 && resArr[4] === undefined) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); +assert.sameValue(resArr[4], undefined, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js index b6b4055d5a..87291f9a49 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-4 description: > Array.prototype.map doesn't visit deleted elements when Array.length is decreased -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -21,8 +18,7 @@ function testcase() { var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr.length === 5 && callCnt === 2 && resArr[2] === undefined) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); +assert.sameValue(callCnt, 2, 'callCnt'); +assert.sameValue(resArr[2], undefined, 'resArr[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js index 0bbefc3076..6073581621 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-5 description: > Array.prototype.map doesn't consider newly added elements in sparse array -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -23,8 +20,6 @@ function testcase() { srcArr[1] = 1; srcArr[2] = 2; var resArr = srcArr.map(callbackfn); - if( resArr.length === 10 && callCnt === 2) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 10, 'resArr.length'); +assert.sameValue(callCnt, 2, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js index 1d583e4115..7bf09ac89f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-6 description: > Array.prototype.map visits deleted element in array after the call when same index is also present in prototype -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { delete srcArr[4]; @@ -25,8 +22,6 @@ function testcase() { var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); delete Array.prototype[4]; - if(resArr.length === 5 && resArr[4] === 1) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); +assert.sameValue(resArr[4], 1, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js index 835653ae99..6c39924eb2 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-8-7 description: Array.prototype.map successful to delete the object in callbackfn -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; obj.srcArr = [1, 2, 3, 4, 5]; @@ -20,6 +18,6 @@ function testcase() { } var resArr = obj.srcArr.map(callbackfn); - return resArr.toString() === "1,1,1,1,1" && !obj.hasOwnProperty("arr"); - } -runTestCase(testcase); + +assert.sameValue(resArr.toString(), "1,1,1,1,1", 'resArr.toString()'); +assert.sameValue(obj.hasOwnProperty("arr"), false, 'obj.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js index 35861301c4..b64dd53d73 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-8 description: > Array.prototype.map - no observable effects occur if length is 0 on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -21,6 +18,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0 && !accessed; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js index 2316901043..7647c26ad3 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-8-9 description: > Array.prototype.map - modifications to length don't change number of iterations on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var called = 0; function callbackfn(val, idx, obj) { called += 1; @@ -28,6 +26,6 @@ function testcase() { var testResult = arr.map(callbackfn); - return testResult.length === 3 && called === 2 && typeof testResult[2] === "undefined"; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 3, 'testResult.length'); +assert.sameValue(called, 2, 'called'); +assert.sameValue(typeof testResult[2], "undefined", 'typeof testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js index 2d4d57d78d..1340052d22 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-b-1 description: > Array.prototype.map - callbackfn not called for indexes never been assigned values -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -21,7 +18,6 @@ function testcase() { var srcArr = new Array(10); srcArr[1] = undefined; //explicitly assigning a value var resArr = srcArr.map(callbackfn); - if( resArr.length === 10 && callCnt === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 10, 'resArr.length'); +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js index 9d44f5d4f5..e3caf87c3e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-b-14 description: > Array.prototype.map - decreasing length of array causes index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return idx === 3 && typeof val === "undefined"; } @@ -26,6 +23,5 @@ function testcase() { }); var testResult = arr.map(callbackfn); - return typeof testResult[3] === "undefined"; - } -runTestCase(testcase); + +assert.sameValue(typeof testResult[3], "undefined", 'typeof testResult[3]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js index 3ed74d6b6d..9faaf8aafa 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js @@ -7,10 +7,8 @@ description: > Array.prototype.map - decreasing length of array does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 2 && val === "unconfigurable") { return false; @@ -37,6 +35,6 @@ function testcase() { }); var testResult = arr.map(callbackfn); - return testResult.length === 3 && testResult[2] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 3, 'testResult.length'); +assert.sameValue(testResult[2], false, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js index a8a374393c..1751eb5631 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-8-b-2 description: Array.prototype.map - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 2 && val === "length") { return false; @@ -27,6 +25,5 @@ function testcase() { }); var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[2] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult[2], false, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js index 6c8ec807f2..f2546b8177 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-8-b-3 description: Array.prototype.map - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 2) { return false; @@ -26,6 +24,5 @@ function testcase() { }); var testResult = Array.prototype.map.call(obj, callbackfn); - return typeof testResult[2] === "undefined"; - } -runTestCase(testcase); + +assert.sameValue(typeof testResult[2], "undefined", 'typeof testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js index 4ce7c89d5a..93a0a5f5b4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-b-4 description: > Array.prototype.map - properties added into own object after current position are visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1 && val === 1) { return false; @@ -35,6 +32,6 @@ function testcase() { }); var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js index 28d493c57c..13e51af5bb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-8-b-5 description: > Array.prototype.map - properties added into own object after current position are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 1 && val === 1) { return false; @@ -34,6 +32,6 @@ function testcase() { }); var testResult = arr.map(callbackfn); - return testResult[0] === true && testResult[1] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js index d1646c958c..402fbb28d8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-8-b-8 description: > Array.prototype.map - deleting own property causes index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 1) { return false; @@ -35,6 +33,6 @@ function testcase() { }); var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && typeof testResult[1] === "undefined"; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(typeof testResult[1], "undefined", 'typeof testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js index 0715f8f358..6bd9e877f1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-b-9 description: > Array.prototype.map - deleting own property causes index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return false; @@ -36,6 +33,6 @@ function testcase() { }); var testResult = arr.map(callbackfn); - return testResult[0] === true && typeof testResult[1] === "undefined"; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(typeof testResult[1], "undefined", 'typeof testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js index 3dd2e09e9d..b24387d2ce 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-1 description: > Array.prototype.map - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = {}; function callbackfn(val, idx, obj) { @@ -24,6 +21,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr[5] === true; - } -runTestCase(testcase); +assert.sameValue(newArr[5], true, 'newArr[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js index ec38ec06ef..c6ce4900eb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-10 description: > Array.prototype.map - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -31,6 +28,4 @@ function testcase() { var testResult = arr.map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js index b69eec1478..1447a34b79 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - 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 kValue = "abc"; function callbackfn(val, idx, obj) { @@ -37,6 +34,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js index 302732bcad..79251ae7c5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - 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 kValue = "abc"; function callbackfn(val, idx, obj) { @@ -44,6 +41,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js index c483e7ed5d..5586a4fda3 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-15 description: > Array.prototype.map - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -36,6 +33,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js index 8165e146ef..5c150c5684 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-17 description: > Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return typeof val === "undefined"; @@ -27,6 +24,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js index 53d5335240..3b4f9c32c1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-18 description: > Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return typeof val === "undefined"; @@ -27,6 +24,4 @@ function testcase() { var testResult = arr.map(callbackfn); - return testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js index 16f7895557..1490b877ab 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-2 description: > Array.prototype.map - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = {}; function callbackfn(val, idx, obj) { @@ -24,6 +21,4 @@ function testcase() { var newArr = arr.map(callbackfn); - return newArr[0] === true; - } -runTestCase(testcase); +assert.sameValue(newArr[0], true, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js index 8088a3cbad..cbfbd8230e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return typeof val === "undefined"; @@ -41,6 +38,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js index 05bed800de..6f75b88b58 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-21 description: > Array.prototype.map - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return typeof val === "undefined"; @@ -31,6 +28,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js index fca9938a62..e94dcaac82 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - 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() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 9; @@ -26,6 +23,4 @@ function testcase() { var testResult = func(9); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js index caa91750ef..5a44a129cc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - 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() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 9; @@ -28,6 +25,5 @@ function testcase() { var testResult = func(9, 11); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js index fd533e37d0..269869f849 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - 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() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 9; @@ -31,6 +28,6 @@ function testcase() { var testResult = func(9, 11, 12); - return testResult[0] === true && testResult[1] === true && testResult[2] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); +assert.sameValue(testResult[2], true, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js index 2fe0260d07..801ddea6ec 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-28 description: > Array.prototype.map - element changed by getter on previous iterations is observed on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var arr = []; @@ -45,6 +42,5 @@ function testcase() { var testResult = arr.map(callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js index b3d3a1cdaa..60a2513c32 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-29 description: > Array.prototype.map - element changed by getter on previous iterations is observed on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var obj = { length: 2 }; @@ -45,6 +42,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js index f51b9099b4..fafb9436e0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-3 description: > Array.prototype.map - 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 kValue = "abc"; function callbackfn(val, idx, obj) { @@ -30,6 +27,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[5] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[5], true, 'testResult[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js index 0fabd223f5..0958b759e5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - 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 kValue = "abc"; function callbackfn(val, idx, obj) { @@ -42,6 +39,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[5] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[5], true, 'testResult[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js index 80e47ae866..ff5e2e1571 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-7 description: > Array.prototype.map - element to be retrieved is inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -29,6 +26,4 @@ function testcase() { var newArr = Array.prototype.map.call(child, callbackfn); - return newArr[5] === true; - } -runTestCase(testcase); +assert.sameValue(newArr[5], true, 'newArr[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js index 7c5144a6f7..d6a758f844 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-9 description: > Array.prototype.map - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -31,6 +28,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js index c5e80687fd..05e901363c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-1 description: Array.prototype.map - callbackfn called with correct parameters -includes: [runTestCase.js] ---*/ -function testcase() { - var bPar = true; var bCalled = false; function callbackfn(val, idx, obj) @@ -22,7 +19,6 @@ function testcase() { srcArr[999999] = -6.6; var resArr = srcArr.map(callbackfn); - if(bCalled === true && bPar === true) - return true; - } -runTestCase(testcase); + +assert.sameValue(bCalled, true, 'bCalled'); +assert.sameValue(bPar, true, 'bPar'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js index af01ca61f2..e85465cdf0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.19-8-c-ii-10 description: Array.prototype.map - callbackfn is called with 1 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val) { return val > 10; } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js index 05e2a0892b..4027809567 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-8-c-ii-11 description: Array.prototype.map - callbackfn is called with 2 formal parameters -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx) { return (val > 10 && arguments[2][idx] === val); } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js index 7bcd553c41..03707a5b8b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.19-8-c-ii-12 description: Array.prototype.map - callbackfn is called with 3 formal parameters -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return (val > 10 && obj[idx] === val); } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js index e50cedffe7..ff631ecb89 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js @@ -6,17 +6,12 @@ es5id: 15.4.4.19-8-c-ii-13 description: > Array.prototype.map - callbackfn that uses arguments object to get parameter value -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return arguments[2][arguments[1]] === arguments[0]; } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js index a2b2e6ca4e..bd8ce29fef 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-16 description: > Array.prototype.map - 'this' object when T is not an object (T is a boolean primitive) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === false; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, false); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js index 23fb0d15db..dfd7c7803d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-17 description: > Array.prototype.map - 'this' object when T is not an object (T is a number) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === 5; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, 5); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js index 3dbce30f6c..f4d29581de 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-18 description: > Array.prototype.map - 'this' object when T is not an object (T is a string primitive) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === "hello!"; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, "hello!"); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js index 1b63e2df67..4061fe67d0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-19 description: Array.prototype.map - non-indexed properties are not called. -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; var result = false; @@ -24,6 +21,6 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return !result && testResult[0] === true && called === 1; - } -runTestCase(testcase); +assert.sameValue(result, false, 'result'); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js index 94cbcb0b17..f9bc8cbca5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-2 description: Array.prototype.map - callbackfn takes 3 arguments -includes: [runTestCase.js] ---*/ -function testcase() { - var parCnt = 3; var bCalled = false function callbackfn(val, idx, obj) @@ -20,9 +17,6 @@ function testcase() { var srcArr = [0,1,2,3,4,5,6,7,8,9]; var resArr = srcArr.map(callbackfn); - if(bCalled === true && parCnt === 3) - return true; - - } -runTestCase(testcase); +assert.sameValue(bCalled, true, 'bCalled'); +assert.sameValue(parCnt, 3, 'parCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js index 8d1c2800bc..50b08313c6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-20 description: > Array.prototype.map - callbackfn called with correct parameters (thisArg is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.threshold === 10; } @@ -21,6 +18,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js index 3f3cf53e07..327bbc60a4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-21 description: > Array.prototype.map - callbackfn called with correct parameters (kValue is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 11; @@ -27,6 +24,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js index 9b08f366c8..4ef0b63143 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-22 description: > Array.prototype.map - callbackfn called with correct parameters (the index k is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (val === 11) { return idx === 0; @@ -27,6 +24,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js index 1361280053..ebd1725622 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-23 description: > Array.prototype.map - callbackfn called with correct parameters (this object O is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, length: 2 }; function callbackfn(val, idx, o) { @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js index 8cf6ff2775..6f8181cdec 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-4 description: Array.prototype.map - k values are passed in acending numeric order -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3, 4, 5]; var lastIdx = 0; var called = 0; @@ -23,6 +20,6 @@ function testcase() { } arr.map(callbackfn); - return result && arr.length === called; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert.sameValue(arr.length, called, 'arr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js index c37da6a6ba..e3cb09b1b7 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-5 description: > Array.prototype.map - k values are accessed during each iteration and not prior to starting the loop. -includes: [runTestCase.js] ---*/ -function testcase() { - var kIndex = []; //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. @@ -30,8 +27,8 @@ function testcase() { var testResult = [11, 12, 13, 14].map(callbackfn); - return testResult.length === 4 && testResult[0] === false && - testResult[1] === false && testResult[2] === false && - testResult[3] === false; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 4, 'testResult.length'); +assert.sameValue(testResult[0], false, 'testResult[0]'); +assert.sameValue(testResult[1], false, 'testResult[1]'); +assert.sameValue(testResult[2], false, 'testResult[2]'); +assert.sameValue(testResult[3], false, 'testResult[3]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js index d4e7ab1ba9..67ddced639 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-6 description: Array.prototype.map - arguments to callbackfn are self consistent. -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, length: 1 }; var thisArg = {}; @@ -21,6 +18,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js index 8e2495ffbc..051d561014 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-8 description: > Array.prototype.map - element changed by callbackfn on previous iterations is observed -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 9, 1: 12, length: 2 }; function callbackfn(val, idx, o) { @@ -22,6 +19,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[1] === false; - } -runTestCase(testcase); +assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js index 35416e0dd4..2965c92834 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.19-8-c-ii-9 description: Array.prototype.map - callbackfn with 0 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return true; } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js index 540c999561..34b15a2bc6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-iii-2 description: > Array.prototype.map - value of returned array element equals to 'mappedValue' -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val; } @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, 1: 9, length: 2 }; var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr[0] === obj[0] && newArr[1] === obj[1]; - } -runTestCase(testcase); +assert.sameValue(newArr[0], obj[0], 'newArr[0]'); +assert.sameValue(newArr[1], obj[1], 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js index bac867e12a..3638dd0abc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-iii-4 description: > Array.prototype.map - value of returned array element can be enumerated -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -28,6 +25,4 @@ function testcase() { } } - return enumerable; - } -runTestCase(testcase); +assert(enumerable, 'enumerable !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js index 7923f98890..4d93ba2704 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js @@ -6,25 +6,17 @@ es5id: 15.4.4.19-9-1 description: > Array.prototype.map doesn't mutate the Array on which it is called on -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } var srcArr = [1,2,3,4,5]; srcArr.map(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/map/15.4.4.19-9-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js index 4acc145c89..759be889c1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-10 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -28,6 +25,5 @@ function testcase() { }; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js index 93a3dfd9a2..2b38f89188 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js @@ -7,10 +7,8 @@ description: > Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { function Foo() { } Foo.prototype = [1, 2, 3]; @@ -32,8 +30,5 @@ function testcase() { function cb() { } var a = Array.prototype.map.call(f, cb); - if (Array.isArray(a) && a.length === 0) { - return true; - } - } -runTestCase(testcase); +assert(Array.isArray(a), 'Array.isArray(a) !== true'); +assert.sameValue(a.length, 0, 'a.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js index 5cec5b92e6..7fc1be560f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-9-12 description: > Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with []) -includes: [runTestCase.js] ---*/ -function testcase() { function Foo() { } Foo.prototype = [1, 2, 3]; var f = new Foo(); @@ -33,8 +31,5 @@ function testcase() { function cb() { } var a = Array.prototype.map.call(f, cb); - if (Array.isArray(a) && a.length === 0) { - return true; - } - } -runTestCase(testcase); +assert(Array.isArray(a), 'Array.isArray(a) !== true'); +assert.sameValue(a.length, 0, 'a.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js index b52cf9c8fe..58196c81bb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-13 description: > Array.prototype.map - if there are no side effects of the functions, O is unmodified -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -22,8 +19,8 @@ function testcase() { arr.map(callbackfn); - return 1 === arr[0] && 2 === arr[1] && 3 === arr[2] && 4 === arr[3] && 4 === called; - - - } -runTestCase(testcase); +assert.sameValue(arr[0], 1, 'arr[0]'); +assert.sameValue(arr[1], 2, 'arr[1]'); +assert.sameValue(arr[2], 3, 'arr[2]'); +assert.sameValue(arr[3], 4, 'arr[3]'); +assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js index 4a7189ecad..57b9018914 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js @@ -6,25 +6,17 @@ es5id: 15.4.4.19-9-2 description: > Array.prototype.map returns new Array with same number of elements and values the result of callbackfn -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val + 10; } var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr[0] === 11 && - resArr[1] === 12 && - resArr[2] === 13 && - resArr[3] === 14 && - resArr[4] === 15) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(resArr[0], 11, 'resArr[0]'); +assert.sameValue(resArr[1], 12, 'resArr[1]'); +assert.sameValue(resArr[2], 13, 'resArr[2]'); +assert.sameValue(resArr[3], 14, 'resArr[3]'); +assert.sameValue(resArr[4], 15, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js index 44b42ab6f1..6c20378697 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-9-3 description: Array.prototype.map - subclassed array when length is reduced -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -16,9 +14,6 @@ function testcase() { function cb(){} var a = f.map(cb); - if (Array.isArray(a) && - a.length === 1) { - return true; - } - } -runTestCase(testcase); + +assert(Array.isArray(a), 'Array.isArray(a) !== true'); +assert.sameValue(a.length, 1, 'a.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js index 17a3554d7a..3f2955c584 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-9-4 description: Array.prototype.map doesn't visit expandos -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -19,10 +16,5 @@ function testcase() { srcArr[true] = 11; var resArr = srcArr.map(callbackfn); - if(callCnt == 5) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js index af5488f13e..20c048f84b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-5 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js index 01729bcc72..b052968f05 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-6 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -21,6 +18,5 @@ function testcase() { obj.length = null; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js index f5bf8f600c..cc8f9d633c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-7 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -24,7 +21,5 @@ function testcase() { obj.length = false; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js index ef611825db..0544689401 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-8 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -24,7 +21,5 @@ function testcase() { obj.length = 0; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js index c341398532..f7a6ad78e6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-9 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -24,7 +21,5 @@ function testcase() { obj.length = '0'; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); -- GitLab