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 e4d4b2f2e61425fafa88f634e3c09d36d1795102..8d05c641ec8f4e20f40e26c528139eefe42074ec 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 7bddbc2fe5a812148cc18040f3377384153163ac..6d2d6f65bd8fc5c57129f6e1fe17165afbef2475 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 fa115d9de58fd08efefae78841d0d77c8e4ec4a5..e514ba9d859fe9b0a9359e80dde77a4fc768be0b 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 58d55ea04f3399b2f7c4ba38ed0bdcbbb13ba0b3..79c16ba375cd515e685d6b650b30ddabf0a57605 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 8f5a5bbd1d84da276277a7d2b3f914a24cce6883..93e5dae755340381af354aec532ae969c3636ad1 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 c7ded2b3db730a7805c180957a478f1605c47900..7f68999e61c0b5a7cfd6e6bd40fdc38f28ae0949 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 91d5b64da72d89a93a45dba850f26f646ca65d3c..c4b67635210d32572109011fc8bdfc75384b20e7 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 f0ada3f690d357fc878966c2f38f4e0c1ba0dcf4..bf6b29c01cc4bbf993ff23547543d0069f1535d0 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 5b30d162c89c65135f1c9e5f275a1dc8820590d2..5e2841e89cd1586f03fc8acd40df19cbeac4fb91 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 2a86aa701302529e3b943a0aff6669c56b5138b8..ddc3dbf0b5419c7de2c4fce8a122b38d7dbf8db2 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 adeaad7fa1d7aa2bf04c2e41a14a7810dbedfb66..ec91b16d091c3d326f87526ad2098722f1f037a2 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 f58e41c0cfb416139df6d77d6fc4226ba8d806e4..c1c71c7653a089bdfe4c4f9e79dad884a3742c93 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 cf99f39d48375eebb54018671afc067d98188fe9..d6fc11dfe93ec10fadcf27e30af19f6c30f52c5a 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 0814862ba18d0a70b2e9260c2f9e9e9f030f4078..6c0386eba81a1608aab7b8bb1f5a133b68a1be2a 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 b54b970a108ec3a840ba4524c38529bbcbcd3bcb..e04daf059d8de96e63ce3fffdb32e875387c77f8 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 9303d83f8dde581bfe39badd037cd9dbc6b9a917..798af3aca8ad22f8f901cb794bd2ff00143ebea8 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 3691818d5b41768fce2ad7bc61e089d03db027f7..64dc777bdf0cb307c23d64892987d5908a4fed6c 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 ef7d50c8015b9ae5087de00c22c35bec35862958..70600db5b69aa0de0979b940a0f851b072d9f719 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 ddbbdc5b73b546cb8a16174f0468dd635c0f3c4e..feae653255f4575d6eed04f4698501f3bf129404 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 2591265b98fdacdc90faaa2226be1303ba115ce2..f0f3423e141ab197574c319ac2fdcb1ecd1838ce 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 93ac0290271ef373dea30db979f0596e54db399f..ef5f878a2a478e9f988788e169c85c1f8f318b58 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 d130e751bb827d00d2a8b1b55abf214fec6ce556..764e73c1021ecf83cbd214dcabeb2d081c40c38d 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 1e2c7a9f82ce0f2dbc9cb1c6e2c3f6495490fc0d..23bb799e6df1b30e16330a09c603ee1dc90734d4 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 65a36ac6092c82c3be82d8d4aaafe0399986a8d2..4657bd29c68b471c29d8620688cb5df9e431f249 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 62c343ffe3f4004349452acf4288565f51be8df9..68b8eeb84d526f17e6394b61498a86599c304964 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 767a09e45b5ce2a186db6d539888a1462bdb71e5..fe7fba99c615b8e527640e05292f92c1daf354c7 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 4366bca5d18c4ba5ef0e9f929d36de209f6882ab..818353a02be653f2efbad4480bfb8c20e032a263 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 1bc227723b83f7c87f8fd9fa1e1daf5f8ed3796f..cd0ea5b099fb44423be93c9846951f87ed71e6d8 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 33b21348c12c83d0ddd79fdc5e4de5f6aeeb13ed..b31d62059ccd95e0ecfa2ce7d15fd559a9329d0c 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 3677588b0874df3f93cc7543d62895bc38d12fec..2c97e017e98be4a45705b49cbde3038ecc28230f 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 0425de952d4184e50472524f18da1ee08ed5431d..7cd17e4ae1cce2d31f5235c10f52a793e785d5d1 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 5b68c30851c5c5f3d0c59b0c0698c2c59f1d4c41..041d081f7bc13807864b2b4535887525bfc82cbf 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 1342d77b1fbaebc67676d95ddd7ebf045a5e7a62..13fac983f8fe974c895c562bad26ab482a00c018 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 e825d6ed5de7f76bd1499854493c7e533a9952df..daba6b35e1de53c4645e9b5c181826179d5b2f37 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 a0eac24c228d369dfb8c77ffaedc26fa88262b93..2e24f1677e14f71451137e8f489748f3a7aeadae 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 b123736a9e6eb521c9daab50693f96f8224cb020..d5c4e68f53eb1630baff19492c8c7827adb34557 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 b80c12366ddcc5da3452740119c9158fc937adf0..73b1bcf0bcb9ca9ddad0df652325d4c3a22bd086 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 9a7970e2f7e8c579c81ca556bf6d0ed2732976a7..3e7d01346624914fdc23d026825102a726716cb0 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 157c6a039bf266f26afe54ca293b75adb78db817..c958113651d3aca7144b0485052684d0fd9de0a9 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 29a0f9339b1188bf36ee4cce9ed1f2091e76d9cb..78ac44bb4ffd8d128043bcb2d5fc89037d3f5c15 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 e4491787b38a3a56aec10f7435861377d62e46c6..5aea98f4f4baa0c1b323d2cf104c4d851b48f7d2 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 33326ebd4186e057c240357af62ac87d0cbfb488..2811585496d22efbadf6133d0e142b1ff482ab11 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 dc96b8878273000c323a10b79d42dca996db7bf3..47e24eed5d93e9bdfe1642841175a5ded7c5d78f 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 6295296160b0eaac2f6ba0291743ef1e3f72898d..14c9a279f2a504aa47ca7ed4d9202f5b4d6069fe 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 f6ccb10a35e7025a5e4fb3108957ad7217179fb8..a27aab6c6eab007566e8c6495a89076d77f5b18a 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 6f7b1df2346d95db1cbe755637d23f0a4fd1a31f..838ce7b4eed2b4e27aacf2c0fb9c8245a3eb6158 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 5aab7c323b71f705129a385fec54073026ff1288..6d891e2c14de402f948c8e3aec7393f2eab93ace 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 d95dba528bec1b7c236eaced3c33b42240e4cf68..efc01ed4ac92edab1a12bdee946058da568d104c 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 9db2bbe0bbb06d520891a4816472b1169fa6cf85..ac74c0a42baec26b93c15718329c714a3cd16cd1 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 4b87507a53b28cd32dc03854f5436e238bf94d98..3e53cbe9b5adc5aa6e6a4117242054839c8a8da0 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 cd5aa5e4303109fceb6a6e3c3bd5ab68528459f2..40a9ae70b2a4cfc99d72feb41d7f547aa3278135 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 e2c8b9eb0f5151379b28e89e5bb536be0ad16b6c..1227e5b5b829a7997a69d784b39823ceac6398e1 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 6a2cec23d2aa8a511c9dc3994ee1cf441a6416ca..8571d3cc6d7966027b2cb50271f12cd2c75e937e 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 573e5882453c9a0b33e263bd666ca9a3fd3c701a..1f1d06b03cbfef64de8aa50995f5f502aec4d3e9 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 043bcb3f0eb86b42a08ec4a649b8fb477616aba4..fcaaccb1de9c2b12eed421358f1a17b5e93981a8 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 e4bb58841563ccca1626e2a3d4d66d79abae8432..7aa94c8535c8b7beb291b6860875475e72087143 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 7276e9e2cfd0eff0f799998fc7cc2922fc606ed3..b801f2d7dc921f019df0ea41c59a164286f5b488 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 874a446b237cad05b20b160b2171f1ad8a12f218..c086d0ec66be125780950970081b55505a93140b 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 9138eb2abe5246c310d0972121cf6e149f1e4c1d..bd74085e1783f085f0ee439edcb11b06fbb6ef03 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 c1a5b58af4e689d6387166e720035c0a1073ac18..b13fe07d378027da793fea2ea2c1145030a6a383 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 b00ebbc66f72aa65a48a828f0b4d0fb63a7aec60..099adba0f617c5a611cb7e0ed69267715b9b25b0 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 1e31612e34c67ff0df59b11aa47b110ddcab57ad..ed8fb89c8440419fbf29f2a4cd3cb305873bd8b9 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 b2aad18879e4889c7c3cf643bdb41442fc0b9bd3..ff77be07c4a082b2f332faf66f0b62a9a1bc2c59 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 e00487da5b2ff9385909bf72448da51ce9755799..31d0bc52c1cc87aca3a7d87de140ddaa6e12138b 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 dd3687056a2509b17356a0f8634716a99bb6dcf7..99606d5ba5001894aaf72b4013b120193d6079a6 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 dd4a03b546476a7fad63e669d9fed034f37a1e94..b4a94e4fcd937a5bdfbdf5340caf377905031f16 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 6c023be2d822cc5402b44cb46fb3cbe54859868e..bb24fb6176aa0609eaabdee155ee8cbc530512cc 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 23d6c0092aba1226fbcf706ffb396048d0445a34..4afa6b356ea450a591576bbafe3df7d88148ddb0 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 28ea08de05e83ca78310b13c667c9e3d697a3baf..60c9a3c3024bc195499ec56e04183171c97c6c3b 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 6c651a0519de1c4bc83fd00b09edbf5ea49bb1c1..927d5a55c2bbdbdf238bbc32be9affba50b54aeb 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 144a0bac61deac765ca319e63d6f58a356df7a30..689aea737828ab42b5205464061f4291ab3c491f 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 79ed739f8fed548b50a333404d207e099ab07cf0..93a1b3a59e8eaa5ef4dda6ee6bed81954375beeb 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 e6eebaccbd4f1d36438f615b363b502c461354d9..813d2a9a0b6b6f5b64ece1dc54dc2f1791fe4b2b 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 3a3cbdc89e88c803bf72888f7528fba36c85434a..728f6e663759325a090bbb9c0201919060522dc4 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 ff9bf8077cce17152f1c166a8174fdaa91172327..c0392d633311c3588d55647e00ce078b7897a559 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 b6b4055d5ae13770f271794dd81e9b4bdc314af6..87291f9a4915eceef75ca51d25ddc3a1423847dd 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 0bbefc3076f811430128a058c773323f022c9f2a..60735816210305824c81d6edc69796352ac08cac 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 1d583e41152925e2839ad6f47891b1a3c734d431..7bf09ac89fd43c74c3cc863a4dac19934cd1f7a8 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 835653ae99d5196a02b0cabaf2f559a90e7c17ac..6c39924eb2fe61e85382b76288b2cad1fa17193d 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 35861301c477ac11796024fb618e83977f7838f1..b64dd53d73aa5960b1dafbac7f74921ad6cf703a 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 231690104379a45224320e63e472eaba1dff043a..7647c26ad37b99c73c6198941ef2e22bcaa8e838 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 2d4d57d78db9566a51ed2316f98d5ff408f6b277..1340052d22c479ceafbd77b7ac574811cd3765f0 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 9d44f5d4f51f25cc2a7b08e42cde8a593a901afb..e3caf87c3e9ef9798b83ed4b68ecc4c12a624a48 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 3ed74d6b6d6156ecf272183b1a5e6615a22cd20c..9faaf8aafa7e7833ecec1b37347d8d0752517b43 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 a8a374393cdbe6c97a59e3375ee44807d2385d5a..1751eb563158f92aa76e148d6d63e92dc5d4d95c 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 6c8ec807f2e948d2af6b9818334311c01bc158cb..f2546b81775ca600e59ca8a47cb70cd310507703 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 4ce7c89d5a09d2688145d44fcac45efa0ba3ae30..93a0a5f5b455f5622d53d0c3b72672843ea67ab3 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 28d493c57cc68e230e6174faf7a511bd54d93279..13e51af5bb59947f899d3febdd73693b6bd9f6bc 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 d1646c958c9b17e90ff2a640fc9b4c69bf2b7133..402fbb28d8182b06f89c673c755ecc29e1e8ef2e 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 0715f8f358123b7b4cad402f5e05e2e8901781f7..6bd9e877f15ee3edbe8da95b1ea47ff1767a07c6 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 3dd2e09e9d38d435ace6f3782016d6c25407154a..b24387d2ce9122c153a90c857ae3d1069d7b29c5 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 ec38ec06efbcf87b47410106502eac8b4bfecc81..c6ce4900eb74ec8c7c601dc10d9dbf1a3abf533a 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 b69eec14787c862ca81d7e6f6ff38f8422243ce5..1447a34b79ae4f91f9185ac17c8f27436c157e19 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 302732bcad48c6447bded41bb99e68a24abdb080..79251ae7c58bc7a031af7425dab7548b77dbd13a 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 c483e7ed5d030a07d8835fa43fcbd1bbdb417cf4..5586a4fda3c5b38fc19db6938b957615b6700c06 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 8165e146efe99c1f387cbfbb17936b755109edea..5c150c56840a0a82f913657a6d73353d588c3831 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 53d5335240c4ad10b4f28158d88bcd2b172bf7cb..3b4f9c32c1a9a5c416eb649f40199c4a75597e30 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 16f7895557f698378288f2f7acb3a962f75c9b1b..1490b877ab49f1890fe1cc4fd120a7508d98ed41 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 8088a3cbad20899d24eaf536cb8f31ca46b6c61f..cbfbd8230eab07c09ec6973b8ea07e1000f36b28 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 05bed800de5298d3ead3624435f38403f30b3bc5..6f75b88b585a69580cf3b050353c849474fdb85c 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 fca9938a6213166b8ec86a796aaf09d4d559ce88..e94dcaac822aa128f0399c84f6e7871e781da08a 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 caa91750eff7e0f66a19899ef272238edb26ca3a..5a44a129cc6bcc90ee9fa2bfb6915891344632ca 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 fd533e37d0b9accd738d3f4a4ef7f33ae7a9a83d..269869f8496268ae7bee272cc88f28411b2372d6 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 2fe0260d07b1467862e51ed340e22b725c8a4d01..801ddea6ec5179727d7079f5a33a32e1532e570e 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 b3d3a1cdaa7ebacdbb5956603a7604688bcbad0e..60a2513c325fcf9b4b856c5415cf2e4800aba670 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 f51b9099b4e9b26b2ffa798a1542fe729eb314c9..fafb9436e04f33b754cac44778cdb7397e9ffce2 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 0fabd223f5965b60e410943a88fcd4d0cfa51a07..0958b759e5f906279d7b62b3ee25ac688edd69ee 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 80e47ae8664ede846e37b3f106082243fda51983..ff5e2e1571e2a39912d40e24cd04e65698aeb44c 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 7c5144a6f7f502113e6167eaa2ed5b24dc8b50c7..d6a758f844e2824ee073e3f0cfd925ffe74fa95e 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 c5e80687fd1c1d2099639344803a6c13cfda6458..05e901363ccd0e95653eb58c407957f0d30d8289 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 af01ca61f20a8ad765cc3c643feddb5397f40576..e85465cdf03589c2e64f900899e0f7034de53988 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 05e2a0892b8530d7ac169bd806f3b04430cfbb3c..4027809567d70b0919bd75cdf31a25de72338a63 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 7bcd553c4172a4876baffe91926f0bfedebf4673..03707a5b8bfbb289c0f3bf105b1c970b133eb82f 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 e50cedffe7e56da9e0a9e420c5a3bab7df8fba10..ff631ecb8973a118ddbd77de5d41e7b79a77cce6 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 a2b2e6ca4ea7599237e5252ec1d6df00856fd9b3..bd8ce29fef76944dd9cab8e60344937ee7ccaf4c 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 23fb0d15db1df47c6e87f488556c1dbae3752ac2..dfd7c7803d6023c2243134fd9f3837d7b0d17a3d 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 3dbce30f6c4657a5b7a8c51801694cce9a49e219..f4d29581dee422d6867e641645fb40a24f0fb222 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 1b63e2df67bac70571662b561f890687767ea30c..4061fe67d0751cebadaf76f0aa355f4ea142da30 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 94cbcb0b1766870e11854be50c6c063990d5e653..f9bc8cbca546668504a576a633cf5f5ae7fbed39 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 8d1c2800bc5e7cbf77ca9146a7b353706f065715..50b08313c6d89178db08a5439e62d466391c0a9f 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 3f3cf53e07354a0bde7faac1063214609efb9308..327bbc60a423888b4d4da9477db32816cf16e186 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 9b08f366c89100544408e9a5a71af648920252b0..4ef0b6314381eda677fd57e059e2b3397a4b5465 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 1361280053b395a9eee73df62c5b6dd89034596d..ebd1725622a55cd6b7b6f2def0649009c3e9147a 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 8cf6ff27756abf4f6bfcf03b2321cdfede231061..6f8181cdece752421a0b5f0e85f56beccbe51279 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 c37da6a6ba63b40d6b0a89dd6eab673695ce4ed3..e3cb09b1b7399e1792887f2996ee9c9aaafe72a9 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 d4e7ab1ba976ad6b116954a8054e720b4195d738..67ddced639de2dccba9e272c34a7951d8424c42b 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 8e2495ffbcb54d86abe47a8d470cfccf6d36e5ea..051d5610147ad6da9fb4f019bf5a02d746987385 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 35416e0dd40319de3ce53b1543f63b351e48f708..2965c92834d600b20cd98b3982442e8fe7b3e33f 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 540c9995610c827008164e90ca374846a787a084..34b15a2bc6c18faf82947be336ec05f637d9d622 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 bac867e12af490b2d25e3084f490b5a6e127af7c..3638dd0abc047a7cd0f1926560a7247d3fbbf02f 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 7923f98890323b31748d0bee600553f740c50620..4d93ba27045958cc665cfbe2d0adf1a0cba1b291 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 4acc145c89d5e7e7501191ea2fbe219f4a12ddac..759be889c1822021f4338305a72a1426dc6dcb81 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 93a3dfd9a2d426fa9d00f2f01499c2b6c779f1b5..2b38f89188bc220c5bedc4abd1505ba3f5bab1f1 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 5cec5b92e690f1ab4028b9bb08a436e3bb09ca6a..7fc1be560f5022158f34317aa528910c20db1804 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 b52cf9c8fec0384ad016f4536f199d82ce96b519..58196c81bb601705abb33a2bafa4cd4b6851c78b 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 4a7189ecade70cf7bb1ee6a8b2d3fda5d7063ac2..57b9018914987e80c5b9975f5d8587dd6c0c8980 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 44b42ab6f1d28f655c2a1fa6b00504ce960f52f7..6c20378697855c2be25e240cbd29ba26f8e87497 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 17a3554d7a138702fb1d0bab0c9d4485b49d2011..3f2955c584b17b5eab35164267cb3b101e4a72ec 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 af5488f13e01fc61c8cccdd450aea9de3d2ca4fd..20c048f84b06af5cb85a1e205fdff50e78d98736 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 01729bcc72c73c41fc1622eb1b7224f6429c2b2b..b052968f054c1b090576b1124761c1223946f927 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 f5bf8f600c47359cf9e07ddeb1f0bce966e5c3c5..cc8f9d633c499910fea48585cec02efac914882f 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 ef611825db25d9307675f2ac60feca037b9a2d9e..05446894019a01f1981bddb0193dc51ef31ad346 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 c3413985323aad52fe77a63e08cc31810339d2ac..f7a6ad78e614f6c0938cd3a3ac908038261088e7 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');