diff --git a/test/built-ins/Array/15.4.5-1.js b/test/built-ins/Array/15.4.5-1.js index 16c499e9c7..d8a00abd4a 100644 --- a/test/built-ins/Array/15.4.5-1.js +++ b/test/built-ins/Array/15.4.5-1.js @@ -4,14 +4,9 @@ /*--- es5id: 15.4.5-1 description: Array instances have [[Class]] set to 'Array' -includes: [runTestCase.js] ---*/ -function testcase() { var a = []; var s = Object.prototype.toString.call(a); - if (s === '[object Array]') { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(s, '[object Array]', 's'); diff --git a/test/built-ins/Array/15.4.5.1-3.d-3.js b/test/built-ins/Array/15.4.5.1-3.d-3.js index 61e4d9b61b..7367a8a0fc 100644 --- a/test/built-ins/Array/15.4.5.1-3.d-3.js +++ b/test/built-ins/Array/15.4.5.1-3.d-3.js @@ -4,12 +4,9 @@ /*--- es5id: 15.4.5.1-3.d-3 description: Set array length property to max value 4294967295 (2**32-1,) -includes: [runTestCase.js] ---*/ -function testcase() { var a =[]; a.length = 4294967295 ; - return a.length===4294967295 ; - } -runTestCase(testcase); + +assert.sameValue(a.length, 4294967295, 'a.length'); diff --git a/test/built-ins/Array/15.4.5.1-5-1.js b/test/built-ins/Array/15.4.5.1-5-1.js index 00bcc54f2d..945bf9ae4e 100644 --- a/test/built-ins/Array/15.4.5.1-5-1.js +++ b/test/built-ins/Array/15.4.5.1-5-1.js @@ -6,12 +6,9 @@ es5id: 15.4.5.1-5-1 description: > Defining a property named 4294967295 (2**32-1)(not an array element) -includes: [runTestCase.js] ---*/ -function testcase() { var a =[]; a[4294967295] = "not an array element" ; - return a[4294967295] === "not an array element"; - } -runTestCase(testcase); + +assert.sameValue(a[4294967295], "not an array element", 'a[4294967295]'); diff --git a/test/built-ins/Array/15.4.5.1-5-2.js b/test/built-ins/Array/15.4.5.1-5-2.js index b7d365dd2f..924c48f479 100644 --- a/test/built-ins/Array/15.4.5.1-5-2.js +++ b/test/built-ins/Array/15.4.5.1-5-2.js @@ -6,12 +6,9 @@ es5id: 15.4.5.1-5-2 description: > Defining a property named 4294967295 (2**32-1) doesn't change length of the array -includes: [runTestCase.js] ---*/ -function testcase() { var a =[0,1,2]; a[4294967295] = "not an array element" ; - return a.length===3; - } -runTestCase(testcase); + +assert.sameValue(a.length, 3, 'a.length'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-0-1.js b/test/built-ins/Array/isArray/15.4.3.2-0-1.js index 8ac307382f..a7153724ac 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-0-1.js +++ b/test/built-ins/Array/isArray/15.4.3.2-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.3.2-0-1 description: Array.isArray must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.isArray; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-0-2.js b/test/built-ins/Array/isArray/15.4.3.2-0-2.js index 07bb3368de..ba95a7ad4a 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-0-2.js +++ b/test/built-ins/Array/isArray/15.4.3.2-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.3.2-0-2 description: Array.isArray must exist as a function taking 1 parameter -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.isArray.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.isArray.length, 1, 'Array.isArray.length'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-0-3.js b/test/built-ins/Array/isArray/15.4.3.2-0-3.js index 62dd2a7007..4b8141dc7f 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-0-3.js +++ b/test/built-ins/Array/isArray/15.4.3.2-0-3.js @@ -4,14 +4,9 @@ /*--- es5id: 15.4.3.2-0-3 description: Array.isArray return true if its argument is an Array -includes: [runTestCase.js] ---*/ -function testcase() { var a = []; var b = Array.isArray(a); - if (b === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(b, true, 'b'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-0-4.js b/test/built-ins/Array/isArray/15.4.3.2-0-4.js index 4d70abfa10..652430d8ad 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-0-4.js +++ b/test/built-ins/Array/isArray/15.4.3.2-0-4.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.3.2-0-4 description: Array.isArray return false if its argument is not an Array -includes: [runTestCase.js] ---*/ -function testcase() { var b_num = Array.isArray(42); var b_undef = Array.isArray(undefined); var b_bool = Array.isArray(true); @@ -15,13 +13,10 @@ function testcase() { var b_obj = Array.isArray({}); var b_null = Array.isArray(null); - if (b_num === false && - b_undef === false && - b_bool === false && - b_str === false && - b_obj === false && - b_null === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(b_num, false, 'b_num'); +assert.sameValue(b_undef, false, 'b_undef'); +assert.sameValue(b_bool, false, 'b_bool'); +assert.sameValue(b_str, false, 'b_str'); +assert.sameValue(b_obj, false, 'b_obj'); +assert.sameValue(b_null, false, 'b_null'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-0-5.js b/test/built-ins/Array/isArray/15.4.3.2-0-5.js index 91c356f96b..70cd14fc48 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-0-5.js +++ b/test/built-ins/Array/isArray/15.4.3.2-0-5.js @@ -6,13 +6,8 @@ es5id: 15.4.3.2-0-5 description: > Array.isArray return true if its argument is an Array (Array.prototype) -includes: [runTestCase.js] ---*/ -function testcase() { var b = Array.isArray(Array.prototype); - if (b === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(b, true, 'b'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-0-6.js b/test/built-ins/Array/isArray/15.4.3.2-0-6.js index d10e943e8b..0a3144adc2 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-0-6.js +++ b/test/built-ins/Array/isArray/15.4.3.2-0-6.js @@ -4,14 +4,9 @@ /*--- es5id: 15.4.3.2-0-6 description: Array.isArray return true if its argument is an Array (new Array()) -includes: [runTestCase.js] ---*/ -function testcase() { var a = new Array(10); var b = Array.isArray(a); - if (b === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(b, true, 'b'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-0-7.js b/test/built-ins/Array/isArray/15.4.3.2-0-7.js index 1a593e8993..9292b2de71 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-0-7.js +++ b/test/built-ins/Array/isArray/15.4.3.2-0-7.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.3.2-0-7 description: Array.isArray returns false if its argument is not an Array -includes: [runTestCase.js] ---*/ -function testcase() { var o = new Object(); o[12] = 13; var b = Array.isArray(o); - if (b === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(b, false, 'b'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-13.js b/test/built-ins/Array/isArray/15.4.3.2-1-13.js index bb8a0cbea2..8d233f114c 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-13.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-13.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.3.2-1-13 description: Array.isArray applied to Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - var arg; (function fun() { arg = arguments; }(1, 2, 3)); - return !Array.isArray(arg); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(arg), false, 'Array.isArray(arg)'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-2-1.js b/test/built-ins/Array/isArray/15.4.3.2-2-1.js index 6e6ff90f4a..55ea40277a 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-2-1.js +++ b/test/built-ins/Array/isArray/15.4.3.2-2-1.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.3.2-2-1 description: Array.isArray applied to an object with an array as the prototype -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = []; var Con = function () { }; Con.prototype = proto; var child = new Con(); - return !Array.isArray(child); - } -runTestCase(testcase); + +assert.sameValue(Array.isArray(child), false, 'Array.isArray(child)'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-2-2.js b/test/built-ins/Array/isArray/15.4.3.2-2-2.js index 2453dda4e7..1c37dee8fb 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-2-2.js +++ b/test/built-ins/Array/isArray/15.4.3.2-2-2.js @@ -6,17 +6,12 @@ es5id: 15.4.3.2-2-2 description: > Array.isArray applied to an object with Array.prototype as the prototype -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = Array.prototype; var Con = function () { }; Con.prototype = proto; var child = new Con(); - return !Array.isArray(child); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(child), false, 'Array.isArray(child)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-0-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-0-1.js index 334e9fb3a8..41dbefae06 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-0-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.16-0-1 description: Array.prototype.every must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.every; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-0-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-0-2.js index b033e1eab9..dd3b97d07c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-0-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.16-0-2 description: Array.prototype.every.length must be 1 -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.every.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.length, 1, 'Array.prototype.every.length'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-11.js index 8d252842d4..02588fc021 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-11.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-1-11 description: Array.prototype.every applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return !(obj instanceof Date); } @@ -16,6 +14,4 @@ function testcase() { obj.length = 1; obj[0] = 1; - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-12.js index b43788cee0..7bf02ad2fa 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-12.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-1-12 description: Array.prototype.every applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return !(obj instanceof RegExp); } @@ -16,6 +14,4 @@ function testcase() { obj.length = 1; obj[0] = 1; - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-14.js index ea7a72ab34..d21af70376 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-14.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-1-14 description: Array.prototype.every applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return !(obj instanceof Error); } @@ -16,6 +14,4 @@ function testcase() { obj.length = 1; obj[0] = 1; - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-15.js index ffa666c377..1fa0cfb540 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-15.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-1-15 description: Array.prototype.every applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return ('[object Arguments]' !== Object.prototype.toString.call(obj)); } @@ -16,6 +14,4 @@ function testcase() { return arguments; }("a", "b")); - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js index ade2b448ba..d8bae2ece9 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-4.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-1-4 description: Array.prototype.every applied to Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -18,6 +16,6 @@ function testcase() { obj.length = 2; obj[0] = 11; obj[1] = 12; - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); + +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js index 018b49c323..5144b987ae 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-1-6 description: Array.prototype.every applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -18,6 +16,6 @@ function testcase() { obj.length = 2; obj[0] = 11; obj[1] = 12; - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); + +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-7.js index b69f9c4c9c..fd76bf389d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-7.js @@ -4,14 +4,10 @@ /*--- es5id: 15.4.4.16-1-7 description: Array.prototype.every applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return !(obj instanceof String); } - return !Array.prototype.every.call("hello\nworld\\!", callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call("hello\nworld\\!", callbackfn), false, 'Array.prototype.every.call("hello\nworld\\!", callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-8.js index 3cf8e2501f..ea466b1986 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-8.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.16-1-8 description: Array.prototype.every applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return !(obj instanceof String); } var obj = new String("hello\nworld\\!"); - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js index 615c19a3f5..91b8ff62b5 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-1-9.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-1-9 description: Array.prototype.every applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return !(obj instanceof Function); } @@ -18,6 +16,4 @@ function testcase() { obj[0] = 11; obj[1] = 9; - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-1.js index 5e61b71ad4..454709cfb8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-1.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-1 description: > Array.prototype.every applied to Array-like object, 'length' is an own data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -25,7 +23,5 @@ function testcase() { length: 2 }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js index 1be2598f9b..7b76b8a29d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-10.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-10 description: > Array.prototype.every applied to Array-like object, 'length' is an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -35,7 +33,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js index 67e40c2114..e050ba3d88 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-2-11 description: > Array.prototype.every applied to Array-like object, 'length' is an own accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -27,6 +24,5 @@ function testcase() { configurable: true }); - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js index f7eb4bbffa..cf51fc6d98 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-2-13 description: > Array.prototype.every applied to the Array-like object that 'length' is inherited accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -31,6 +28,5 @@ function testcase() { child[0] = 9; child[1] = 8; - return Array.prototype.every.call(child, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(child, callbackfn), 'Array.prototype.every.call(child, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js index 3ca470cd83..0eec102ecb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-2-14 description: > Array.prototype.every applied to the Array-like object that 'length' property doesn't exist -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, 1: 12 }; - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js index 198aaacc90..61d83bb9e7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-17.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-17 description: > Array.prototype.every applied to the Arguments object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -24,6 +22,4 @@ function testcase() { !Array.prototype.every.call(arguments, callbackfn2); }; - return func(12, 11); - } -runTestCase(testcase); +assert(func(12, 11), 'func(12, 11) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js index 2c75f2bfb2..d4595269ac 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-19.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-19 description: > Array.prototype.every applied to Function object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -25,7 +23,5 @@ function testcase() { fun[1] = 11; fun[2] = 9; - return Array.prototype.every.call(fun, callbackfn1) && - !Array.prototype.every.call(fun, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(fun, callbackfn1), 'Array.prototype.every.call(fun, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(fun, callbackfn2), false, 'Array.prototype.every.call(fun, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js index 91d97f84ca..73d533dec6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-3 description: > Array.prototype.every applied to Array-like object, 'length' is an own data property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -29,7 +27,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js index 1553960c27..a8056e8503 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-5 description: > Array.prototype.every applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -40,7 +38,5 @@ function testcase() { configurable: true }); - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js index cca8296217..2e6e6e8d35 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-6 description: > Array.prototype.every applied to Array-like object, 'length' is an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -28,7 +26,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js index 9480ff4eaa..c43b0fb7f1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-7 description: > Array.prototype.every applied to Array-like object, 'length' is an own accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -31,7 +29,5 @@ function testcase() { obj[1] = 11; obj[2] = 9; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js index ce2d5563b2..3eeafcd41e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-8 description: > Array.prototype.every applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -36,7 +34,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js index a6b5239a46..8ef912d27e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-2-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-2-9 description: > Array.prototype.every applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -43,7 +41,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.every.call(child, callbackfn1) && - !Array.prototype.every.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(child, callbackfn1), 'Array.prototype.every.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(child, callbackfn2), false, 'Array.prototype.every.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js index b9d048c1cd..3e6bb32591 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-3-1 description: Array.prototype.every - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 9, length: undefined }; - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js index c791bc297b..b76b861a26 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-10 description: > Array.prototype.every - value of 'length' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 9, length: NaN }; - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js index fc3185beae..3f710093a2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-11.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-11 description: > Array.prototype.every - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js index 7ef240ee14..c2c384c3ff 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-12.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-12 description: > Array.prototype.every - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; - return Array.prototype.every.call(obj, callbackfn1) && - Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js index 63f6636e87..7830b0a531 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-13.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-13 description: > Array.prototype.every - 'length' is a string containing a decimal number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js index 35b56f487e..5ae5aa4502 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-3-14 description: Array.prototype.every - 'length' is a string containing +/-Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,8 +17,7 @@ function testcase() { var objTwo = { 0: 9, length: "+Infinity" }; var objThree = { 0: 9, length: "-Infinity" }; - return !Array.prototype.every.call(objOne, callbackfn) && - !Array.prototype.every.call(objTwo, callbackfn) && - Array.prototype.every.call(objThree, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(objOne, callbackfn), false, 'Array.prototype.every.call(objOne, callbackfn)'); +assert.sameValue(Array.prototype.every.call(objTwo, callbackfn), false, 'Array.prototype.every.call(objTwo, callbackfn)'); +assert(Array.prototype.every.call(objThree, callbackfn), 'Array.prototype.every.call(objThree, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js index bcd66fcc4d..bd66758858 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-15.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-15 description: > Array.prototype.every - 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js index e5efebb271..8ca825d853 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-16.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-16 description: > Array.prototype.every - 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js index a6255a3437..8335b49cc2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-17.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-17 description: > Array.prototype.every - 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js index 351333ab89..08ccda321c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-18 description: > Array.prototype.every - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 9, 1: 8, length: "two" }; - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js index e17fe1b464..3f604c0407 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-19.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-19 description: > Array.prototype.every - value of 'length' is an Object which has an own toString method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -37,7 +35,7 @@ function testcase() { // does not return a primitive value, ES next tries to convert the object // to a number by calling its toString() method and converting the // resulting string to a number. - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2) && toStringAccessed; - } -runTestCase(testcase); + +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); +assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js index aacab1839c..5a9b9249c2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-2 description: > Array.prototype.every on an Array-like object if 'length' is 1 (length overridden to true(type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn1(val, idx, obj) { return val > 10; } @@ -21,7 +18,5 @@ function testcase() { var obj = { 0: 11, 1: 9, length: true }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js index f0aea35fbd..d60770a261 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-20.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-20 description: > Array.prototype.every - value of 'length' is an Object which has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -32,7 +30,6 @@ function testcase() { } }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2) && valueOfAccessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js index 96fedf25cd..ab798b90e6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-21.js @@ -7,10 +7,8 @@ description: > Array.prototype.every - '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 callbackfn1(val, idx, obj) { return val > 10; } @@ -38,9 +36,7 @@ function testcase() { } }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2) && - valueOfAccessed && - toStringAccessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js index 6a733b349b..f52b5a0890 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-23 description: > Array.prototype.every uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn1(val, idx, obj) { return val > 10; } @@ -46,8 +43,7 @@ function testcase() { length: child }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2) && - valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js index ba9d8dbbe2..4138f96c72 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-24.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-24 description: > Array.prototype.every - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js index 4530720b3c..70c2366bed 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-25.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-3-25 description: Array.prototype.every - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -23,7 +21,5 @@ function testcase() { length: -4294967294.5 }; - return Array.prototype.every.call(obj, callbackfn1) && - Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js index af8fc555fb..b599a88edc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-29.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-29 description: > Array.prototype.every - value of 'length' is boundary value (2^32 + 1) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -24,7 +22,5 @@ function testcase() { length: 4294967297 }; - return !Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn1), false, 'Array.prototype.every.call(obj, callbackfn1)'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js index 606e0f152c..65b5939b5d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-3.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-3-3 description: Array.prototype.every - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 9, length: 0 }; - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js index 87d2b22ad3..b31c35d4ac 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-3-4 description: Array.prototype.every - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 9, length: +0 }; - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js index fdff995da1..04493fb716 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-5.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-3-5 description: Array.prototype.every - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 9, length: -0 }; - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js index 24fcae7c26..f074dd8250 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-6 description: > Array.prototype.every - value of 'length' is a number (value is positive) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: 2 }; - return Array.prototype.every.call(obj, callbackfn1) && - !Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.every.call(obj, callbackfn2), false, 'Array.prototype.every.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js index 0c2ea070f0..ee80d50dc2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-3-7 description: > Array.prototype.every - value of 'length' is a number (value is negative) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: -4294967294 }; //length used to exec while loop is 0 - return Array.prototype.every.call(obj, callbackfn1) && - Array.prototype.every.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn1), 'Array.prototype.every.call(obj, callbackfn1) !== true'); +assert(Array.prototype.every.call(obj, callbackfn2), 'Array.prototype.every.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js index edc2f39358..9be3f5dc56 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-8 description: > Array.prototype.every - value of 'length' is a number (value is Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 9, length: Infinity }; - return !Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js index e4609a714a..c4d3f4f3d6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-3-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-3-9 description: > Array.prototype.every - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 9, length: -Infinity }; - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js index 60294f02f3..3c794e9bd3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-4-12.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.16-4-12 description: Array.prototype.every - 'callbackfn' is a function -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } - return ![11, 9].every(callbackfn); - } -runTestCase(testcase); +assert.sameValue([11, 9].every(callbackfn), false, '[11, 9].every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js index 9f1db85284..11248839f1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-1-s.js @@ -5,10 +5,8 @@ es5id: 15.4.4.16-5-1-s description: Array.prototype.every - 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].every(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); + +assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js index 816a8b372e..35a3031c8a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-1.js @@ -5,20 +5,14 @@ es5id: 15.4.4.16-5-1 description: Array.prototype.every - thisArg not passed flags: [noStrict] -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === fnGlobalObject(); } var arr = [1]; - if(arr.every(callbackfn) === true) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js index d010b4b004..6d20b4f2c2 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-10.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-10 description: Array.prototype.every - Array Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objArray = []; @@ -19,6 +16,5 @@ function testcase() { - return [11].every(callbackfn, objArray) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, objArray), '[11].every(callbackfn, objArray) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js index eae46faafb..e2c86aeb61 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-11.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-11 description: Array.prototype.every - String Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objString = new String(); @@ -19,6 +16,5 @@ function testcase() { - return [11].every(callbackfn, objString) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, objString), '[11].every(callbackfn, objString) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js index 60b2b8e71d..c7e6ea402e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-12 description: Array.prototype.every - Boolean Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objBoolean = new Boolean(); @@ -19,6 +16,5 @@ function testcase() { - return [11].every(callbackfn, objBoolean) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, objBoolean), '[11].every(callbackfn, objBoolean) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js index 7cca10e0fa..b290008954 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-13.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-13 description: Array.prototype.every - Number Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objNumber = new Number(); @@ -17,6 +14,5 @@ function testcase() { return this === objNumber; } - return [11].every(callbackfn, objNumber) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, objNumber), '[11].every(callbackfn, objNumber) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js index 934c59cb15..8c087a3f21 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-14 description: Array.prototype.every - the Math object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { return this === Math; } - return [11].every(callbackfn, Math) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, Math), '[11].every(callbackfn, Math) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js index ad92702ac4..c89392af27 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-15.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-15 description: Array.prototype.every - Date Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objDate = new Date(); @@ -17,6 +14,5 @@ function testcase() { return this === objDate; } - return [11].every(callbackfn, objDate) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, objDate), '[11].every(callbackfn, objDate) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js index 07ac13887b..e857b3172f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-16.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-16 description: Array.prototype.every - RegExp Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objRegExp = new RegExp(); @@ -17,6 +14,5 @@ function testcase() { return this === objRegExp; } - return [11].every(callbackfn, objRegExp) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, objRegExp), '[11].every(callbackfn, objRegExp) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js index fb5f986a73..ac9b5d91c5 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-17.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-5-17 description: Array.prototype.every - the JSON object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { @@ -15,6 +13,5 @@ function testcase() { return this === JSON; } - return [11].every(callbackfn, JSON) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, JSON), '[11].every(callbackfn, JSON) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js index 753f0c6885..f4d69c27fc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-18.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-18 description: Array.prototype.every - Error Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objError = new RangeError(); @@ -17,6 +14,5 @@ function testcase() { return this === objError; } - return [11].every(callbackfn, objError) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, objError), '[11].every(callbackfn, objError) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js index 2760add13b..9eba5c3f2d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-19 description: Array.prototype.every - the Arguments object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var arg; @@ -21,6 +18,5 @@ function testcase() { arg = arguments; }(1, 2, 3)); - return [11].every(callbackfn, arg) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, arg), '[11].every(callbackfn, arg) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js index 225e990b4a..79792b07f0 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-5-2 description: Array.prototype.every - thisArg is Object -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var o = new Object(); o.res = true; @@ -17,8 +15,5 @@ function testcase() { } var arr = [1]; - if(arr.every(callbackfn, o) === true) - return true; - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn, o), true, 'arr.every(callbackfn, o)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js index 7994fa0c15..816ddb5b86 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-21.js @@ -4,13 +4,9 @@ /*--- es5id: 15.4.4.16-5-21 description: Array.prototype.every - the global object can be used as thisArg -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +14,5 @@ function testcase() { return this === fnGlobalObject(); } - return [11].every(callbackfn, fnGlobalObject()) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, fnGlobalObject()), '[11].every(callbackfn, fnGlobalObject()) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js index 10240f6d81..0bdf6cd47b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-22.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-22 description: Array.prototype.every - boolean primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { return this.valueOf() === false; } - return [11].every(callbackfn, false) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, false), '[11].every(callbackfn, false) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js index 85a1723613..ec68c7603f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-23.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-23 description: Array.prototype.every - number primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { return this.valueOf() === 101; } - return [11].every(callbackfn, 101) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, 101), '[11].every(callbackfn, 101) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js index 40149e04f8..e2ef5e89d8 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-24.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-24 description: Array.prototype.every - string primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { return this.valueOf() === "abc"; } - return [11].every(callbackfn, "abc") && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, "abc"), '[11].every(callbackfn, "abc") !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js index 27901a4024..a2ce2f3b73 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-5-3 description: Array.prototype.every - thisArg is Array -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var a = new Array(); a.res = true; @@ -18,8 +16,4 @@ function testcase() { var arr = [1]; - if(arr.every(callbackfn, a) === true) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn, a), true, 'arr.every(callbackfn, a)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js index 3424b5ddcd..7c7c566bf6 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-5-4 description: > Array.prototype.every - thisArg is object from object template(prototype) -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -21,8 +19,4 @@ function testcase() { var f = new foo(); var arr = [1]; - if(arr.every(callbackfn,f) === true) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn,f), true, 'arr.every(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js index 942bc8000e..903588b472 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-5.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-5-5 description: Array.prototype.every - thisArg is object from object template -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -19,8 +17,4 @@ function testcase() { f.res = true; var arr = [1]; - if(arr.every(callbackfn,f) === true) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn,f), true, 'arr.every(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js index af2ddd62dc..4f03a9e6ff 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-5-6 description: Array.prototype.every - thisArg is function -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -18,8 +16,4 @@ function testcase() { foo.res = true; var arr = [1]; - if(arr.every(callbackfn,foo) === true) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn,foo), true, 'arr.every(callbackfn,foo)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js index a2ac5bb7f0..29835e8818 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-7.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-7 description: Array.prototype.every - built-in functions can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { return this === eval; } - return [11].every(callbackfn, eval) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, eval), '[11].every(callbackfn, eval) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js index 019e7f54fe..947fe3816c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-5-9.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-5-9 description: Array.prototype.every - Function Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objFunction = function () { }; @@ -17,6 +14,5 @@ function testcase() { return this === objFunction; } - return [11].every(callbackfn, objFunction) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn, objFunction), '[11].every(callbackfn, objFunction) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js index 388d9c74fa..04f0ca3f75 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-1 description: > Array.prototype.every considers new elements added to array after the call -includes: [runTestCase.js] ---*/ -function testcase() { - var calledForThree = false; function callbackfn(val, Idx, obj) @@ -25,6 +22,4 @@ function testcase() { var res = arr.every(callbackfn); - return calledForThree; - } -runTestCase(testcase); +assert(calledForThree, 'calledForThree !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js index 350fb1a9c1..4407deb10f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-2 description: > Array.prototype.every considers new value of elements in array after the call -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, Idx, obj) { arr[4] = 6; @@ -22,8 +19,5 @@ function testcase() { var arr = [1,2,3,4,5]; - if(arr.every(callbackfn) === false) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js index 6dc1c08c52..2fea06cc9a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-3 description: > Array.prototype.every doesn't visit deleted elements in array after the call -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, Idx, obj) { delete arr[2]; @@ -22,8 +19,5 @@ function testcase() { var arr = [1,2,3,4,5]; - if(arr.every(callbackfn) === true) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js index 7c509b083b..b02950b08a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-4 description: > Array.prototype.every doesn't visit deleted elements when Array.length is decreased -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, Idx, obj) { arr.length = 3; @@ -22,8 +19,5 @@ function testcase() { var arr = [1,2,3,4,6]; - if(arr.every(callbackfn) === true) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js index f280b01d0e..9c26a92877 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-5 description: > Array.prototype.every doesn't consider newly added elements in sparse array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, Idx, obj) { arr[1000] = 3; @@ -24,8 +21,5 @@ function testcase() { arr[1] = 1; arr[2] = 2; - if(arr.every(callbackfn) === true) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js index bcc13a080e..27f0908f65 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-6 description: > Array.prototype.every 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 arr[2]; @@ -26,8 +23,4 @@ function testcase() { var res = arr.every(callbackfn); delete Array.prototype[2]; - if(res === false) - return true; - - } -runTestCase(testcase); +assert.sameValue(res, false, 'res'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js index fbba7d44d0..88afff658c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-7.js @@ -7,10 +7,8 @@ description: > Array.prototype.every - Deleting the array itself within the callbackfn of Array.prototype.every is successful once Array.prototype.every is called for all elements -includes: [runTestCase.js] ---*/ -function testcase() { var o = new Object(); o.arr = [1, 2, 3, 4, 5]; @@ -22,6 +20,5 @@ function testcase() { return false; } - return o.arr.every(callbackfn) && !o.hasOwnProperty("arr"); - } -runTestCase(testcase); +assert(o.arr.every(callbackfn), 'o.arr.every(callbackfn) !== true'); +assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js index ecf6f642f9..21e4661024 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-8.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-7-8 description: Array.prototype.every - no observable effects occur if len is 0 -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 0 }; - return Array.prototype.every.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js index 341ae8b9e1..82ec7e3360 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-9 description: > Array.prototype.every - modifications to length don't change number of iterations -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -28,6 +25,5 @@ function testcase() { configurable: true }); - return Array.prototype.every.call(obj, callbackfn) && 2 === called; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js index 9d52a96122..5089e2b935 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-b-1 description: > Array.prototype.every - 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,5 @@ function testcase() { var arr = new Array(10); arr[1] = undefined; arr.every(callbackfn); - if( callCnt === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js index c99df07380..f00412ad73 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-14.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-14 description: > Array.prototype.every - decreasing length of array causes index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -25,6 +23,5 @@ function testcase() { configurable: true }); - return arr.every(callbackfn) && accessed; - } -runTestCase(testcase); +assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js index bb0ac719ce..26e4f608cc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-16.js @@ -7,10 +7,8 @@ description: > Array.prototype.every - 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; @@ -36,6 +34,4 @@ function testcase() { configurable: true }); - return !arr.every(callbackfn); - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js index cc2d06ed0d..cc87540f50 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-7-b-2 description: Array.prototype.every - 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; @@ -26,6 +24,4 @@ function testcase() { configurable: true }); - return !Array.prototype.every.call(arr, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js index c7bfbfbfa7..0f1363951a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-3 description: > Array.prototype.every - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -25,6 +23,5 @@ function testcase() { configurable: true }); - return Array.prototype.every.call(arr, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(arr, callbackfn), 'Array.prototype.every.call(arr, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js index a72e69d2b5..9de597954a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-b-4 description: > Array.prototype.every - 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; @@ -34,6 +31,4 @@ function testcase() { configurable: true }); - return !Array.prototype.every.call(arr, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(arr, callbackfn), false, 'Array.prototype.every.call(arr, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js index 66cfbffa55..6c8be5f7d5 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-5 description: > Array.prototype.every - 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; @@ -33,6 +31,4 @@ function testcase() { configurable: true }); - return !arr.every(callbackfn); - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js index aa1acb7697..1e6af8de5a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-8 description: > Array.prototype.every - deleting own property causes index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -32,6 +30,5 @@ function testcase() { configurable: true }); - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js index 045d07b128..2297618eab 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-b-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-b-9 description: > Array.prototype.every - deleting own property causes index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -32,6 +30,5 @@ function testcase() { configurable: true }); - return arr.every(callbackfn) && accessed; - } -runTestCase(testcase); +assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js index 459eaed1bb..68355ff1d1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-1 description: > Array.prototype.every - 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) { if (idx === 5) { @@ -22,6 +19,4 @@ function testcase() { var obj = { 5: kValue, length: 100 }; - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js index 919559e5ab..0add2652ff 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-10 description: > Array.prototype.every - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 2) { return val !== 12; @@ -28,6 +25,4 @@ function testcase() { configurable: true }); - return !arr.every(callbackfn); - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js index f02036f5c1..939219d9fb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 5; @@ -35,6 +32,4 @@ function testcase() { configurable: true }); - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js index 05d57d9daf..5cfa774bd9 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-13.js @@ -7,10 +7,8 @@ description: > Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 1) { return val === 6; @@ -42,6 +40,4 @@ function testcase() { }); - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js index 68234d78d9..94ea606a73 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-15 description: > Array.prototype.every - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return val !== 11; @@ -34,6 +31,4 @@ function testcase() { var child = new Con(); child.length = 20; - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js index 99e912853c..da59df8c8f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-17 description: > Array.prototype.every - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -24,6 +21,5 @@ function testcase() { configurable: true }); - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js index 0091b52c5d..5e59ae3262 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-18 description: > Array.prototype.every - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -25,6 +22,5 @@ function testcase() { configurable: true }); - return arr.every(callbackfn) && accessed; - } -runTestCase(testcase); +assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js index 0f8a5673ab..8275dde6c3 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-2 description: > Array.prototype.every - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return val === 11; } - return [11].every(callbackfn) && 1 === called; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js index d59f4bfc19..00477a864e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-21 description: > Array.prototype.every - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -30,6 +27,5 @@ function testcase() { var child = new Con(); child.length = 2; - return Array.prototype.every.call(child, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(child, callbackfn), 'Array.prototype.every.call(child, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js index efe2262b3f..0261368d93 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -23,6 +20,5 @@ function testcase() { return Array.prototype.every.call(arguments, callbackfn); }; - return func(11) && called === 1; - } -runTestCase(testcase); +assert(func(11), 'func(11) !== true'); +assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js index 522547ef2f..d2f8697536 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -29,6 +26,5 @@ function testcase() { return Array.prototype.every.call(arguments, callbackfn); }; - return func(11, 9) && called === 2; - } -runTestCase(testcase); +assert(func(11, 9), 'func(11, 9) !== true'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js index 76e2eed379..0f63f756a0 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -29,6 +26,5 @@ function testcase() { return Array.prototype.every.call(arguments, callbackfn); }; - return func(11, 12, 9) && called === 3; - } -runTestCase(testcase); +assert(func(11, 12, 9), 'func(11, 12, 9) !== true'); +assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js index 5b67412105..af1fa182cc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-28 description: > Array.prototype.every - element changed by getter on previous iterations is observed on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var arr = []; @@ -37,6 +34,4 @@ function testcase() { configurable: true }); - return !arr.every(callbackfn); - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js index ba0657f4a7..3fc48b6561 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-29.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-c-i-29 description: > Array.prototype.every - element changed by getter on previous iterations is observed on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -36,6 +34,4 @@ function testcase() { configurable: true }); - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js index 04fdce65d8..4da6ee9140 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-3 description: > Array.prototype.every - element to be retrieved is own data property that overrides an inherited data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 5) { return val === 100; @@ -28,6 +25,4 @@ function testcase() { child[5] = "abc"; child.length = 10; - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js index 4bcd28b956..f82e99a6a0 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.every - element to be retrieved is own data property 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 val === 5; @@ -40,6 +37,4 @@ function testcase() { }); child[1] = 12; - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js index 153057c610..aada200f15 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-7 description: > Array.prototype.every - 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 child = new Con(); child.length = 10; - return !Array.prototype.every.call(child, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(child, callbackfn), false, 'Array.prototype.every.call(child, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js index dcd4a56ea6..1ae1f2968c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-i-9 description: > Array.prototype.every - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val !== 11; @@ -28,6 +25,5 @@ function testcase() { configurable: true }); - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js index ff41a36fc4..ffce470364 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-7-c-ii-1 description: Array.prototype.every - callbackfn called with correct parameters -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, Idx, obj) { if(obj[Idx] === val) @@ -17,7 +14,5 @@ function testcase() { var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.every(callbackfn) === true) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js index 793b18e0a8..091894cb95 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-10 description: > Array.prototype.every - callbackfn is called with 1 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val) { @@ -18,6 +15,5 @@ function testcase() { return val > 10; } - return [11, 12].every(callbackfn) && 2 === called; - } -runTestCase(testcase); +assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js index 40dfb94557..7ade9db577 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-11 description: > Array.prototype.every - callbackfn is called with 2 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx) { @@ -18,6 +15,5 @@ function testcase() { return val > 10 && arguments[2][idx] === val; } - return [11, 12].every(callbackfn) && 2 === called; - } -runTestCase(testcase); +assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js index 2c009e73b6..d830369007 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-12 description: > Array.prototype.every - callbackfn is called with 3 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return val > 10 && obj[idx] === val; } - return [11, 12, 13].every(callbackfn) && 3 === called; - } -runTestCase(testcase); +assert([11, 12, 13].every(callbackfn), '[11, 12, 13].every(callbackfn) !== true'); +assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js index 4b84fb4333..9c45197f83 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-13 description: > Array.prototype.every - callbackfn that uses arguments object to get parameter value -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn() { @@ -18,6 +15,5 @@ function testcase() { return arguments[2][arguments[1]] === arguments[0]; } - return [11, 12].every(callbackfn) && 2 === called; - } -runTestCase(testcase); +assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js index 0b14e0aaee..0714363e56 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-16 description: > Array.prototype.every - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean primitive) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; - return !Array.prototype.every.call(obj, callbackfn, false) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn, false), false, 'Array.prototype.every.call(obj, callbackfn, false)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js index 5f61e4cf19..4c8cedfaa7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-17 description: > Array.prototype.every -'this' of 'callbackfn' is a Number object when T is not an object (T is a number primitive) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, o) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; - return Array.prototype.every.call(obj, callbackfn, 5) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn, 5), 'Array.prototype.every.call(obj, callbackfn, 5) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js index 98df4460da..40c891e518 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-18 description: > Array.prototype.every - 'this' of 'callbackfn' is an String object when T is not an object (T is a string primitive) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; - return Array.prototype.every.call(obj, callbackfn, "hello") && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn, "hello"), 'Array.prototype.every.call(obj, callbackfn, "hello") !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js index b6ade2796e..2affd4a3e9 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-7-c-ii-19 description: Array.prototype.every - non-indexed properties are not called -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; - return Array.prototype.every.call(obj, callbackfn) && 2 === called; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js index f4f477ca7c..912ca91599 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-7-c-ii-2 description: Array.prototype.every - callbackfn takes 3 arguments -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, Idx, obj) { if(arguments.length === 3) //verify if callbackfn was called with 3 parameters @@ -18,7 +15,5 @@ function testcase() { var arr = [0,1,true,null,new Object(),"five"]; arr[999999] = -6.6; - if(arr.every(callbackfn) === true) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js index e2b400709c..eb18b7510f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-20 description: > Array.prototype.every - callbackfn called with correct parameters (thisArg is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -22,6 +19,4 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.every.call(obj, callbackfn, thisArg); - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn, thisArg), 'Array.prototype.every.call(obj, callbackfn, thisArg) !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js index 78530de6d3..b6584f3094 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-21 description: > Array.prototype.every - callbackfn called with correct parameters (kValue is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -27,6 +24,5 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 2 }; - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js index e03f953fec..aa3e59f32a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-22 description: > Array.prototype.every - callbackfn called with correct parameters (the index k is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -27,6 +24,5 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 2 }; - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js index d9ef7e0f63..41648647fb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-23 description: > Array.prototype.every - callbackfn called with correct parameters (this object O is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; var obj = { 0: 11, 1: 12, length: 2 }; @@ -19,6 +16,5 @@ function testcase() { return obj === o; } - return Array.prototype.every.call(obj, callbackfn) && 2 === called; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js index 9e50404751..305b784705 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-3 description: > Array.prototype.every immediately returns false if callbackfn returns false -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -23,9 +20,6 @@ function testcase() { var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.every(callbackfn) === false && callCnt === 7) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.every(callbackfn), false, 'arr.every(callbackfn)'); +assert.sameValue(callCnt, 7, 'callCnt'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js index 24547e93e8..8a27831869 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-4 description: > Array.prototype.every - k values are passed in ascending numeric order -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3, 4, 5]; var lastIdx = 0; var called = 0; @@ -24,6 +21,5 @@ function testcase() { } } - return arr.every(callbackfn) && arr.length === called; - } -runTestCase(testcase); +assert(arr.every(callbackfn), 'arr.every(callbackfn) !== true'); +assert.sameValue(arr.length, called, 'arr.length'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js index 6383c6211d..d30fbd8f4b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-7-c-ii-5 description: > Array.prototype.every - k values are accessed during each iteration and not prior to starting the loop on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var called = 0; var kIndex = []; @@ -29,6 +27,5 @@ function testcase() { } } - return [11, 12, 13, 14].every(callbackfn, undefined) && 4 === called; - } -runTestCase(testcase); +assert([11, 12, 13, 14].every(callbackfn, undefined), '[11, 12, 13, 14].every(callbackfn, undefined) !== true'); +assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js index 0a7f320361..a8dadd1abc 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-6.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-7-c-ii-6 description: Array.prototype.every - arguments to callbackfn are self consistent -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var thisArg = {}; var obj = { 0: 11, length: 1 }; @@ -21,6 +18,5 @@ function testcase() { arguments[2] === obj; } - return Array.prototype.every.call(obj, callbackfn, thisArg) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn, thisArg), 'Array.prototype.every.call(obj, callbackfn, thisArg) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js index 46587285ad..a2468c871f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-8 description: > Array.prototype.every - element changed by callbackfn on previous iterations is observed -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, 1: 12, length: 2 }; function callbackfn(val, idx, o) { @@ -22,6 +19,4 @@ function testcase() { - return !Array.prototype.every.call(obj, callbackfn); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js index 566aa860d9..835d116a8f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-ii-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-ii-9 description: > Array.prototype.every - callbackfn is called with 0 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn() { @@ -18,6 +15,5 @@ function testcase() { return true; } - return [11, 12].every(callbackfn) && 2 === called; - } -runTestCase(testcase); +assert([11, 12].every(callbackfn), '[11, 12].every(callbackfn) !== true'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js index 34c004dee1..4da8d5b618 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-7-c-iii-1 description: Array.prototype.every - return value of callbackfn is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var obj = { 0: 11, length: 1 }; @@ -19,6 +16,5 @@ function testcase() { - return !Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js index 537a7404ab..d0b98da8fb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-10 description: > Array.prototype.every - return value of callbackfn is a number (value is Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return Infinity; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js index 0f00336132..e794bad38f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-11 description: > Array.prototype.every - return value of callbackfn is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return -Infinity; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js index d4c7d2074e..99b5e9ce5c 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-12 description: > Array.prototype.every - return value of callbackfn is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return NaN; } - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js index 19aa567063..31e8b22b20 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-13 description: > Array.prototype.every - return value of callbackfn is an empty string -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return ""; } - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js index efb819b177..8d73327734 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-14 description: > Array.prototype.every - return value of callbackfn is a non-empty string -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return "non-empty string"; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js index 305c471d3f..e7e83c7c8b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-15 description: > Array.prototype.every - return value of callbackfn is a Function object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return function () { }; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js index e48eb95317..853755a47b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-16 description: > Array.prototype.every - return value of callbackfn is an Array object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return []; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js index 1425f4c941..334b0e4985 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-17 description: > Array.prototype.every - return value of callbackfn is a String object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return new String(); } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js index 427179711c..f171281e21 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-18 description: > Array.prototype.every - return value of callbackfn is a Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return new Boolean(); } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js index 035beb17f4..f2869ebdc4 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-19 description: > Array.prototype.every - return value of callbackfn is a Number object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return new Number(); } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js index e6a8dead16..52f2db901b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-7-c-iii-2 description: Array.prototype.every - return value of callbackfn is null -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var obj = { 0: 11, length: 1 }; @@ -19,6 +16,5 @@ function testcase() { - return !Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js index 4f35b45cc5..d485101883 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-20 description: > Array.prototype.every - return value of callbackfn is the Math object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return Math; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js index f13585635d..10240fecc7 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-21.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-7-c-iii-21 description: Array.prototype.every - return value of callbackfn is a Date object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { return new Date(); } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js index f38fd7819f..16a1ba70dd 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-22 description: > Array.prototype.every - return value of callbackfn is a RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return new RegExp(); } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js index d4ec54d5e3..a337a73331 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-23 description: > Array.prototype.every - return value of callbackfn is the JSON object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return JSON; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js index 6990cec1a4..d9f82bec0e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-24 description: > Array.prototype.every - return value of callbackfn is an Error object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return new EvalError(); } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js index 31a87806f7..19e34fcdbb 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-25.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-25 description: > Array.prototype.every - return value of callbackfn is the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return arguments; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js index 9349c3d632..148fdd1e85 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-27.js @@ -6,13 +6,9 @@ es5id: 15.4.4.16-7-c-iii-27 description: > Array.prototype.every - return value of callbackfn is the global object -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +16,5 @@ function testcase() { return fnGlobalObject(); } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js index b888069697..533f9b2376 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-28.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-7-c-iii-28 description: Array.prototype.every - false prevents further side effects -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var obj = { length: 20 }; @@ -41,6 +38,5 @@ function testcase() { configurable: true }); - return !Array.prototype.every.call(obj, callbackfn) && !result; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); +assert.sameValue(result, false, 'result'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js index 8ecd38f939..8a951f4227 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-29 description: > Array.prototype.every - return value (new Boolean(false)) of callbackfn is treated as true value -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return new Boolean(false); } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js index 1427454965..c6d3a4175e 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-3 description: > Array.prototype.every - return value of callbackfn is a boolean (value is false) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var obj = { 0: 11, length: 1 }; @@ -19,6 +16,5 @@ function testcase() { return false; } - return !Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.every.call(obj, callbackfn), false, 'Array.prototype.every.call(obj, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js index dfb71c4277..9c9091d47a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-4 description: > Array.prototype.every - return value of callbackfn is a boolean (value is true) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var obj = { 0: 11, length: 1 }; @@ -21,6 +18,5 @@ function testcase() { - return Array.prototype.every.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.every.call(obj, callbackfn), 'Array.prototype.every.call(obj, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js index 73d37e9898..ea2d20c5e1 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-5 description: > Array.prototype.every - return value of callbackfn is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return 0; } - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js index f2922e9761..77416aa19f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-6 description: > Array.prototype.every - return value of callbackfn is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return +0; } - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js index f1056dbc21..335e1185e0 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-7 description: > Array.prototype.every - return value of callbackfn is a nunmber (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return -0; } - return ![11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue([11].every(callbackfn), false, '[11].every(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js index d77a61bf39..c82482c584 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-8 description: > Array.prototype.every - return value of callbackfn is a number (value is positive number) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return 5; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js index 257a5a61a7..0e914ad87d 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-7-c-iii-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-7-c-iii-9 description: > Array.prototype.every - return value of callbackfn is a number (value is negative number) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return -5; } - return [11].every(callbackfn) && accessed; - } -runTestCase(testcase); +assert([11].every(callbackfn), '[11].every(callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js index ebed17be68..13483d2f61 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-1.js @@ -4,14 +4,9 @@ /*--- es5id: 15.4.4.16-8-1 description: Array.prototype.every returns true if 'length' is 0 (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { function cb() {} var i = [].every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js index be0650cb7d..642b4cea16 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-10.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.16-8-10 description: Array.prototype.every - subclassed array when length is reduced -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -22,8 +20,5 @@ function testcase() { } var i = f.every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js index ebd3842229..810c4e067b 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.16-8-11 description: > Array.prototype.every returns true when all calls to callbackfn return true -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -20,7 +17,6 @@ function testcase() { var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.every(callbackfn) === true && callCnt === 10) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); +assert.sameValue(callCnt, 10, 'callCnt'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js index 9dd3448c2b..ee5aeb8f65 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-12.js @@ -6,25 +6,17 @@ es5id: 15.4.4.16-8-12 description: > Array.prototype.every doesn't mutate the array on which it is called on -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } var arr = [1,2,3,4,5]; arr.every(callbackfn); - if(arr[0] === 1 && - arr[1] === 2 && - arr[2] === 3 && - arr[3] === 4 && - arr[4] === 5) - { - return true; - } - } -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(arr[4], 5, 'arr[4]'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js index 842ef63919..9e54511984 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-13.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.16-8-13 description: Array.prototype.every doesn't visit expandos -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -20,7 +17,6 @@ function testcase() { arr["i"] = 10; arr[true] = 11; - if(arr.every(callbackfn) === true && callCnt === 10) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.every(callbackfn), true, 'arr.every(callbackfn)'); +assert.sameValue(callCnt, 10, 'callCnt'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js index 7e860dc384..649f0cdbde 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-8-2 description: > Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { function cb(){} var i = f.every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js index 963b89701c..dda01e9471 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-8-3 description: > Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { function cb(){} var i = f.every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js index c625d79dc1..ae9c7dce31 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-8-4 description: > Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { function cb(){} var i = f.every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js index b982fcf5b8..4434723268 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-8-5 description: > Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { function cb(){} var i = f.every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js index d53330d2f5..fb84932687 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-8-6 description: > Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -20,8 +18,5 @@ function testcase() { function cb(){} var i = f.every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js index cdd7a4311c..d130d0956a 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-8-7 description: > Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -25,8 +23,5 @@ function testcase() { function cb(){} var i = f.every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js b/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js index 6c63644aab..15379e475f 100644 --- a/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js +++ b/test/built-ins/Array/prototype/every/15.4.4.16-8-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.16-8-8 description: > Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with [] -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -33,8 +31,5 @@ function testcase() { function cb(){} var i = f.every(cb); - if (i === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, true, 'i'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-0-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-0-1.js index 810ab7bf6b..c507b89db2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-0-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.20-0-1 description: Array.prototype.filter must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.filter; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-0-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-0-2.js index 1838bb94b8..e5d615e58f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-0-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.20-0-2 description: Array.prototype.filter.length must be 1 -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.filter.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.filter.length, 1, 'Array.prototype.filter.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js index 58d4c06d93..95809f57ae 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-1-11 description: Array.prototype.filter applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj instanceof Date; } @@ -19,6 +16,4 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === 1; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 1, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js index 23f615cd42..f460711cc4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-1-12 description: Array.prototype.filter applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj instanceof RegExp; } @@ -18,6 +15,5 @@ function testcase() { obj[1] = true; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === true; - } -runTestCase(testcase); + +assert.sameValue(newArr[0], true, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js index 79e505554f..96dd3b7a91 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-1-14 description: Array.prototype.filter applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj instanceof Error; } @@ -19,6 +16,4 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === 1; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 1, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js index 09cf3cb84a..50393de993 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-1-15 description: Array.prototype.filter applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return '[object Arguments]' === Object.prototype.toString.call(obj); } @@ -19,6 +16,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === "a" && newArr[1] === "b"; - } -runTestCase(testcase); +assert.sameValue(newArr[0], "a", 'newArr[0]'); +assert.sameValue(newArr[1], "b", 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js index acbfe8cef2..f4d747e569 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-1-4 description: Array.prototype.filter applied to Boolean Object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj instanceof Boolean; } @@ -20,6 +17,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === 11 && newArr[1] === 12; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert.sameValue(newArr[1], 12, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js index 0031650238..1f3c284047 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-1-6 description: Array.prototype.filter applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj instanceof Number; } @@ -19,6 +16,6 @@ function testcase() { obj[1] = 12; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === 11 && newArr[1] === 12; - } -runTestCase(testcase); + +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert.sameValue(newArr[1], 12, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js index 36bf5c54a5..1389ccaca9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.20-1-7 description: Array.prototype.filter applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj instanceof String; } var newArr = Array.prototype.filter.call("abc", callbackfn); - return newArr[0] === "a"; - } -runTestCase(testcase); +assert.sameValue(newArr[0], "a", 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js index e7a928805e..5f659fadd6 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.20-1-8 description: Array.prototype.filter applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof String; } @@ -15,6 +13,4 @@ function testcase() { var obj = new String("abc"); var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === "a"; - } -runTestCase(testcase); +assert.sameValue(newArr[0], "a", 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js index 0152e7a756..ec8777ce6f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-1-9 description: Array.prototype.filter applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj instanceof Function; } @@ -21,6 +18,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr[0] === 11 && newArr[1] === 9; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert.sameValue(newArr[1], 9, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js index 9bb86b4e42..b446af28b5 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js @@ -6,25 +6,17 @@ es5id: 15.4.4.20-10-1 description: > Array.prototype.filter 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.filter(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/filter/15.4.4.20-10-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js index 5755630417..63125b8071 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-10-2 description: > Array.prototype.filter returns new Array with length equal to number of true returned by callbackfn -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if(val % 2) @@ -20,13 +17,8 @@ function testcase() { } var srcArr = [1,2,3,4,5]; var resArr = srcArr.filter(callbackfn); - if(resArr.length === 3 && - resArr[0] === 1 && - resArr[1] === 3 && - resArr[2] === 5) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(resArr.length, 3, 'resArr.length'); +assert.sameValue(resArr[0], 1, 'resArr[0]'); +assert.sameValue(resArr[1], 3, 'resArr[1]'); +assert.sameValue(resArr[2], 5, 'resArr[2]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js index 0efd73fb48..e5fa29fd5c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.20-10-3 description: Array.prototype.filter - 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(){return true;} var a = f.filter(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/filter/15.4.4.20-10-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js index 91f476aa60..cbfcb3a90a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-10-4 description: Array.prototype.filter 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.filter(callbackfn); - if(callCnt == 5) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js index 1d7acf36cd..8c448e47b7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-1 description: > Array.prototype.filter applied to Array-like object, 'length' is own data property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 2; } @@ -24,6 +21,4 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js index e18c2500cc..982e0c5463 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-10 description: > Array.prototype.filter applied to Array-like object, 'length' is inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 2; } @@ -33,6 +30,5 @@ function testcase() { child[2] = 9; var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js index 7ef5dbdbaa..95124b39d4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-11 description: > Array.prototype.filter applied to Array-like object, 'length' is own accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -27,6 +24,6 @@ function testcase() { }); var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js index 55330c69e1..826764cb07 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-13 description: > Array.prototype.filter applied to the Array-like object that 'length' is inherited accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -31,6 +28,6 @@ function testcase() { child[1] = 12; var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js index 9c913c40c1..5beb53def1 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-14 description: > Array.prototype.filter applied to the Array-like object that 'length property doesn't exist -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -20,6 +17,6 @@ function testcase() { var obj = { 0: 11, 1: 12 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js index c443891e06..8c10fe4b61 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-17 description: > Array.prototype.filter applied to the Arguments object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 2; } @@ -20,6 +17,4 @@ function testcase() { return newArr.length === 2; }; - return func(12, 11); - } -runTestCase(testcase); +assert(func(12, 11), 'func(12, 11) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js index 983ac7aabf..88ecbbd669 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-18 description: > Array.prototype.filter applied to String object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 3; } @@ -18,6 +15,5 @@ function testcase() { var str = new String("012"); var newArr = Array.prototype.filter.call(str, callbackfn); - return newArr.length === 3; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 3, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js index 9336f2428b..9a69d1a35e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-19 description: > Array.prototype.filter applied to Function object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 2; } @@ -23,6 +20,5 @@ function testcase() { fun[2] = 9; var newArr = Array.prototype.filter.call(fun, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js index e1cf9585d0..e2132438d3 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.20-2-2 description: Array.prototype.filter - 'length' is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 2; } var newArr = [12, 11].filter(callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js index 904e93a3ea..4a545de617 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-3 description: > Array.prototype.filter 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 obj.length === 2; } @@ -27,6 +24,5 @@ function testcase() { child[2] = 9; var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js index 8e37a011b9..ce4a96ce76 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-5 description: > Array.prototype.filter 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 obj.length === 2; } @@ -37,6 +34,5 @@ function testcase() { child[2] = 9; var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js index eebdda9a95..4d8fc87d2c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-6 description: > Array.prototype.filter applied to Array-like object, 'length' is an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 2; } @@ -26,6 +23,5 @@ function testcase() { child[2] = 9; var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js index 10a595622f..edcdc2b162 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-7 description: > Array.prototype.filter applied to Array-like object, 'length' is an own accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 2; } @@ -29,6 +26,5 @@ function testcase() { obj[2] = 9; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js index 2616fccc67..6d1cc06aa7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-8 description: > Array.prototype.filter applied to Array-like object, 'length' is own accessor property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 2; } @@ -34,6 +31,5 @@ function testcase() { child[2] = 9; var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js index c31c4e98e8..42d350ef7f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js @@ -7,11 +7,8 @@ description: > Array.prototype.filter applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return obj.length === 2; } @@ -42,6 +39,5 @@ function testcase() { child[2] = 9; var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js index af0d6361c4..97cfad3de4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-3-1 description: Array.prototype.filter - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 0, 1: 1, length: undefined }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js index d97c89b72c..f911fd837e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-10 description: > Array.prototype.filter - value of 'length' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -21,6 +18,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js index f2617dd57a..1fa0f170e4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-11 description: > Array.prototype.filter - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -19,6 +16,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js index 9dc662ad13..170e54b78b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-12 description: > Array.prototype.filter - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -19,6 +16,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && newArr[0] === undefined; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js index f2074a4801..d090785638 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-13 description: > Array.prototype.filter - 'length' is a string containing a decimal number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -19,6 +16,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js index 0e1ffe14e2..ec980eabf8 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-3-14 description: Array.prototype.filter - 'length' is a string containing -Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed2 = false; function callbackfn2(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var newArr2 = Array.prototype.filter.call(obj2, callbackfn2); - return !accessed2 && newArr2.length === 0; - } -runTestCase(testcase); +assert.sameValue(accessed2, false, 'accessed2'); +assert.sameValue(newArr2.length, 0, 'newArr2.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js index 064d8d90b4..68e5d56d1a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-15 description: > Array.prototype.filter - 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -19,6 +16,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js index 31df0b846a..2b2af9bb0f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-16 description: > Array.prototype.filter - 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -19,6 +16,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js index 50effddbd3..1a3abfd1fb 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-17 description: > Array.prototype.filter - 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -19,6 +16,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js index 4ccc2893a2..e559d326a0 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-18 description: > Array.prototype.filter - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -21,6 +18,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return !accessed && newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js index bc8e3f98b0..303a1fe418 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-19 description: > Array.prototype.filter - value of 'length' is an Object which has an own toString method. -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -27,6 +24,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js index b79453918b..9a6486f275 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-2 description: > Array.prototype.filter applied 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 true; } @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, 1: 9, length: true }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js index aa45c30736..d27da75113 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-20 description: > Array.prototype.filter - value of 'length' is an Object which has an own valueOf method. -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -27,6 +24,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js index 81b5525e4f..7f6eefef3e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js @@ -7,11 +7,8 @@ description: > Array.prototype.filter - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - var firstStepOccured = false; var secondStepOccured = false; @@ -36,6 +33,7 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11 && firstStepOccured && secondStepOccured; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(firstStepOccured, 'firstStepOccured !== true'); +assert(secondStepOccured, 'secondStepOccured !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js index c8ba73fb8b..6353da8a25 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-23 description: > Array.prototype.filter uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - var valueOfAccessed = false; var toStringAccessed = false; @@ -43,6 +40,7 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js index 11793aa4bf..b15dc3f08d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-24 description: > Array.prototype.filter - 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 true; } @@ -23,6 +20,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js index 13e504aba8..5228bab7ab 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-25 description: > Array.prototype.filter - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -23,6 +20,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && newArr[0] === undefined; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js index 915fe8de4e..4b0cdb4471 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-3-3 description: Array.prototype.filter - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: 0 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js index b3b5b6ccc1..0cdde8d820 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-4 description: > Array.prototype.filter - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: +0 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js index 6879103459..2937724c9e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-5 description: > Array.prototype.filter - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: -0 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js index 03d93792a2..9978de4fee 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-6 description: > Array.prototype.filter - value of 'length' is a number (value is positive) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -19,6 +16,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js index 1d33c73244..4613427724 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-7 description: > Array.prototype.filter - value of 'length' is a number (value is negative) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -18,6 +15,5 @@ function testcase() { var obj = { 1: 11, 2: 9, length: -4294967294 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && newArr[0] === undefined; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js index 776f98ecd6..65f307b33f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-9 description: > Array.prototype.filter - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -21,6 +18,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && !accessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js index 9bf8f06009..1549ee7852 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-4-12 description: Array.prototype.filter - 'callbackfn' is a function -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return val === 9; @@ -17,6 +14,6 @@ function testcase() { } var newArr = [11, 9].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 9; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 9, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js index ebf975dc13..ea6126f466 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js @@ -5,10 +5,8 @@ es5id: 15.4.4.20-5-1-s description: Array.prototype.filter - 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].filter(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); + +assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js index cf8358a92e..762c8bbce9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-10 description: Array.prototype.filter - Array Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objArray = new Array(10); @@ -20,6 +17,5 @@ function testcase() { var newArr = [11].filter(callbackfn, objArray); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js index 9f1000c747..9e75e1eef4 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-11 description: Array.prototype.filter - String Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objString = new String(); @@ -19,6 +16,5 @@ function testcase() { var newArr = [11].filter(callbackfn, objString); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js index 3021093d56..77ff80420c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-12 description: Array.prototype.filter - Boolean Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objBoolean = new Boolean(); @@ -19,6 +16,5 @@ function testcase() { var newArr = [11].filter(callbackfn, objBoolean); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js index fef957b0ce..393228801b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-13 description: Array.prototype.filter - Number Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objNumber = new Number(); @@ -19,6 +16,5 @@ function testcase() { var newArr = [11].filter(callbackfn, objNumber); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js index 2809cb65c2..e36f9ad9fb 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-14 description: Array.prototype.filter - the Math object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var newArr = [11].filter(callbackfn, Math); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js index f8d1923c6b..07fcb1612f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-15 description: Array.prototype.filter - Date Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objDate = new Date(); @@ -20,6 +17,5 @@ function testcase() { var newArr = [11].filter(callbackfn, objDate); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js index 86c8787312..67201a996f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-16 description: Array.prototype.filter - RegExp Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objRegExp = new RegExp(); @@ -20,6 +17,5 @@ function testcase() { var newArr = [11].filter(callbackfn, objRegExp); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js index 34e1641e02..b7ac72b671 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.20-5-17 description: Array.prototype.filter - the JSON object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { @@ -17,6 +15,5 @@ function testcase() { var newArr = [11].filter(callbackfn, JSON); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js index de325a3394..5a59fb9f6f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-18 description: Array.prototype.filter - Error Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objError = new RangeError(); @@ -19,6 +16,5 @@ function testcase() { var newArr = [11].filter(callbackfn, objError); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js index 00ad7cfbbd..f57406d32d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-5-19 description: > Array.prototype.filter - the Arguments object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var arg; @@ -24,6 +21,6 @@ function testcase() { }(1, 2, 3)); var newArr = [11].filter(callbackfn, arg); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js index 5a9c1f146b..02e553eb92 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.20-5-2 description: Array.prototype.filter - thisArg is Object -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var o = new Object(); o.res = true; @@ -18,7 +16,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.filter(callbackfn,o); - if( resArr.length === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js index f2933a462b..a181811efe 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js @@ -4,13 +4,9 @@ /*--- es5id: 15.4.4.20-5-21 description: Array.prototype.filter - the global object can be used as thisArg -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +16,5 @@ function testcase() { var newArr = [11].filter(callbackfn, fnGlobalObject()); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js index 934188ecad..061b7dacf8 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-22 description: Array.prototype.filter - boolean primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var newArr = [11].filter(callbackfn, false); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js index 85137c0026..e7b7325950 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-23 description: Array.prototype.filter - number primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var newArr = [11].filter(callbackfn, 101); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js index c936139b10..d52a32e5b9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-24 description: Array.prototype.filter - string primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var newArr = [11].filter(callbackfn, "abc"); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js index e541ca09c0..4a4c5e3fb5 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js @@ -6,13 +6,8 @@ es5id: 15.4.4.20-5-27 description: > Array.prototype.filter - Array.isArray(arg) returns true when arg is the returned array -includes: [runTestCase.js] ---*/ -function testcase() { - var newArr = [11].filter(function () { }); - return Array.isArray(newArr); - } -runTestCase(testcase); +assert(Array.isArray(newArr), 'Array.isArray(newArr) !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js index 78620d3e6e..0dc9327221 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.20-5-28 description: Array.prototype.filter - the returned array is instanceof Array -includes: [runTestCase.js] ---*/ -function testcase() { - var newArr = [11].filter(function () { }); - return newArr instanceof Array; - } -runTestCase(testcase); +assert(newArr instanceof Array, 'newArr instanceof Array !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js index 53bb28f98e..5d6fd637f5 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.20-5-29 description: Array.prototype.filter - returns an array whose length is 0 -includes: [runTestCase.js] ---*/ -function testcase() { - var newArr = [11].filter(function () { }); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js index 8da7ffcc43..2c1d815f02 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.20-5-3 description: Array.prototype.filter - 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.filter(callbackfn,a); - if( resArr.length === 1) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js index e61f0a3673..8f63e7058a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js @@ -5,10 +5,8 @@ es5id: 15.4.4.20-5-30 description: Array.prototype.filter - thisArg not passed flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function innerObj() { this._15_4_4_20_5_30 = true; var _15_4_4_20_5_30 = false; @@ -20,6 +18,5 @@ function testcase() { var resArr = srcArr.filter(callbackfn); this.retVal = resArr.length === 0; } - return new innerObj().retVal; - } -runTestCase(testcase); + +assert(new innerObj().retVal, 'new innerObj().retVal !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js index 4766544600..5a277cdb23 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-5-4 description: > Array.prototype.filter - 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.filter(callbackfn,f); - if( resArr.length === 1) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js index 015f506d7c..dbcd622312 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.20-5-5 description: Array.prototype.filter - 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.filter(callbackfn,f); - if( resArr.length === 1) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js index 779deaf480..1eb2df4c2f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.20-5-6 description: Array.prototype.filter - 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.filter(callbackfn,foo); - if( resArr.length === 1) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr.length, 1, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js index eb53a8cc13..a6afd0c203 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-7 description: Array.prototype.filter - built-in functions can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var newArr = [11].filter(callbackfn, eval); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js index d0b5799a76..3fdc374e75 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-5-9 description: Array.prototype.filter - Function Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objFunction = function () { }; @@ -19,6 +16,5 @@ function testcase() { var newArr = [11].filter(callbackfn, objFunction); - return newArr[0] === 11 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js index c39bccca90..853db3f7a6 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js @@ -6,15 +6,10 @@ es5id: 15.4.4.20-6-1 description: > Array.prototype.filter returns an empty array if 'length' is 0 (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { function cb(){} var a = [].filter(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/filter/15.4.4.20-6-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js index 418c5fa2cc..df38841a66 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-2 description: > Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,9 +16,6 @@ function testcase() { function cb(){} var a = f.filter(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/filter/15.4.4.20-6-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js index 31b450472f..093e48da06 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-3 description: > Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,9 +16,6 @@ function testcase() { function cb(){} var a = f.filter(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/filter/15.4.4.20-6-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js index d2206a1092..fb2d3a9e61 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-4 description: > Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,9 +16,6 @@ function testcase() { function cb(){} var a = f.filter(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/filter/15.4.4.20-6-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js index 011bcd8e7a..268fb9211e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-5 description: > Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,9 +16,6 @@ function testcase() { function cb(){} var a = f.filter(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/filter/15.4.4.20-6-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js index fddd243948..8ec27a1cd1 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-6 description: > Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -20,9 +18,6 @@ function testcase() { function cb(){} var a = f.filter(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/filter/15.4.4.20-6-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js index b10787f270..8075b1500c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js @@ -7,10 +7,8 @@ description: > Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -27,9 +25,6 @@ function testcase() { function cb(){} var a = f.filter(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/filter/15.4.4.20-6-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js index ac90c170b7..e526241d8e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-8 description: > Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with [] -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -33,9 +31,6 @@ function testcase() { function cb(){} var a = f.filter(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/filter/15.4.4.20-9-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js index fa09007c7d..0e430bde3f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-1 description: > Array.prototype.filter 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; srcArr[5] = 6; @@ -19,7 +16,5 @@ function testcase() { var srcArr = [1, 2, , 4, 5]; var resArr = srcArr.filter(callbackfn); - return resArr.length === 5; - } -runTestCase(testcase); +assert.sameValue(resArr.length, 5, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js index 75f400bee3..8e60bc4e0d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-2 description: > Array.prototype.filter considers new value of elements in array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { srcArr[2] = -1; @@ -23,8 +20,7 @@ function testcase() { var srcArr = [1,2,3,4,5]; var resArr = srcArr.filter(callbackfn); - if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 3, 'resArr.length'); +assert.sameValue(resArr[0], 1, 'resArr[0]'); +assert.sameValue(resArr[2], 4, 'resArr[2]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js index 8c0290da09..12d72803a8 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-4 description: > Array.prototype.filter doesn't visit deleted elements when Array.length is decreased -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { srcArr.length = 2; @@ -19,8 +16,5 @@ function testcase() { var srcArr = [1,2,3,4,6]; var resArr = srcArr.filter(callbackfn); - if(resArr.length === 2 ) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 2, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js index 78318cca81..30c8ddf1f3 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-5 description: > Array.prototype.filter doesn't consider newly added elements in sparse array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { srcArr[1000] = 3; @@ -21,8 +18,5 @@ function testcase() { srcArr[1] = 1; srcArr[2] = 2; var resArr = srcArr.filter(callbackfn); - if( resArr.length === 2) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 2, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js index eb157c05cd..1b356a04d9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-9-7 description: > Array.prototype.filter stops calling callbackfn once the array is deleted during the call -includes: [runTestCase.js] ---*/ -function testcase() { var o = new Object(); o.srcArr = [1, 2, 3, 4, 5]; @@ -22,6 +20,6 @@ function testcase() { } var resArr = o.srcArr.filter(callbackfn); - return resArr.length === 5 && typeof o.srcArr === "undefined"; - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); +assert.sameValue(typeof o.srcArr, "undefined", 'typeof o.srcArr'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js index 983acbe1cf..9209283386 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-9-8 description: Array.prototype.filter - no observable effects occur if len is 0 -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,6 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return accessed === false && obj.length === 0 && newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); +assert.sameValue(obj.length, 0, 'obj.length'); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js index d28ebcfe14..9faa3c3c27 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-9 description: > Array.prototype.filter - modifications to length don't change number of iterations -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -30,6 +27,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 2 && 2 === called; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js index d90377c627..86b22f227c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-1 description: > Array.prototype.filter - 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.filter(callbackfn); - if( resArr.length === 0 && callCnt === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 0, 'resArr.length'); +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js index b90f5fb899..6e0cb62b47 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-14 description: > Array.prototype.filter - decreasing length of array causes index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -27,6 +24,5 @@ function testcase() { var newArr = arr.filter(callbackfn); - return newArr.length === 3 && newArr[2] === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 3, 'newArr.length'); +assert.sameValue(newArr[2], 2, 'newArr[2]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js index 7a5e4926f4..35377f2fb1 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js @@ -7,11 +7,8 @@ description: > Array.prototype.filter - decreasing length of array does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -35,6 +32,5 @@ function testcase() { var newArr = arr.filter(callbackfn); - return newArr.length === 3 && newArr[2] === "unconfigurable"; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 3, 'newArr.length'); +assert.sameValue(newArr[2], "unconfigurable", 'newArr[2]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js index a4f4529c83..dfbf641127 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-2 description: > Array.prototype.filter - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -27,6 +24,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === "length"; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], "length", 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js index b404aaa9e6..80020fa7ef 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-3 description: > Array.prototype.filter - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -26,6 +23,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] !== 6.99; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.notSameValue(newArr[0], 6.99, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js index 236635a926..eae3e16781 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-4 description: > Array.prototype.filter - 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) { return true; } @@ -32,6 +29,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 2 && newArr[1] === 6.99; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); +assert.sameValue(newArr[1], 6.99, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js index bb63b59ad8..bb049f1e05 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-9-b-5 description: > Array.prototype.filter - properties added into own object after current position are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return true; } @@ -31,6 +29,5 @@ function testcase() { var newArr = arr.filter(callbackfn); - return newArr.length === 3 && newArr[1] === 6.99; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 3, 'newArr.length'); +assert.sameValue(newArr[1], 6.99, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js index 4b23515741..7888ab9c36 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-9-b-8 description: > Array.prototype.filter - deleting own property causes index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; var obj = { length: 2 }; @@ -35,6 +33,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 0, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js index 13cc854530..1198c054c7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-9 description: > Array.prototype.filter - deleting own property causes index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -33,6 +30,5 @@ function testcase() { var newArr = arr.filter(callbackfn); - return newArr.length === 1 && newArr[0] === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 0, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js index 802be2dd9f..e0a71dc8d5 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-1 description: > Array.prototype.filter - 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) { return (idx === 5) && (val === kValue); @@ -20,6 +17,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === kValue; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], kValue, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js index 73a95f2c41..6cc5ec419f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-10 description: > Array.prototype.filter - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return idx === 2 && val === 12; } @@ -25,6 +22,5 @@ function testcase() { }); var newArr = arr.filter(callbackfn); - return newArr.length === 1 && newArr[0] === 12; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 12, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js index e7ed89eefe..a9ce26971a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return idx === 0 && val === 11; } @@ -32,6 +29,5 @@ function testcase() { }); var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js index da47ff946a..e8dd405e8d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js @@ -7,10 +7,8 @@ description: > Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return idx === 1 && val === 12; } @@ -38,6 +36,5 @@ function testcase() { }); var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 1 && newArr[0] === 12; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 12, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js index c149c40593..3244f03dbc 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-15 description: > Array.prototype.filter - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val === 11 && idx === 1; } @@ -31,6 +28,5 @@ function testcase() { child.length = 20; var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js index fcace81def..bbc08a9672 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-17 description: > Array.prototype.filter - 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) { return undefined === val && idx === 1; } @@ -23,6 +20,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === undefined; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js index 1cab9d884a..6e445a0b87 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-18 description: > Array.prototype.filter - 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) { return undefined === val && idx === 0; } @@ -24,6 +21,5 @@ function testcase() { var newArr = arr.filter(callbackfn); - return newArr.length === 1 && newArr[0] === undefined; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js index 061a80055d..dc8ba25f97 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-2 description: > Array.prototype.filter - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 11; @@ -19,6 +16,5 @@ function testcase() { var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js index 59a85d009d..5c9af8a2ab 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-21 description: > Array.prototype.filter - 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) { return val === undefined && idx === 1; } @@ -28,6 +25,5 @@ function testcase() { child.length = 2; var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 1 && newArr[0] === undefined; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], undefined, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js index 1fb0f12826..4ffa430fab 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js @@ -7,10 +7,8 @@ description: > Array.prototype.filter - 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) { return val === 11 && idx === 0; } @@ -21,6 +19,5 @@ function testcase() { var newArr = func(11); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js index 2f3f84d2a6..c56c14fbaf 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.filter - 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 === 11; @@ -27,7 +24,6 @@ function testcase() { }; var newArr = func(11, 9); - return newArr.length === 2 && newArr[0] === 11 && - newArr[1] === 9; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert.sameValue(newArr[1], 9, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js index 23fe0f2e43..595424887d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.filter - 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 === 11; @@ -29,7 +26,7 @@ function testcase() { }; var newArr = func(11, 12, 9); - return newArr.length === 3 && newArr[0] === 11 && - newArr[1] === 12 && newArr[2] === 9; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 3, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert.sameValue(newArr[1], 12, 'newArr[1]'); +assert.sameValue(newArr[2], 9, 'newArr[2]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js index d4e3fee5ca..61d444c947 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-28 description: > Array.prototype.filter - element changed by getter on previous iterations is observed on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var arr = []; @@ -38,6 +35,5 @@ function testcase() { }); var newArr = arr.filter(callbackfn); - return newArr.length === 1 && newArr[0] === 9; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 9, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js index 27611554dd..04ffb5c422 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js @@ -6,10 +6,8 @@ es5id: 15.4.4.20-9-c-i-29 description: > Array.prototype.filter - element changed by getter on previous iterations is observed on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val === 9 && idx === 1; } @@ -37,6 +35,5 @@ function testcase() { }); var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 9; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 9, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js index 7b8bdeff11..199d43e394 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js @@ -7,11 +7,8 @@ description: > Array.prototype.filter - element to be retrieved is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return (idx === 5) && (val === "abc"); } @@ -27,6 +24,5 @@ function testcase() { var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 1 && newArr[0] === "abc"; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], "abc", 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js index f1c644ffbe..9a0c8b197a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.filter - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return idx === 0 && val === 11; } @@ -38,6 +35,5 @@ function testcase() { var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js index df63165cdd..83dc74ad3d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-7 description: > Array.prototype.filter - 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) { @@ -27,6 +24,5 @@ function testcase() { var newArr = Array.prototype.filter.call(child, callbackfn); - return newArr.length === 1 && newArr[0] === kValue; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], kValue, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js index 4eee6faa1d..ff21e3316d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-9 description: > Array.prototype.filter - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return (idx === 0) && (val === 11); } @@ -25,6 +22,6 @@ function testcase() { }); var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js index 5eb9a84ff6..036a703865 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-9-c-ii-1 description: Array.prototype.filter - 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.filter(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/filter/15.4.4.20-9-c-ii-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js index 5e690d3523..467350d87c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js @@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-10 description: > Array.prototype.filter - callbackfn is called with 1 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val) { return val > 10; } var newArr = [12].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 12; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 12, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js index 61083d8e41..9db1998b5f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js @@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-11 description: > Array.prototype.filter - callbackfn is called with 2 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx) { return val > 10 && arguments[2][idx] === val; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js index 4ba8ddcd45..e69abc72b6 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js @@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-12 description: > Array.prototype.filter - callbackfn is called with 3 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10 && obj[idx] === val; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js index ec47d0ac8c..672af4d861 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js @@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-13 description: > Array.prototype.filter - callbackfn that uses arguments object to get parameter value -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return arguments[2][arguments[1]] === arguments[0]; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js index 6e57df7366..fd8b23eb30 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-16 description: > Array.prototype.filter - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === false; } @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; var newArr = Array.prototype.filter.call(obj, callbackfn, false); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js index 9b69702dc3..6a57b59ff6 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-17 description: > Array.prototype.filter -'this' of 'callbackfn' is a Number object when T is not an object (T is a number) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, o) { return 5 === this.valueOf(); } @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; var newArr = Array.prototype.filter.call(obj, callbackfn, 5); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js index 4d2ddff8f4..24bc9dff34 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-18 description: > Array.prototype.filter - 'this' of 'callbackfn' is an String object when T is not an object (T is a string) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return 'hello' === this.valueOf(); } @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; var newArr = Array.prototype.filter.call(obj, callbackfn, "hello"); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js index 7539130fb3..def6f012cf 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-9-c-ii-19 description: Array.prototype.filter - non-indexed properties are not called -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, non_index_property: 8, 2: 5, length: 20 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js index 89181aed85..19ca09edee 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-9-c-ii-2 description: Array.prototype.filter - callbackfn takes 3 arguments -includes: [runTestCase.js] ---*/ -function testcase() { - var parCnt = 3; var bCalled = false function callbackfn(val, idx, obj) @@ -20,7 +17,6 @@ function testcase() { var srcArr = [0,1,2,3,4,5,6,7,8,9]; var resArr = srcArr.filter(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/filter/15.4.4.20-9-c-ii-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js index f8ddeeecca..efc02456a7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-20 description: > Array.prototype.filter - callbackfn called with correct parameters (thisArg is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var thisArg = { threshold: 10 }; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js index 8f645d49bf..455a642676 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-21 description: > Array.prototype.filter - callbackfn called with correct parameters (kValue is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 11; @@ -26,6 +23,6 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 2 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert.sameValue(newArr[1], 12, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js index 7279c92349..791d1af0d6 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-22 description: > Array.prototype.filter - 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; @@ -26,6 +23,6 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 2 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); +assert.sameValue(newArr[1], 12, 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js index ebd639110d..0a17eff2b6 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-23 description: > Array.prototype.filter - 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,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js index ec0756d6ce..61a1a3f99d 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-4 description: > Array.prototype.filter - k values are passed in ascending numeric order -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3, 4, 5]; var lastIdx = 0; var called = 0; @@ -25,6 +22,4 @@ function testcase() { } var newArr = arr.filter(callbackfn); - return newArr.length === called; - } -runTestCase(testcase); +assert.sameValue(newArr.length, called, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js index e16f74e721..666edc441b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-5 description: > Array.prototype.filter - k values are accessed during each iteration and not prior to starting the loop on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var kIndex = []; var called = 0; @@ -31,6 +28,5 @@ function testcase() { } var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); - return newArr.length === 0 && called === 4; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js index 81f717ba36..f31470f623 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-6 description: > Array.prototype.filter - arguments to callbackfn are self consistent -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, length: 1 }; var thisArg = {}; @@ -23,6 +20,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js index 3cf88c29fe..1a79ce2eaf 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-8 description: > Array.prototype.filter - element changed by callbackfn on previous iterations is observed -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, 1: 12, length: 2 }; function callbackfn(val, idx, o) { @@ -22,6 +19,5 @@ function testcase() { var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js index c03e60dadc..82844f7c14 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js @@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-9 description: > Array.prototype.filter - callbackfn is called with 0 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return true; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js index 2844a1112d..621cc22d49 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-1-1 description: > Array.prototype.filter - value of returned array element equals to 'kValue' -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, 1: 9, length: 2 }; var newArr = Array.prototype.filter.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/filter/15.4.4.20-9-c-iii-1-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js index 54d6e284ec..c2c65aec8f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-1-3 description: > Array.prototype.filter - 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/filter/15.4.4.20-9-c-iii-1-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js index 1c10d784c5..465f03d93b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-1-5 description: > Array.prototype.filter - values of 'to' are passed in acending numeric order -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3, 4]; var lastToIdx = 0; var called = 0; @@ -25,6 +22,5 @@ function testcase() { } var newArr = arr.filter(callbackfn); - return newArr.length === 5 && called === 5; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 5, 'newArr.length'); +assert.sameValue(called, 5, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js index 7fd9459946..8a748a8bf1 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js @@ -7,11 +7,8 @@ description: > Array.prototype.filter - values of 'to' are accessed during each iteration when 'selected' is converted to true and not prior to starting the loop -includes: [runTestCase.js] ---*/ -function testcase() { - var toIndex = []; var called = 0; @@ -32,6 +29,5 @@ function testcase() { } var newArr = [11, 12, 13, 14].filter(callbackfn, undefined); - return newArr.length === 4 && called === 4; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 4, 'newArr.length'); +assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js index 6dcb0ba285..3b39bc22e2 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-10 description: > Array.prototype.filter return value of callbackfn is a number (value is negative number) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return -5; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js index 63eaf96070..e6801a0b9b 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-11 description: > Array.prototype.filter return value of callbackfn is a number (value is Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return Infinity; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js index 7683080c6a..8f08dfd773 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-12 description: > Array.prototype.filter return value of callbackfn is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return -Infinity; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js index 71e8eb2c0e..30d079816c 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-13 description: > Array.prototype.filter return value of callbackfn is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -19,6 +16,6 @@ function testcase() { } var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js index e703ae5bbf..8fd768e2db 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-14 description: > Array.prototype.filter return value of callbackfn is an empty string -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -19,6 +16,6 @@ function testcase() { } var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js index 9a38dbebdb..756a982250 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-15 description: > Array.prototype.filter return value of callbackfn is a non-empty string -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return "non-empty string"; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js index ef699515cc..e9af95d1a7 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-16 description: > Array.prototype.filter return value of callbackfn is a Function object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return function () { }; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js index 078f06d02e..5de45f6b35 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-17 description: > Array.prototype.filter return value of callbackfn is an Array object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new Array(10); } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js index 024ed4f7cc..bf495741f3 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-18 description: > Array.prototype.filter return value of callbackfn is a String object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new String(); } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js index 3c43c07ef9..537bc1823e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-19 description: > Array.prototype.filter return value of callbackfn is a Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new Boolean(); } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js index 49e9d9d80a..36115cb3fc 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-9-c-iii-2 description: Array.prototype.filter - return value of callbackfn is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, o) { @@ -19,6 +16,6 @@ function testcase() { var obj = { 0: 11, length: 1 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js index 4a698dd269..b0a76cc98e 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-20 description: > Array.prototype.filter - return value of callbackfn is a Number object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new Number(); } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js index 36d08b6223..70cdd1d9fb 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-21 description: > Array.prototype.filter - return value of callbackfn is the Math object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return Math; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js index 292a707120..7a1dc81cca 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-22 description: > Array.prototype.filter - return value of callbackfn is a Date object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new Date(); } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js index c69d6c58e2..4cc1be3b34 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-23 description: > Array.prototype.filter - return value of callbackfn is a RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new RegExp(); } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js index b3d989a9d7..2e9dbb431f 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js @@ -6,17 +6,13 @@ es5id: 15.4.4.20-9-c-iii-24 description: > Array.prototype.filter - return value of callbackfn is the JSON object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return JSON; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js index 2ee67815c6..6444609dee 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-25 description: > Array.prototype.filter - return value of callbackfn is an Error object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new EvalError(); } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js index ab979d0341..dda54944f9 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-26 description: > Array.prototype.filter - return value of callbackfn is the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return arguments; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js index 0777dbe291..4bd224f220 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js @@ -6,18 +6,14 @@ es5id: 15.4.4.20-9-c-iii-28 description: > Array.prototype.filter - return value of callbackfn is the global object -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return fnGlobalObject(); } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js index bcbaffe317..616822e1fc 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-29 description: > Array.prototype.filter - false prevents element added to output Array -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -21,7 +18,7 @@ function testcase() { var obj = { 0: 11, 1: 8, length: 20 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] !== 8 && called === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.notSameValue(newArr[0], 8, 'newArr[0]'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js index 542cda5b04..6487fd9297 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.20-9-c-iii-3 description: Array.prototype.filter - return value of callbackfn is null -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -19,6 +16,6 @@ function testcase() { var obj = { 0: 11, length: 1 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js index acc0c0a2d6..ccdafac4af 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-30 description: > Array.prototype.filter - return value (new Boolean(false)) of callbackfn is treated as true value -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new Boolean(false); } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js index d476381fe9..009734858a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-4 description: > Array.prototype.filter - return value of callbackfn is a boolean (value is false) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,6 @@ function testcase() { var obj = { 0: 11, length: 1 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js index 82317a141c..70b3c651e0 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-5 description: > Array.prototype.filter - return value of callbackfn is a boolean (value is true) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -18,6 +15,6 @@ function testcase() { var obj = { 0: 11, length: 1 }; var newArr = Array.prototype.filter.call(obj, callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js index 5d4c34ee4c..cf029cb4bb 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-6 description: > Array.prototype.filter - return value of callbackfn is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -19,6 +16,6 @@ function testcase() { } var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js index 5ff2a75027..2dda2ab49a 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-7 description: > Array.prototype.filter - return value of callbackfn is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -19,6 +16,6 @@ function testcase() { } var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js index 0f4663f994..23263f9613 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-8 description: > Array.prototype.filter - return value of callbackfn is a nunmber (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -19,6 +16,6 @@ function testcase() { } var newArr = [11].filter(callbackfn); - return newArr.length === 0 && accessed; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 0, 'newArr.length'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js index a756d78414..b9eac52961 100644 --- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js +++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js @@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-9 description: > Array.prototype.filter - return value of callbackfn is a number (value is positive number) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return 5; } var newArr = [11].filter(callbackfn); - return newArr.length === 1 && newArr[0] === 11; - } -runTestCase(testcase); + +assert.sameValue(newArr.length, 1, 'newArr.length'); +assert.sameValue(newArr[0], 11, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-0-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-0-1.js index 2a86f42cda..4bee8a861b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-0-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.18-0-1 description: Array.prototype.forEach must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.forEach; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-0-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-0-2.js index a1dde44539..149383e81d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-0-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.18-0-2 description: Array.prototype.forEach.length must be 1 -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.forEach.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.forEach.length, 1, 'Array.prototype.forEach.length'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-11.js index 534bb02cf4..eb9d6390d1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-11.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-1-11 description: Array.prototype.forEach applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = obj instanceof Date; @@ -18,6 +16,5 @@ function testcase() { obj[0] = 1; Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-12.js index c3b6e4feb2..66677cea43 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-12.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-1-12 description: Array.prototype.forEach applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = obj instanceof RegExp; @@ -18,6 +16,5 @@ function testcase() { obj[0] = 1; Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-14.js index 0e25232d24..55e376ff4d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-14.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-1-14 description: Array.prototype.forEach applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = obj instanceof Error; @@ -18,6 +16,5 @@ function testcase() { obj[0] = 1; Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-15.js index d7ed8f8fcd..31d500db1c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-15.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-1-15 description: Array.prototype.forEach applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = ('[object Arguments]' === Object.prototype.toString.call(obj)); @@ -18,6 +16,5 @@ function testcase() { }("a", "b")); Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-4.js index 502c4c429e..9197acb9ba 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-4.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-1-4 description: Array.prototype.forEach applied to Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = obj instanceof Boolean; @@ -19,6 +17,5 @@ function testcase() { obj[1] = 12; Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-6.js index db3acbf6f9..a6df4fc9cc 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-1-6 description: Array.prototype.forEach applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = obj instanceof Number; @@ -20,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-7.js index a32acb2e7f..928d230720 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-7.js @@ -4,16 +4,13 @@ /*--- es5id: 15.4.4.18-1-7 description: Array.prototype.forEach applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = obj instanceof String; } Array.prototype.forEach.call("abc", callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-8.js index 04e4f73af7..1b33e88b83 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-8.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-1-8 description: Array.prototype.forEach applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = obj instanceof String; @@ -16,6 +14,4 @@ function testcase() { var obj = new String("abc"); Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-9.js index c58be365ff..599819bfa9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-1-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-1-9.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-1-9 description: Array.prototype.forEach applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = obj instanceof Function; @@ -20,6 +18,5 @@ function testcase() { obj[1] = 9; Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-1.js index 33660e3daa..39c891f514 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-1.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-1 description: > Array.prototype.forEach - 'length' is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -23,6 +21,5 @@ function testcase() { }; Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-10.js index f850c9de78..a4ccbbe0ff 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-10.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-10 description: > Array.prototype.forEach applied to Array-like object, 'length' is an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -33,6 +31,5 @@ function testcase() { child[2] = 9; Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-11.js index 6a9a4e10a4..7283486ac8 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-2-11 description: > Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -26,6 +23,5 @@ function testcase() { }); Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); + +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-13.js index 5c2008fd17..9cb70467a8 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-2-13 description: > Array.prototype.forEach applied to the Array-like object that 'length' is inherited accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -31,6 +28,5 @@ function testcase() { child[1] = 12; Array.prototype.forEach.call(child, callbackfn); - return !accessed; - } -runTestCase(testcase); + +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-14.js index b638e805dd..9a884eb632 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-2-14 description: > Array.prototype.forEach applied to the Array-like object that 'length' property doesn't exist -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,7 +17,5 @@ function testcase() { var obj = { 0: 11, 1: 12 }; Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-17.js index dd718f6ae5..5e77499e98 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-17.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-17 description: > Array.prototype.forEach applied to the Arguments object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -21,6 +19,4 @@ function testcase() { return result; }; - return func(12, 11); - } -runTestCase(testcase); +assert(func(12, 11), 'func(12, 11) !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-18.js index b3d55f6a03..1e63e16524 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-18.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-18 description: > Array.prototype.forEach applied to String object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 3); @@ -18,6 +16,5 @@ function testcase() { var str = new String("012"); Array.prototype.forEach.call(str, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-19.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-19.js index 45628c3ea0..6714929e5e 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-19.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-19.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-19 description: > Array.prototype.forEach applied to Function object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -23,6 +21,5 @@ function testcase() { fun[2] = 9; Array.prototype.forEach.call(fun, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js index d598ae4b48..e8bd3cc582 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-2.js @@ -4,16 +4,13 @@ /*--- es5id: 15.4.4.18-2-2 description: Array.prototype.forEach - 'length' is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); } [12, 11].forEach(callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-3.js index 02f7b1bd32..740525fc53 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-3 description: > Array.prototype.forEach - 'length' is an own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -27,6 +25,5 @@ function testcase() { child[2] = 9; Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-5.js index e6b35e524b..f0a8fa20f9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-5 description: > Array.prototype.forEach applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -37,6 +35,5 @@ function testcase() { child[2] = 9; Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-6.js index e3121c0aac..6562b8c690 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-6 description: > Array.prototype.forEach applied to Array-like object, 'length' is an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -26,6 +24,5 @@ function testcase() { child[2] = 9; Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-7.js index 499d3391e0..4ba3bf0944 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-7 description: > Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -29,6 +27,5 @@ function testcase() { obj[2] = 9; Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-8.js index 5aff37c00b..a7ac4344bc 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-2-8 description: > Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -34,6 +32,5 @@ function testcase() { child[2] = 9; Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-9.js index 22e0b90a93..09a9cbb483 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-2-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-2-9.js @@ -7,10 +7,8 @@ description: > Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { result = (obj.length === 2); @@ -42,6 +40,5 @@ function testcase() { child[2] = 9; Array.prototype.forEach.call(child, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-1.js index 889c14538f..f8cbc2571d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-3-1 description: Array.prototype.forEach - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -19,6 +16,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-10.js index df903bc50c..046d9b187d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-10 description: > Array.prototype.forEach - value of 'length' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-11.js index 7763ff742e..c463fc5ea5 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-11 description: > Array.prototype.forEach - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-12.js index be5b1ea764..e106d2f188 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-12 description: > Array.prototype.forEach - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !testResult; - } -runTestCase(testcase); +assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-13.js index 2832f0941d..c13bd9dcc9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-13 description: > Array.prototype.forEach - 'length' is a string containing a decimal number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-14.js index 80aaba769c..a627bcd0ce 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-3-14 description: Array.prototype.forEach - 'length' is a string containing -Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed2 = false; function callbackfn2(val, idx, obj) { @@ -19,6 +16,4 @@ function testcase() { Array.prototype.forEach.call(obj2, callbackfn2); - return !accessed2; - } -runTestCase(testcase); +assert.sameValue(accessed2, false, 'accessed2'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-15.js index 7d3590e911..00f5179d6c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-15 description: > Array.prototype.forEach - 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 1: 11, 2: 9, length: "2E0" }; Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-16.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-16.js index c74f9c0689..d1ce1e54c6 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-16.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-16 description: > Array.prototype.forEach - 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-17.js index 7d28d2bb8d..d11b52f5ff 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-17 description: > Array.prototype.forEach - 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-18.js index f756482a93..6b5c38602f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-18 description: > Array.prototype.forEach - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-19.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-19.js index 6c9cb1382f..3c4e8c0bff 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-19.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-19 description: > Array.prototype.forEach - value of 'length' is an Object which has an own toString method. -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -29,6 +26,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-2.js index c244fe1fe9..91db62edbc 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-2 description: > Array.prototype.forEach - value of 'length' is a boolean (value is true) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { testResult = (val > 10); @@ -20,6 +17,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-20.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-20.js index 14948f4c42..1f6adf5de9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-20.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-20 description: > Array.prototype.forEach - value of 'length' is an Object which has an own valueOf method. -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -29,6 +26,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-21.js index 08b780a29c..88392289f1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-21.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-21.js @@ -7,11 +7,8 @@ description: > Array.prototype.forEach - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var firstStepOccured = false; var secondStepOccured = false; @@ -37,6 +34,6 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult && firstStepOccured && secondStepOccured; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert(firstStepOccured, 'firstStepOccured !== true'); +assert(secondStepOccured, 'secondStepOccured !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-23.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-23.js index b53338d4aa..4f01089711 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-23.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-23.js @@ -7,11 +7,8 @@ description: > Array.prototype.forEach uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var valueOfAccessed = false; var toStringAccessed = false; @@ -45,6 +42,6 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-24.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-24.js index bcb2d69dbf..fab3ea4516 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-24.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-24 description: > Array.prototype.forEach - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -25,6 +22,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-25.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-25.js index f7d45fa527..84187be7b1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-25.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-25.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-25 description: > Array.prototype.forEach - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -25,6 +22,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !testResult; - } -runTestCase(testcase); +assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-3.js index 48e0e9e186..8f6639a42b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-3 description: > Array.prototype.forEach - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-4.js index 1f69b3f0cc..324469cf71 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-4 description: > Array.prototype.forEach - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-5.js index f1d5b90570..78ffd1ea29 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-5 description: > Array.prototype.forEach - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-6.js index b796046445..9ce1ab5004 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-6 description: > Array.prototype.forEach - value of 'length' is a number (value is positive) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult1; - } -runTestCase(testcase); +assert(testResult1, 'testResult1 !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-7.js index 35247a7987..181d6d70b9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-7 description: > Array.prototype.forEach - value of 'length' is a number (value is negative) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !testResult1; - } -runTestCase(testcase); +assert.sameValue(testResult1, false, 'testResult1'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-9.js index 49edfad154..ef607572ce 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-3-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-3-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-3-9 description: > Array.prototype.forEach - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-12.js index 06d75fc32e..b15cf33211 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-4-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-4-12.js @@ -4,17 +4,13 @@ /*--- es5id: 15.4.4.18-4-12 description: Array.prototype.forEach - 'callbackfn' is a function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; } [11, 9].forEach(callbackfn); - return accessed; - } -runTestCase(testcase); + +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1-s.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1-s.js index 032de30bdb..5583689ca0 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1-s.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-1-s.js @@ -5,10 +5,8 @@ es5id: 15.4.4.18-5-1-s description: Array.prototype.forEach - 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].forEach(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); + +assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-10.js index 770915bd9e..ffae109d9b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-10.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-10 description: Array.prototype.forEach - Array Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var objArray = []; @@ -17,6 +14,5 @@ function testcase() { } [11].forEach(callbackfn, objArray); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-11.js index 9b7cef78bf..0208753762 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-11.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-11 description: Array.prototype.forEach - String Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var objString = new String(); @@ -17,6 +14,5 @@ function testcase() { } [11].forEach(callbackfn, objString); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-12.js index b22740ab96..c1dfb85c1c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-12 description: Array.prototype.forEach - Boolean Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var objBoolean = new Boolean(); @@ -17,6 +14,5 @@ function testcase() { } [11].forEach(callbackfn, objBoolean); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-13.js index 9ff249b5c5..4fd60ef837 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-13.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-13 description: Array.prototype.forEach - Number Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var objNumber = new Number(); @@ -17,6 +14,5 @@ function testcase() { } [11].forEach(callbackfn, objNumber); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-14.js index 6e73147649..dc5fd5a1a6 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-14.js @@ -4,17 +4,13 @@ /*--- es5id: 15.4.4.18-5-14 description: Array.prototype.forEach - the Math object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { result = (this === Math); } [11].forEach(callbackfn, Math); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-15.js index 264fa1b9d8..2ea8d3ad5f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-15.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-15 description: Array.prototype.forEach - Date Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var objDate = new Date(); @@ -17,6 +14,5 @@ function testcase() { } [11].forEach(callbackfn, objDate); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-16.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-16.js index 70cd3c86ca..41fe5b6a9d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-16.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-16.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-16 description: Array.prototype.forEach - RegExp Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var objRegExp = new RegExp(); @@ -17,6 +14,5 @@ function testcase() { } [11].forEach(callbackfn, objRegExp); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-17.js index 4b2ce53011..5eb3554e95 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-17.js @@ -4,17 +4,13 @@ /*--- es5id: 15.4.4.18-5-17 description: Array.prototype.forEach - the JSON object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { result = (this === JSON); } [11].forEach(callbackfn, JSON); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-18.js index ef76352304..760ab064c9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-18.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-18 description: Array.prototype.forEach - Error Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var objError = new RangeError(); @@ -17,6 +14,5 @@ function testcase() { } [11].forEach(callbackfn, objError); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-19.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-19.js index 8566a90484..2b93fd04ba 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-19.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-5-19 description: > Array.prototype.forEach - the Arguments object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var arg; @@ -23,6 +20,5 @@ function testcase() { }(1, 2, 3)); [11].forEach(callbackfn, arg); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-2.js index f593633db1..1fa6f2047e 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-5-2 description: Array.prototype.forEach - thisArg is Object -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var o = new Object(); o.res = true; @@ -19,8 +17,5 @@ function testcase() { var arr = [1]; arr.forEach(callbackfn,o) - if( result === true) - return true; - } -runTestCase(testcase); +assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js index 9c148b8d88..a333979072 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-21.js @@ -4,19 +4,14 @@ /*--- es5id: 15.4.4.18-5-21 description: Array.prototype.forEach - the global object can be used as thisArg -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { result = (this === fnGlobalObject()); } [11].forEach(callbackfn, fnGlobalObject()); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-22.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-22.js index 2b1ee14837..2c3b9c3b48 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-22.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-22.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-22 description: Array.prototype.forEach - boolean primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } [11].forEach(callbackfn, false); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js index 363da88ada..4132f06778 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-23.js @@ -4,17 +4,13 @@ /*--- es5id: 15.4.4.18-5-23 description: Array.prototype.forEach - number primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { result = (this.valueOf() === 101); } [11].forEach(callbackfn, 101); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-24.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-24.js index e3d51f27d8..7c67a188f3 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-24.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-24.js @@ -4,17 +4,13 @@ /*--- es5id: 15.4.4.18-5-24 description: Array.prototype.forEach - string primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { result = (this.valueOf() === "abc"); } [11].forEach(callbackfn, "abc"); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-25.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-25.js index 66d8c13c3a..6be4d43ca1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-25.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-25.js @@ -5,10 +5,8 @@ es5id: 15.4.4.18-5-25 description: Array.prototype.forEach - thisArg not passed flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function innerObj() { this._15_4_4_18_5_25 = true; var _15_4_4_18_5_25 = false; @@ -20,6 +18,5 @@ function testcase() { arr.forEach(callbackfn) this.retVal = !result; } - return new innerObj().retVal; - } -runTestCase(testcase); + +assert(new innerObj().retVal, 'new innerObj().retVal !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js index 4926c68194..1fc3c5897d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-5-3 description: Array.prototype.forEach - thisArg is Array -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var a = new Array(); a.res = true; @@ -19,8 +17,5 @@ function testcase() { var arr = [1]; arr.forEach(callbackfn,a) - if( result === true) - return true; - } -runTestCase(testcase); +assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-4.js index 217576e780..80d781f5df 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-5-4 description: > Array.prototype.forEach - thisArg is object from object template(prototype) -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var result; function callbackfn(val, idx, obj) @@ -22,8 +20,5 @@ function testcase() { var f = new foo(); var arr = [1]; arr.forEach(callbackfn,f) - if( result === true) - return true; - } -runTestCase(testcase); +assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-5.js index bf4009ab0b..9159a2eacb 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-5.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-5-5 description: Array.prototype.forEach - thisArg is object from object template -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var result; function callbackfn(val, idx, obj) @@ -21,8 +19,5 @@ function testcase() { var arr = [1]; arr.forEach(callbackfn,f) - if( result === true) - return true; - } -runTestCase(testcase); +assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-6.js index af0edefc73..c80661177f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-5-6 description: Array.prototype.forEach - thisArg is function -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var result; function callbackfn(val, idx, obj) @@ -20,8 +18,5 @@ function testcase() { var arr = [1]; arr.forEach(callbackfn,foo) - if( result === true) - return true; - } -runTestCase(testcase); +assert.sameValue(result, true, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-7.js index 46ed9b3df3..14cd7aec47 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-7.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-7 description: Array.prototype.forEach - built-in functions can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } [11].forEach(callbackfn, eval); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-9.js index 008d2f3a53..18d1f36a81 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-5-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-5-9.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-5-9 description: Array.prototype.forEach - Function Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var objString = function () { }; @@ -17,6 +14,5 @@ function testcase() { } [11].forEach(callbackfn, objString); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-1.js index a616d26d20..8710bd1412 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-1 description: > Array.prototype.forEach doesn't consider new elements added to array after the call -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -21,7 +18,5 @@ function testcase() { var arr = [1,2,,4,5]; arr.forEach(callbackfn); - if( callCnt === 5) - return true; - } -runTestCase(testcase); + +assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-2.js index 323d88d961..a48d14563c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-2 description: > Array.prototype.forEach doesn't visit deleted elements in array after the call -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -21,8 +18,5 @@ function testcase() { var arr = [1,2,3,4,5]; arr.forEach(callbackfn) - if( callCnt === 4) - return true; - - } -runTestCase(testcase); + +assert.sameValue(callCnt, 4, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-3.js index 2f643efcce..9710342cde 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-3 description: > Array.prototype.forEach doesn't visit deleted elements when Array.length is decreased -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -20,8 +17,5 @@ function testcase() { var arr = [1,2,3,4,5]; arr.forEach(callbackfn); - if( callCnt === 3) - return true; - - } -runTestCase(testcase); + +assert.sameValue(callCnt, 3, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-4.js index ba632b2e70..9394e7d5f4 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-4 description: > Array.prototype.forEach doesn't consider newly added elements in sparse array -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -22,8 +19,5 @@ function testcase() { arr[1] = 1; arr[2] = 2; arr.forEach(callbackfn); - if( callCnt === 2) - return true; - - } -runTestCase(testcase); + +assert.sameValue(callCnt, 2, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-5.js index d8c938f680..186f94fb98 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-5 description: > Array.prototype.forEach visits deleted element in array after the call when same index is also present in prototype -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -23,8 +20,5 @@ function testcase() { var arr = [1,2,3,4,5]; arr.forEach(callbackfn) delete Array.prototype[4]; - if( callCnt === 5) - return true; - - } -runTestCase(testcase); + +assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-7.js index 0ce280ffaf..67691e700f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-7 description: > Array.prototype.forEach - considers new value of elements in array after the call -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var arr = [1, 2, 3, 4, 5]; @@ -22,6 +19,5 @@ function testcase() { } arr.forEach(callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-8.js index 738c7f530e..417e267f73 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-8.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-7-8 description: Array.prototype.forEach - no observable effects occur if len is 0 -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { @@ -17,6 +15,5 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 0 }; Array.prototype.forEach.call(obj, callbackfn); - return !accessed; - } -runTestCase(testcase); + +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-9.js index 128b91c985..00418300a3 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-9 description: > Array.prototype.forEach - modifications to length don't change number of iterations -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { called++; @@ -27,6 +24,5 @@ function testcase() { }); Array.prototype.forEach.call(obj, callbackfn); - return 2 === called; - } -runTestCase(testcase); + +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-1.js index 0b8631b39a..ee403d8c0f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-b-1 description: > Array.prototype.forEach - callbackfn not called for indexes never been assigned values -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -20,7 +17,5 @@ function testcase() { var arr = new Array(10); arr[1] = undefined; arr.forEach(callbackfn); - if( callCnt === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-14.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-14.js index d4b4f023a3..23c882a610 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-14.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-b-14 description: > Array.prototype.forEach - decreasing length of array causes index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { arr.forEach(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-16.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-16.js index 6f0594ff94..288bdca0a9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-16.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-16.js @@ -7,11 +7,8 @@ description: > Array.prototype.forEach - decreasing length of array does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -39,6 +36,4 @@ function testcase() { arr.forEach(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-2.js index b59a90144e..eb4c4d731f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-b-2 description: > Array.prototype.forEach - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -31,6 +28,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-3.js index f767f3e791..fca6c7e9d1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-b-3 description: > Array.prototype.forEach - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -31,6 +28,6 @@ function testcase() { }); Array.prototype.forEach.call(obj, callbackfn); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-4.js index a0debd9568..d8f9cd1fe9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-b-4 description: > Array.prototype.forEach - properties added into own object after current position are visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-5.js index 96d63c8d1b..501ee6fd81 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-b-5 description: > Array.prototype.forEach - properties added into own object after current position are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); arr.forEach(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-8.js index 335289dea1..1009f47580 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-b-8 description: > Array.prototype.forEach - deleting own property causes index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); Array.prototype.forEach.call(obj, callbackfn); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-9.js index be90d079c2..f5e66c6cee 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-b-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-b-9 description: > Array.prototype.forEach - deleting own property causes index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); arr.forEach(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-1.js index 9dde0bb79a..ae3db45a3d 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-1 description: > Array.prototype.forEach - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = { }; var testResult = false; @@ -24,6 +21,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-10.js index 103cda86ae..9456a8ee1b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-10 description: > Array.prototype.forEach - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -30,6 +27,4 @@ function testcase() { arr.forEach(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-11.js index b01b2f960c..2891f135a6 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -37,6 +34,4 @@ function testcase() { Array.prototype.forEach.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-13.js index 31e7cb1b09..985d6d5d6b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-13.js @@ -7,11 +7,8 @@ description: > Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -45,6 +42,4 @@ function testcase() { Array.prototype.forEach.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-15.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-15.js index e203b84e5e..610e74c523 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-15.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-15 description: > Array.prototype.forEach - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -36,6 +33,4 @@ function testcase() { Array.prototype.forEach.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js index c9019038c9..9d1a281174 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-17 description: > Array.prototype.forEach - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -27,6 +24,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-18.js index 13d8f682bf..8450ff8478 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-18 description: > Array.prototype.forEach - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -28,6 +25,4 @@ function testcase() { arr.forEach(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-2.js index b566d65d2d..91259c2198 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-2 description: > Array.prototype.forEach - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,4 @@ function testcase() { [11].forEach(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-21.js index 8c0777b27d..c3c4e307ae 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-21.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-21 description: > Array.prototype.forEach - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -33,6 +30,4 @@ function testcase() { Array.prototype.forEach.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-25.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-25.js index 754d666b15..0df2528714 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-25.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -26,6 +23,4 @@ function testcase() { func(11); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-26.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-26.js index 34f86fa85f..b3db7c3b67 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-26.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; var testResult = false; @@ -35,6 +32,4 @@ function testcase() { func(11, 9); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-27.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-27.js index 79e14ac4e2..c2ef2da70a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-27.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; var testResult = false; @@ -37,6 +34,4 @@ function testcase() { func(11, 12, 9); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-28.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-28.js index 56a12e93b2..e7d67553af 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-28.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-28 description: > Array.prototype.forEach - element changed by getter on previous iterations is observed on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var arr = []; var testResult = false; @@ -42,6 +39,4 @@ function testcase() { arr.forEach(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js index ab242334df..c351de143e 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-29 description: > Array.prototype.forEach - 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 }; var testResult = false; @@ -42,6 +39,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-3.js index 67bf4d84b3..b91bdcc185 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-3 description: > Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; var testResult = false; @@ -31,6 +28,4 @@ function testcase() { Array.prototype.forEach.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-5.js index 2ffe61dcda..1d807b94c8 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -41,6 +38,4 @@ function testcase() { Array.prototype.forEach.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-7.js index 5b0f7b65a7..8a4742a83b 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-7 description: > Array.prototype.forEach - element to be retrieved is inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = 'abc'; var testResult = false; @@ -30,6 +27,4 @@ function testcase() { Array.prototype.forEach.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-9.js index dcab8ab87f..770b1f9b2a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-i-9 description: > Array.prototype.forEach - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(val, idx, obj) { @@ -30,6 +27,4 @@ function testcase() { Array.prototype.forEach.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1.js index 6c370fccf8..57df71775a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-7-c-ii-1 description: Array.prototype.forEach - callbackfn called with correct parameters -includes: [runTestCase.js] ---*/ -function testcase() { - var bPar = true; var bCalled = false; function callbackfn(val, idx, obj) @@ -21,7 +18,6 @@ function testcase() { var arr = [0,1,true,null,new Object(),"five"]; arr[999999] = -6.6; arr.forEach(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/forEach/15.4.4.18-7-c-ii-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-10.js index b4802aee4e..e8f6e69da1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-10.js @@ -6,17 +6,13 @@ es5id: 15.4.4.18-7-c-ii-10 description: > Array.prototype.forEach - callbackfn is called with 1 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val) { result = (val > 10); } [11].forEach(callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-11.js index c89a80e2f8..424436deda 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-11.js @@ -6,17 +6,13 @@ es5id: 15.4.4.18-7-c-ii-11 description: > Array.prototype.forEach - callbackfn is called with 2 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx) { result = (val > 10 && arguments[2][idx] === val); } [11].forEach(callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-12.js index aafa401ee6..fc9fc9428f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-12.js @@ -6,17 +6,13 @@ es5id: 15.4.4.18-7-c-ii-12 description: > Array.prototype.forEach - callbackfn is called with 3 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { result = (val > 10 && obj[idx] === val); } [11].forEach(callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-13.js index 6946afa151..831901ee2f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-13.js @@ -4,17 +4,13 @@ /*--- es5id: 15.4.4.18-7-c-ii-13 description: Array.prototype.forEach - callbackfn that uses arguments -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn() { result = (arguments[2][arguments[1]] === arguments[0]); } [11].forEach(callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-16.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-16.js index e75001b19a..cf464b5cba 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-16.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-16 description: > Array.prototype.forEach - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean) -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { result = (this.valueOf() !== false); @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; Array.prototype.forEach.call(obj, callbackfn, false); - return !result; - } -runTestCase(testcase); + +assert.sameValue(result, false, 'result'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-17.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-17.js index 192fa78c87..c23ff9bc22 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-17.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-17 description: > Array.prototype.forEach - 'this' of 'callbackfn' is a Number object when T is not an object (T is a number) -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, o) { result = (5 === this.valueOf()); @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; Array.prototype.forEach.call(obj, callbackfn, 5); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-18.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-18.js index 4d48350ac3..6eda43be32 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-18.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-18 description: > Array.prototype.forEach - 'this' of 'callbackfn' is an String object when T is not an object (T is a string) -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { result = ('hello' === this.valueOf()); @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; Array.prototype.forEach.call(obj, callbackfn, "hello"); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-19.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-19.js index 04acf59b9b..61b7068a4f 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-19.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-7-c-ii-19 description: Array.prototype.forEach - non-indexed properties are not called -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var result = true; function callbackfn(val, idx, obj) { @@ -21,6 +18,6 @@ function testcase() { var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; Array.prototype.forEach.call(obj, callbackfn); - return result && accessed; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-2.js index d3e1c0e8b3..511e78e931 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-7-c-ii-2 description: Array.prototype.forEach - callbackfn takes 3 arguments -includes: [runTestCase.js] ---*/ -function testcase() { - var parCnt = 3; var bCalled = false function callbackfn(val, idx, obj) @@ -20,8 +17,6 @@ function testcase() { var arr = [0,1,2,3,4,5,6,7,8,9]; arr.forEach(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/forEach/15.4.4.18-7-c-ii-20.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-20.js index 68f7483990..fad988f404 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-20.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-20 description: > Array.prototype.forEach - callbackfn called with correct parameters (thisArg is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(val, idx, obj) { result = (10 === this.threshold); @@ -21,6 +18,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; Array.prototype.forEach.call(obj, callbackfn, thisArg); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js index 58c70d0622..083cb472ea 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-21 description: > Array.prototype.forEach - callbackfn called with correct parameters (kValue is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var resultOne = false; var resultTwo = false; @@ -28,6 +25,6 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 2 }; Array.prototype.forEach.call(obj, callbackfn); - return resultOne && resultTwo; - } -runTestCase(testcase); + +assert(resultOne, 'resultOne !== true'); +assert(resultTwo, 'resultTwo !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js index cf95ebab86..9a7cafcda3 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-22 description: > Array.prototype.forEach - callbackfn called with correct parameters (the index k is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var resultOne = false; var resultTwo = false; @@ -28,6 +25,6 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 2 }; Array.prototype.forEach.call(obj, callbackfn); - return resultOne && resultTwo; - } -runTestCase(testcase); + +assert(resultOne, 'resultOne !== true'); +assert(resultTwo, 'resultTwo !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-23.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-23.js index 19dbd5b7ac..2e68805d5c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-23.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-23 description: > Array.prototype.forEach - callbackfn called with correct parameters (this object O is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var obj = { 0: 11, length: 2 }; @@ -19,6 +16,5 @@ function testcase() { } Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-4.js index e172cc39d7..8360e07987 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-4 description: > Array.prototype.forEach - k values are passed in ascending numeric order -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3, 4, 5]; var lastIdx = 0; var called = 0; @@ -25,6 +22,6 @@ function testcase() { } arr.forEach(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/forEach/15.4.4.18-7-c-ii-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-5.js index edfbfcca9d..d3a5836166 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-5 description: > Array.prototype.forEach - k values are accessed during each iteration and not prior to starting the loop on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var result = true; var kIndex = []; @@ -30,6 +27,4 @@ function testcase() { [11, 12, 13, 14].forEach(callbackfn, undefined); - return result; - } -runTestCase(testcase); +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-6.js index a01650fafa..836d290fe0 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-6 description: > Array.prototype.forEach - arguments to callbackfn are self consistent -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var obj = { 0: 11, length: 1 }; var thisArg = {}; @@ -23,6 +20,5 @@ function testcase() { } Array.prototype.forEach.call(obj, callbackfn, thisArg); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-8.js index f16d7d91cb..9ca0fbe8de 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.18-7-c-ii-8 description: > Array.prototype.forEach - element changed by callbackfn on previous iterations is observed -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; var obj = { 0: 11, 1: 12, length: 2 }; @@ -25,6 +22,5 @@ function testcase() { } Array.prototype.forEach.call(obj, callbackfn); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-9.js index dd5d6817e8..d5da08c291 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-7-c-ii-9.js @@ -6,17 +6,13 @@ es5id: 15.4.4.18-7-c-ii-9 description: > Array.prototype.forEach - callbackfn is called with 0 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn() { called++; } [11, 12].forEach(callbackfn); - return 2 === called; - } -runTestCase(testcase); + +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-1.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-1.js index 4cac2b8859..1ed233338a 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-1.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-1.js @@ -6,15 +6,10 @@ es5id: 15.4.4.18-8-1 description: > Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { var callCnt = 0; function cb(){callCnt++} var i = [].forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-10.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-10.js index 44ab265909..383c8ce082 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-10.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-10.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.18-8-10 description: Array.prototype.forEach - 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,8 +14,5 @@ function testcase() { var callCnt = 0; function cb(){callCnt++} var i = f.forEach(cb); - if (callCnt === 1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js index e73457fc2b..228694dc4c 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-11.js @@ -6,25 +6,17 @@ es5id: 15.4.4.18-8-11 description: > Array.prototype.forEach doesn't mutate the array on which it is called on -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } var arr = [1,2,3,4,5]; arr.forEach(callbackfn); - if(arr[0] === 1 && - arr[1] === 2 && - arr[2] === 3 && - arr[3] === 4 && - arr[4] === 5) - { - return true; - } - } -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(arr[4], 5, 'arr[4]'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-12.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-12.js index 261ee1dedc..0e7c1c4ba9 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-12.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.18-8-12 description: Array.prototype.forEach doesn't visit expandos -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -19,10 +16,5 @@ function testcase() { arr[true] = 11; arr.forEach(callbackfn); - if(callCnt == 5) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-13.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-13.js index c12b7b76b4..f33b5b89ee 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-13.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-13.js @@ -6,17 +6,14 @@ es5id: 15.4.4.18-8-13 description: > Array.prototype.forEach - undefined will be returned when 'len' is 0 -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; } var result = [].forEach(callbackfn); - return typeof result === "undefined" && !accessed; - } -runTestCase(testcase); + +assert.sameValue(typeof result, "undefined", 'typeof result'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-2.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-2.js index 645d578f9c..d0c99e08d6 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-2.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-8-2 description: > Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { var callCnt = 0; function cb(){callCnt++} var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-3.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-3.js index 2d9e5be259..ea5a050188 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-3.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-8-3 description: > Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { var callCnt = 0; function cb(){callCnt++} var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-4.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-4.js index a98a5c0c39..ff273dc4c2 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-4.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-8-4 description: > Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { var callCnt = 0; function cb(){callCnt++} var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-5.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-5.js index 8a2650fcf3..b6c1bb45fa 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-5.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-8-5 description: > Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { var callCnt = 0; function cb(){callCnt++} var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-6.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-6.js index 83517efc43..6a430109f4 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-6.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-8-6 description: > Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -20,8 +18,5 @@ function testcase() { var callCnt = 0; function cb(){callCnt++} var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-7.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-7.js index 9aeda2e436..da408aa1d1 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-7.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-7.js @@ -7,10 +7,8 @@ description: > Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -26,8 +24,5 @@ function testcase() { var callCnt = 0; function cb(){callCnt++} var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-8.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-8.js index a0381d5103..42ab786e21 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-8.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-8-8 description: > Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with [] -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -32,8 +30,5 @@ function testcase() { var callCnt = 0; function cb(){callCnt++} var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-9.js b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-9.js index 5ac069ab62..801e847659 100644 --- a/test/built-ins/Array/prototype/forEach/15.4.4.18-8-9.js +++ b/test/built-ins/Array/prototype/forEach/15.4.4.18-8-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.18-8-9 description: > Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with [0] -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -33,8 +31,5 @@ function testcase() { var callCnt = 0; function cb(){callCnt++} var i = f.forEach(cb); - if (callCnt === 0) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-0-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-0-1.js index 889c353bcb..68068f4525 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-0-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.14-0-1 description: Array.prototype.indexOf must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.indexOf; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-0-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-0-2.js index 7f42405736..3294781683 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-0-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.14-0-2 description: Array.prototype.indexOf has a length property whose value is 1. -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.indexOf.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.length, 1, 'Array.prototype.indexOf.length'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js index 05a2998206..541896c6f6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-11.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.14-1-11 description: Array.prototype.indexOf applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Date(); obj.length = 2; obj[1] = true; - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js index 65385526f4..e3ca3790b6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-12.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.14-1-12 description: Array.prototype.indexOf applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new RegExp(); obj.length = 2; obj[1] = true; - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js index a1e79dd3fb..1157291e5d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-14.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.14-1-14 description: Array.prototype.indexOf applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new SyntaxError(); obj[1] = true; obj.length = 2; - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js index 7cca86643c..4b28849c52 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-15.js @@ -4,16 +4,11 @@ /*--- es5id: 15.4.4.14-1-15 description: Array.prototype.indexOf applied to Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - function fun() { return arguments; } var obj = fun(1, true, 3); - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js index 06cfe2c7a2..c9d7e1ab9d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-4.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.14-1-4 description: Array.prototype.indexOf applied to Boolean Object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Boolean(false); obj.length = 2; obj[1] = true; - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js index c9bbd1a6f8..c1a21c1a36 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-6.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.14-1-6 description: Array.prototype.indexOf applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Number(-3); obj.length = 2; obj[1] = true; - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js index 07190e6d15..9e365b78ae 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-8.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.14-1-8 description: Array.prototype.indexOf applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new String("null"); - return Array.prototype.indexOf.call(obj, 'l') === 2; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, 'l'), 2, 'Array.prototype.indexOf.call(obj, "l")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js index c84d1fb1b5..c3f0b9aa6b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-9.js @@ -4,16 +4,11 @@ /*--- es5id: 15.4.4.14-1-9 description: Array.prototype.indexOf applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = function (a, b) { return a + b; }; obj[1] = true; - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js index faab872df5..ba0db2af36 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-10-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.14-10-2 description: > Array.prototype.indexOf returns -1 if 'length' is 0 and does not access any other properties -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; var f = {length: 0}; Object.defineProperty(f,"0",{get: function () {accessed = true; return 1;}}); @@ -17,8 +15,6 @@ function testcase() { var i = Array.prototype.indexOf.call(f,1); - if (i === -1 && accessed==false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js index e1a2404b63..45b2ad893d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-1.js @@ -6,13 +6,10 @@ es5id: 15.4.4.14-2-1 description: > Array.prototype.indexOf - 'length' is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var objOne = { 1: true, length: 2 }; var objTwo = { 2: true, length: 2 }; - return Array.prototype.indexOf.call(objOne, true) === 1 && - Array.prototype.indexOf.call(objTwo, true) === -1; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.indexOf.call(objOne, true), 1, 'Array.prototype.indexOf.call(objOne, true)'); +assert.sameValue(Array.prototype.indexOf.call(objTwo, true), -1, 'Array.prototype.indexOf.call(objTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js index 144ec76973..7de29bc268 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-10.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.14-2-10 description: Array.prototype.indexOf - 'length' is inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = {}; Object.defineProperty(proto, "length", { get: function () { @@ -25,7 +22,5 @@ function testcase() { var childTwo = new Con(); childTwo[2] = true; - return Array.prototype.indexOf.call(childOne, true) === 1 && - Array.prototype.indexOf.call(childTwo, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(childOne, true), 1, 'Array.prototype.indexOf.call(childOne, true)'); +assert.sameValue(Array.prototype.indexOf.call(childTwo, true), -1, 'Array.prototype.indexOf.call(childTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js index 4e4649ba6b..db7f2dde93 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-11.js @@ -6,17 +6,12 @@ es5id: 15.4.4.14-2-11 description: > Array.prototype.indexOf - 'length' is own accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: true }; Object.defineProperty(obj, "length", { set: function () { }, configurable: true }); - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js index 0d49b2f827..e5ce782fd1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-2-13 description: > Array.prototype.indexOf - 'length' is inherited accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = {}; Object.defineProperty(proto, "length", { set: function () { }, @@ -23,6 +20,4 @@ function testcase() { var child = new Con(); child[1] = true; - return Array.prototype.indexOf.call(child, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(child, true), -1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js index efbc591db0..5d8470f4ee 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-14.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.14-2-14 description: Array.prototype.indexOf - 'length' is undefined property -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: true, 1: true }; - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js index dec55b06b3..41db1ed20a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-17.js @@ -6,17 +6,12 @@ es5id: 15.4.4.14-2-17 description: > Array.prototype.indexOf applied to Arguments object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var func = function (a, b) { arguments[2] = false; return Array.prototype.indexOf.call(arguments, true) === 1 && Array.prototype.indexOf.call(arguments, false) === -1; }; - return func(0, true); - } -runTestCase(testcase); +assert(func(0, true), 'func(0, true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js index 3564c4bfee..fdd7043ec6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-19.js @@ -6,18 +6,13 @@ es5id: 15.4.4.14-2-19 description: > Array.prototype.indexOf applied to Function object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = function (a, b) { return a + b; }; obj[1] = "b"; obj[2] = "c"; - return Array.prototype.indexOf.call(obj, obj[1]) === 1 && - Array.prototype.indexOf.call(obj, obj[2]) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, obj[1]), 1, 'Array.prototype.indexOf.call(obj, obj[1])'); +assert.sameValue(Array.prototype.indexOf.call(obj, obj[2]), -1, 'Array.prototype.indexOf.call(obj, obj[2])'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js index efc2074243..541996a5d2 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-2-3 description: > Array.prototype.indexOf - 'length' is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = { length: 0 }; var Con = function () {}; @@ -20,6 +17,4 @@ function testcase() { child.length = 2; child[1] = true; - return Array.prototype.indexOf.call(child, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js index 48efb0e92f..40b169ae14 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.14-2-5 description: > Array.prototype.indexOf - 'length' is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var proto = {}; Object.defineProperty(proto, "length", { get: function () { @@ -29,6 +27,4 @@ function testcase() { }); child[1] = true; - return Array.prototype.indexOf.call(child, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js index f18cea0082..e06a19566c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.14-2-6 description: Array.prototype.indexOf - 'length' is an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { var proto = { length: 2 }; var Con = function () {}; @@ -18,7 +16,5 @@ function testcase() { var childTwo = new Con(); childTwo[2] = true; - return Array.prototype.indexOf.call(childOne, true) === 1 && - Array.prototype.indexOf.call(childTwo, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(childOne, true), 1, 'Array.prototype.indexOf.call(childOne, true)'); +assert.sameValue(Array.prototype.indexOf.call(childTwo, true), -1, 'Array.prototype.indexOf.call(childTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js index 77de93d98a..67b3bf1ad4 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-7.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.14-2-7 description: Array.prototype.indexOf - 'length' is own accessor property -includes: [runTestCase.js] ---*/ -function testcase() { var objOne = { 1: true }; var objTwo = { 2: true }; Object.defineProperty(objOne, "length", { @@ -23,7 +21,5 @@ function testcase() { configurable: true }); - return Array.prototype.indexOf.call(objOne, true) === 1 && - Array.prototype.indexOf.call(objTwo, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(objOne, true), 1, 'Array.prototype.indexOf.call(objOne, true)'); +assert.sameValue(Array.prototype.indexOf.call(objTwo, true), -1, 'Array.prototype.indexOf.call(objTwo, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js index 67f7c56108..94ab647feb 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-2-8 description: > Array.prototype.indexOf - 'length' is own accessor property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = { length: 0 }; var Con = function () {}; @@ -26,6 +23,4 @@ function testcase() { configurable: true }); - return Array.prototype.indexOf.call(child, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js index 565d2b0518..ce988c07e8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-2-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.14-2-9 description: > Array.prototype.indexOf - 'length' is own accessor property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { var proto = {}; Object.defineProperty(proto, "length", { get: function () { @@ -31,6 +29,4 @@ function testcase() { configurable: true }); - return Array.prototype.indexOf.call(child, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(child, true), 1, 'Array.prototype.indexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js index 6c689093b8..41fd56d6df 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.14-3-1 description: Array.prototype.indexOf - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 1, 1: 1, length: undefined }; - return Array.prototype.indexOf.call(obj, 1) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, 1), -1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js index 14d7615c48..06053b3aff 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-10.js @@ -6,13 +6,8 @@ es5id: 15.4.4.14-3-10 description: > Array.prototype.indexOf - value of 'length' is number primitive (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 0, length: NaN }; - return Array.prototype.indexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, 0), -1, 'Array.prototype.indexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js index 3a9e1b7f09..e90d3d9285 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-11.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-11 description: > Array.prototype.indexOf - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: 1, 2: 2, length: "2" }; - return Array.prototype.indexOf.call(obj, 1) === 1 && - Array.prototype.indexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, 1), 1, 'Array.prototype.indexOf.call(obj, 1)'); +assert.sameValue(Array.prototype.indexOf.call(obj, 2), -1, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js index b7e3f9dc4e..643b4d4e9e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-12.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-12 description: > Array.prototype.indexOf - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: "true", 2: "2", length: "-4294967294" }; - return Array.prototype.indexOf.call(obj, "true") === -1 && - Array.prototype.indexOf.call(obj, "2") === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, "true"), -1, 'Array.prototype.indexOf.call(obj, "true")'); +assert.sameValue(Array.prototype.indexOf.call(obj, "2"), -1, 'Array.prototype.indexOf.call(obj, "2")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js index 64ec99e30c..8d644bbdfe 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-13.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-13 description: > Array.prototype.indexOf - 'length' is a string containing a decimal number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 199: true, 200: "200.59", length: "200.59" }; - return Array.prototype.indexOf.call(obj, true) === 199 && - Array.prototype.indexOf.call(obj, "200.59") === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 199, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, "200.59"), -1, 'Array.prototype.indexOf.call(obj, "200.59")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js index e05bebdecb..f5b7886b08 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-14.js @@ -6,17 +6,12 @@ es5id: 15.4.4.14-3-14 description: > Array.prototype.indexOf - 'length' is a string containing +/-Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - var objOne = { 0: true, 1: true, length: "Infinity" }; var objTwo = { 0: true, 1: true, length: "+Infinity" }; var objThree = { 0: true, 1: true, length: "-Infinity" }; - return Array.prototype.indexOf.call(objOne, true) === 0 && - Array.prototype.indexOf.call(objTwo, true) === 0 && - Array.prototype.indexOf.call(objThree, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(objOne, true), 0, 'Array.prototype.indexOf.call(objOne, true)'); +assert.sameValue(Array.prototype.indexOf.call(objTwo, true), 0, 'Array.prototype.indexOf.call(objTwo, true)'); +assert.sameValue(Array.prototype.indexOf.call(objThree, true), -1, 'Array.prototype.indexOf.call(objThree, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js index 57ecb5d047..e186bf5c1b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-15.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-15 description: > Array.prototype.indexOf - 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: true, 2: "2E0", length: "2E0" }; - return Array.prototype.indexOf.call(obj, true) === 1 && - Array.prototype.indexOf.call(obj, "2E0") === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, "2E0"), -1, 'Array.prototype.indexOf.call(obj, "2E0")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js index 636f1031df..f4baaa83d5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-16.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-16 description: > Array.prototype.indexOf - 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 10: true, 11: "0x00B", length: "0x00B" }; - return Array.prototype.indexOf.call(obj, true) === 10 && - Array.prototype.indexOf.call(obj, "0x00B") === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 10, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, "0x00B"), -1, 'Array.prototype.indexOf.call(obj, "0x00B")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js index 4655af5727..d78900dfdc 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-17.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-17 description: > Array.prototype.indexOf - 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: true, 2: "0002.0", length: "0002.0" }; - return Array.prototype.indexOf.call(obj, true) === 1 && - Array.prototype.indexOf.call(obj, "0002.0") === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, "0002.0"), -1, 'Array.prototype.indexOf.call(obj, "0002.0")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js index c9f3a4e400..8f46145d9e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-18.js @@ -6,13 +6,8 @@ es5id: 15.4.4.14-3-18 description: > Array.prototype.indexOf - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: true, 100: true, length: "one" }; - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js index 0e8b4bc353..a69172fd7e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-3-19 description: > Array.prototype.indexOf - value of 'length' is an Object which has an own toString method. -includes: [runTestCase.js] ---*/ -function testcase() { - // objects inherit the default valueOf() method from Object // that simply returns itself. Since the default valueOf() method // does not return a primitive value, ES next tries to convert the object @@ -28,7 +25,5 @@ function testcase() { } }; - return Array.prototype.indexOf.call(obj, true) === 1 && - Array.prototype.indexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, 2), -1, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js index 22a0917647..03b9d15e98 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-2.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-3-2 description: > Array.prototype.indexOf return -1 when 'length' is a boolean (value is true) -includes: [runTestCase.js] ---*/ -function testcase() { var obj = { 0: 0, 1: 1, length: true }; - return Array.prototype.indexOf.call(obj, 0) === 0 && - Array.prototype.indexOf.call(obj, 1) === -1; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); +assert.sameValue(Array.prototype.indexOf.call(obj, 1), -1, 'Array.prototype.indexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js index b8d6fa363d..50507e59e9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-3-20 description: > Array.prototype.indexOf - value of 'length' is an Object which has an own valueOf method. -includes: [runTestCase.js] ---*/ -function testcase() { - //valueOf method will be invoked first, since hint is Number var obj = { 1: true, @@ -22,7 +19,5 @@ function testcase() { } }; - return Array.prototype.indexOf.call(obj, true) === 1 && - Array.prototype.indexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, 2), -1, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js index 7cabb1e776..968de40989 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-21.js @@ -7,11 +7,8 @@ description: > Array.prototype.indexOf - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - var toStringAccessed = false; var valueOfAccessed = false; @@ -30,6 +27,6 @@ function testcase() { } }; - return Array.prototype.indexOf.call(obj, true) === 1 && toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); +assert(toStringAccessed, 'toStringAccessed !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js index 5d7fc6cf0b..04c758010c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-23.js @@ -7,11 +7,8 @@ description: > Array.prototype.indexOf uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - var toStringAccessed = false; var valueOfAccessed = false; @@ -36,6 +33,6 @@ function testcase() { length: child }; - return Array.prototype.indexOf.call(obj, true) === 1 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js index b246c532f6..68d426e31a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-24.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-24 description: > Array.prototype.indexOf - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 122: true, 123: false, length: 123.321 }; //length will be 123 finally - return Array.prototype.indexOf.call(obj, true) === 122 && - Array.prototype.indexOf.call(obj, false) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 122, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js index 48b98da80f..a2477b8e96 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-25.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-25 description: > Array.prototype.indexOf - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: true, 2: false, length: -4294967294.5 }; //length will be 0 finally - return Array.prototype.indexOf.call(obj, true) === -1 && - Array.prototype.indexOf.call(obj, false) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js index 085a5a0807..7b16b7668d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-28.js @@ -6,10 +6,8 @@ es5id: 15.4.4.14-3-28 description: > Array.prototype.indexOf - value of 'length' is boundary value (2^32) -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; var obj = { 0: targetObj, @@ -18,6 +16,4 @@ function testcase() { length: 4294967296 }; - return Array.prototype.indexOf.call(obj, targetObj) === 0; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), 0, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js index d14d06a652..473b9cfc71 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-29.js @@ -6,10 +6,8 @@ es5id: 15.4.4.14-3-29 description: > Array.prototype.indexOf - value of 'length' is boundary value (2^32 + 1) -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; var obj = { 0: targetObj, @@ -17,7 +15,5 @@ function testcase() { length: 4294967297 }; - return Array.prototype.indexOf.call(obj, targetObj) === 0 && - Array.prototype.indexOf.call(obj, 4294967297) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), 0, 'Array.prototype.indexOf.call(obj, targetObj)'); +assert.sameValue(Array.prototype.indexOf.call(obj, 4294967297), 1, 'Array.prototype.indexOf.call(obj, 4294967297)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js index 77dcb9ed8b..a0c8b62348 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-3.js @@ -6,13 +6,8 @@ es5id: 15.4.4.14-3-3 description: > Array.prototype.indexOf - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: true, length: 0 }; - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js index a2171ffc04..255b93b6b9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-4.js @@ -6,13 +6,8 @@ es5id: 15.4.4.14-3-4 description: > Array.prototype.indexOf - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: true, length: +0 }; - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js index 2a5e462c71..0e97d0a83c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-5.js @@ -6,13 +6,8 @@ es5id: 15.4.4.14-3-5 description: > Array.prototype.indexOf - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: true, length: -0 }; - return Array.prototype.indexOf.call(obj, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js index 4c7abe56ae..64d6c02837 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-6.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-6 description: > Array.prototype.indexOf - value of 'length' is a number (value is positive) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 3: true, 4: false, length: 4 }; - return Array.prototype.indexOf.call(obj, true) === 3 && - Array.prototype.indexOf.call(obj, false) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 3, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js index 13707d9704..8f98d39e19 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-7.js @@ -6,14 +6,9 @@ es5id: 15.4.4.14-3-7 description: > Array.prototype.indexOf - value of 'length' is a number (value is negative) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 4: true, 5: false, length: 5 - Math.pow(2, 32) }; - return Array.prototype.indexOf.call(obj, true) === -1 && - Array.prototype.indexOf.call(obj, false) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), -1, 'Array.prototype.indexOf.call(obj, true)'); +assert.sameValue(Array.prototype.indexOf.call(obj, false), -1, 'Array.prototype.indexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js index e15f48ee2f..d63ab41c6c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-8.js @@ -6,13 +6,8 @@ es5id: 15.4.4.14-3-8 description: > Array.prototype.indexOf - value of 'length' is a number (value is Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 0, length: Infinity }; - return Array.prototype.indexOf.call(obj, 0) === 0; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js index 91846b01be..dfc8372b3e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-3-9.js @@ -6,13 +6,8 @@ es5id: 15.4.4.14-3-9 description: > Array.prototype.indexOf - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 0, length: -Infinity }; - return Array.prototype.indexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, 0), -1, 'Array.prototype.indexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js index ab9f59df66..b48fcc17b6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.14-4-1 description: Array.prototype.indexOf returns -1 if 'length' is 0 (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { var i = [].indexOf(42); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js index 9588ef9afb..f3a850eb82 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-10.js @@ -4,12 +4,9 @@ /*--- es5id: 15.4.4.14-4-10 description: Array.prototype.indexOf - 'length' is a number of value -6e-1 -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = []; var obj = { 0: targetObj, 100: targetObj, length: -6e-1 }; - return Array.prototype.indexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), -1, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js index a39ed1b843..0cdf6c64e2 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-11.js @@ -4,12 +4,9 @@ /*--- es5id: 15.4.4.14-4-11 description: Array.prototype.indexOf - 'length' is an empty string -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = []; var obj = { 0: targetObj, 100: targetObj, length: "" }; - return Array.prototype.indexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), -1, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js index e3ea53cee7..d1aa31e7ea 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-2.js @@ -6,15 +6,9 @@ es5id: 15.4.4.14-4-2 description: > Array.prototype.indexOf returns -1 if 'length' is 0 ( length overridden to null (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var i = Array.prototype.indexOf.call({length: null}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js index 51905e6244..455e8690c3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-3.js @@ -6,15 +6,9 @@ es5id: 15.4.4.14-4-3 description: > Array.prototype.indexOf returns -1 if 'length' is 0 (length overridden to false (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var i = Array.prototype.indexOf.call({length: false}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js index 820b44c3e9..a507da531f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-4.js @@ -6,15 +6,9 @@ es5id: 15.4.4.14-4-4 description: > Array.prototype.indexOf returns -1 if 'length' is 0 (generic 'array' with length 0 ) -includes: [runTestCase.js] ---*/ -function testcase() { - var i = Array.prototype.lastIndexOf.call({length: 0}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js index acca7d7d27..a96cde499a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-5.js @@ -6,15 +6,9 @@ es5id: 15.4.4.14-4-5 description: > Array.prototype.indexOf returns -1 if 'length' is 0 ( length overridden to '0' (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var i = Array.prototype.indexOf.call({length: '0'}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js index f4c8d65ed1..79a8acb8db 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-6.js @@ -6,15 +6,9 @@ es5id: 15.4.4.14-4-6 description: > Array.prototype.indexOf returns -1 if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) -includes: [runTestCase.js] ---*/ -function testcase() { - var i = Array.prototype.indexOf.call({length: { valueOf: function () { return 0;}}}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js index 10cf42c385..299eae0204 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-7.js @@ -6,12 +6,8 @@ es5id: 15.4.4.14-4-7 description: > Array.prototype.indexOf returns -1 if 'length' is 0 ( length is object overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { - - // objects inherit the default valueOf method of the Object object; // that simply returns the itself. Since the default valueOf() method // does not return a primitive value, ES next tries to convert the object @@ -19,8 +15,5 @@ function testcase() { // resulting string to a number. var i = Array.prototype.indexOf.call({length: { toString: function () { return '0';}}}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js index 1da43946be..b066833f1f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-8.js @@ -6,12 +6,8 @@ es5id: 15.4.4.14-4-8 description: > Array.prototype.indexOf returns -1 if 'length' is 0 (length is an empty array) -includes: [runTestCase.js] ---*/ -function testcase() { - - // objects inherit the default valueOf method of the Object object; // that simply returns the itself. Since the default valueOf() method // does not return a primitive value, ES next tries to convert the object @@ -27,8 +23,5 @@ function testcase() { // or if its one element is not a number, the array converts to NaN. var i = Array.prototype.indexOf.call({length: [ ]}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js index 32162208b0..f418fbd851 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-4-9.js @@ -4,12 +4,9 @@ /*--- es5id: 15.4.4.14-4-9 description: Array.prototype.indexOf - 'length' is a number of value 0.1 -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = []; var obj = { 0: targetObj, 100: targetObj, length: 0.1 }; - return Array.prototype.indexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.indexOf.call(obj, targetObj), -1, 'Array.prototype.indexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js index 59fee7a763..6bcf1d59b8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-10.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-5-10 description: > Array.prototype.indexOf - value of 'fromIndex' is a number (value is positive number) -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, targetObj, 2].indexOf(targetObj, 2) === -1 && - [0, 1, targetObj].indexOf(targetObj, 2) === 2; - } -runTestCase(testcase); + +assert.sameValue([0, targetObj, 2].indexOf(targetObj, 2), -1, '[0, targetObj, 2].indexOf(targetObj, 2)'); +assert.sameValue([0, 1, targetObj].indexOf(targetObj, 2), 2, '[0, 1, targetObj].indexOf(targetObj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js index f6677bce7b..27d0d463bc 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-11.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-5-11 description: > Array.prototype.indexOf - value of 'fromIndex' is a number (value is negative number) -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, targetObj, 2].indexOf(targetObj, -1) === -1 && - [0, 1, targetObj].indexOf(targetObj, -1) === 2; - } -runTestCase(testcase); + +assert.sameValue([0, targetObj, 2].indexOf(targetObj, -1), -1, '[0, targetObj, 2].indexOf(targetObj, -1)'); +assert.sameValue([0, 1, targetObj].indexOf(targetObj, -1), 2, '[0, 1, targetObj].indexOf(targetObj, -1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js index 88d90a0ae9..cbd2f0b275 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-12.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-5-12 description: > Array.prototype.indexOf - value of 'fromIndex' is a number (value is Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { var arr = []; arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type - return arr.indexOf(true, Infinity) === -1; - } -runTestCase(testcase); + +assert.sameValue(arr.indexOf(true, Infinity), -1, 'arr.indexOf(true, Infinity)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js index c6228091e4..e838aa1710 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-16.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-5-16 description: > Array.prototype.indexOf - value of 'fromIndex' is a string containing Infinity -includes: [runTestCase.js] ---*/ -function testcase() { var arr = []; arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type - return arr.indexOf(true, "Infinity") === -1; - } -runTestCase(testcase); + +assert.sameValue(arr.indexOf(true, "Infinity"), -1, 'arr.indexOf(true, "Infinity")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js index 2052a57cfd..0c993ccf15 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-18.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-5-18 description: > Array.prototype.indexOf - value of 'fromIndex' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0") === -1 && - [0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0") === 3; - } -runTestCase(testcase); + +assert.sameValue([0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0"), -1, '[0, 1, targetObj, 3, 4].indexOf(targetObj, "3E0")'); +assert.sameValue([0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0"), 3, '[0, 1, 2, targetObj, 4].indexOf(targetObj, "3E0")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js index 32f4295fb2..ce5382cd40 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-19.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-5-19 description: > Array.prototype.indexOf - value of 'fromIndex' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003") === -1 && - [0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003") === 3; - } -runTestCase(testcase); + +assert.sameValue([0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003"), -1, '[0, 1, targetObj, 3, 4].indexOf(targetObj, "0x0003")'); +assert.sameValue([0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003"), 3, '[0, 1, 2, targetObj, 4].indexOf(targetObj, "0x0003")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js index 6a2df8a62a..c59e64aee0 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-20.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-5-20 description: > Array.prototype.indexOf - value of 'fromIndex' which is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10") === -1 && - [0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10") === 3; - } -runTestCase(testcase); + +assert.sameValue([0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10"), -1, '[0, 1, targetObj, 3, 4].indexOf(targetObj, "0003.10")'); +assert.sameValue([0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10"), 3, '[0, 1, 2, targetObj, 4].indexOf(targetObj, "0003.10")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js index 2421b75c70..bc7e3e16b4 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-5-21 description: > Array.prototype.indexOf - value of 'fromIndex' is an Object, which has an own toString method -includes: [runTestCase.js] ---*/ -function testcase() { - // objects inherit the default valueOf() method from Object // that simply returns itself. Since the default valueOf() method // does not return a primitive value, ES next tries to convert the object @@ -22,6 +19,4 @@ function testcase() { } }; - return [0, true].indexOf(true, fromIndex) === 1; - } -runTestCase(testcase); +assert.sameValue([0, true].indexOf(true, fromIndex), 1, '[0, true].indexOf(true, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js index b0c2dad2ab..156f138bde 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-5-22 description: > Array.prototype.indexOf - value of 'fromIndex' is an Object, which has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { - var fromIndex = { valueOf: function () { return 1; @@ -18,6 +15,4 @@ function testcase() { }; - return [0, true].indexOf(true, fromIndex) === 1; - } -runTestCase(testcase); +assert.sameValue([0, true].indexOf(true, fromIndex), 1, '[0, true].indexOf(true, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js index c0b2435f2e..220a597ccd 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-23.js @@ -7,11 +7,8 @@ description: > Array.prototype.indexOf - value of 'fromIndex' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - var toStringAccessed = false; var valueOfAccessed = false; @@ -27,6 +24,6 @@ function testcase() { } }; - return [0, true].indexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +assert.sameValue([0, true].indexOf(true, fromIndex), 1, '[0, true].indexOf(true, fromIndex)'); +assert(toStringAccessed, 'toStringAccessed !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js index a8a6de8990..3d67e8fa86 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.indexOf uses inherited valueOf method when value of 'fromIndex' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - var toStringAccessed = false; var valueOfAccessed = false; @@ -31,6 +28,6 @@ function testcase() { return 2; }; - return [0, true].indexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert.sameValue([0, true].indexOf(true, child), 1, '[0, true].indexOf(true, child)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js index f9e377d026..f954ebb6dc 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-31.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-5-31 description: > Array.prototype.indexOf - 'fromIndex' is a positive non-integer, verify truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, targetObj, 2].indexOf(targetObj, 2.5) === -1 && - [0, 1, targetObj].indexOf(targetObj, 2.5) === 2; - } -runTestCase(testcase); + +assert.sameValue([0, targetObj, 2].indexOf(targetObj, 2.5), -1, '[0, targetObj, 2].indexOf(targetObj, 2.5)'); +assert.sameValue([0, 1, targetObj].indexOf(targetObj, 2.5), 2, '[0, 1, targetObj].indexOf(targetObj, 2.5)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js index d8e6dffb44..f85ec3fa4d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-32.js @@ -6,12 +6,9 @@ es5id: 15.4.4.14-5-32 description: > Array.prototype.indexOf - 'fromIndex' is a negative non-integer, verify truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, targetObj, 2].indexOf(targetObj, -1.5) === -1 && - [0, 1, targetObj].indexOf(targetObj, -1.5) === 2; - } -runTestCase(testcase); + +assert.sameValue([0, targetObj, 2].indexOf(targetObj, -1.5), -1, '[0, targetObj, 2].indexOf(targetObj, -1.5)'); +assert.sameValue([0, 1, targetObj].indexOf(targetObj, -1.5), 2, '[0, 1, targetObj].indexOf(targetObj, -1.5)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js index 52959b2ed7..4d88a35910 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-6.js @@ -4,14 +4,11 @@ /*--- es5id: 15.4.4.14-5-6 description: Array.prototype.indexOf - 'fromIndex' isn't passed -includes: [runTestCase.js] ---*/ -function testcase() { var arr = [0, 1, 2, 3, 4]; //'fromIndex' will be set as 0 if not passed by default - return arr.indexOf(0) === arr.indexOf(0, 0) && - arr.indexOf(2) === arr.indexOf(2, 0) && - arr.indexOf(4) === arr.indexOf(4, 0); - } -runTestCase(testcase); + +assert.sameValue(arr.indexOf(0), arr.indexOf(0, 0), 'arr.indexOf(0)'); +assert.sameValue(arr.indexOf(2), arr.indexOf(2, 0), 'arr.indexOf(2)'); +assert.sameValue(arr.indexOf(4), arr.indexOf(4, 0), 'arr.indexOf(4)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js index 4dccf39a13..2067ccf0de 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-6-1.js @@ -6,15 +6,10 @@ es5id: 15.4.4.14-6-1 description: > Array.prototype.indexOf returns -1 if fromIndex is greater than Array length -includes: [runTestCase.js] ---*/ -function testcase() { var a = [1,2,3]; - if (a.indexOf(1,5) === -1 && - a.indexOf(1,3) === -1 && - [ ].indexOf(1,0) === -1 ){ - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.indexOf(1,5), -1, 'a.indexOf(1,5)'); +assert.sameValue(a.indexOf(1,3), -1, 'a.indexOf(1,3)'); +assert.sameValue([ ].indexOf(1,0), -1, '[ ].indexOf(1,0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js index 830644b180..2f4e08177e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-1.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.14-8-1 description: Array.prototype.indexOf with negative fromIndex -includes: [runTestCase.js] ---*/ -function testcase() { var a = new Array(1,2,3); - if (a.indexOf(2,-1) === -1 && - a.indexOf(2,-2) === 1 && - a.indexOf(1,-3) === 0 && - a.indexOf(1,-5.3) === 0 ) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.indexOf(2,-1), -1, 'a.indexOf(2,-1)'); +assert.sameValue(a.indexOf(2,-2), 1, 'a.indexOf(2,-2)'); +assert.sameValue(a.indexOf(1,-3), 0, 'a.indexOf(1,-3)'); +assert.sameValue(a.indexOf(1,-5.3), 0, 'a.indexOf(1,-5.3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js index 0606e2b0c5..8e0e324180 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-11 description: > Array.prototype.indexOf - the length of iteration isn't changed by adding elements to the array during iteration -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [20]; Object.defineProperty(arr, "0", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return arr.indexOf(1) === -1; - } -runTestCase(testcase); +assert.sameValue(arr.indexOf(1), -1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js index cf570d4469..7f732b5673 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-7.js @@ -4,16 +4,10 @@ /*--- es5id: 15.4.4.14-9-7 description: Array.prototype.indexOf must return correct index (self reference) -includes: [runTestCase.js] ---*/ -function testcase() { var a = new Array(0,1,2,3); a[2] = a; - if (a.indexOf(a) === 2 && - a.indexOf(3) === 3 ) - { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.indexOf(a), 2, 'a.indexOf(a)'); +assert.sameValue(a.indexOf(3), 3, 'a.indexOf(3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js index c35e786e61..719cbe594c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-8.js @@ -4,16 +4,10 @@ /*--- es5id: 15.4.4.14-9-8 description: Array.prototype.indexOf must return correct index (Array) -includes: [runTestCase.js] ---*/ -function testcase() { var b = new Array("0,1"); var a = new Array(0,b,"0,1",3); - if (a.indexOf(b.toString()) === 2 && - a.indexOf("0,1") === 2 ) - { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.indexOf(b.toString()), 2, 'a.indexOf(b.toString())'); +assert.sameValue(a.indexOf("0,1"), 2, 'a.indexOf("0,1")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js index 18d381fc9e..276bedd896 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-9.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.14-9-9 description: Array.prototype.indexOf must return correct index (Sparse Array) -includes: [runTestCase.js] ---*/ -function testcase() { var a = new Array(0,1); a[4294967294] = 2; // 2^32-2 - is max array element a[4294967295] = 3; // 2^32-1 added as non-array element property @@ -15,9 +13,8 @@ function testcase() { a[4294967297] = 5; // 2^32+1 added as non-array element property // start searching near the end so in case implementation actually tries to test all missing elements!! - return (a.indexOf(2,4294967290 ) === 4294967294 && - a.indexOf(3,4294967290) === -1 && - a.indexOf(4,4294967290) === -1 && - a.indexOf(5,4294967290) === -1 ) ; - } -runTestCase(testcase); + +assert.sameValue(a.indexOf(2,4294967290 ), 4294967294, 'a.indexOf(2,4294967290 )'); +assert.sameValue(a.indexOf(3,4294967290), -1, 'a.indexOf(3,4294967290)'); +assert.sameValue(a.indexOf(4,4294967290), -1, 'a.indexOf(4,4294967290)'); +assert.sameValue(a.indexOf(5,4294967290), -1, 'a.indexOf(5,4294967290)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js index 8e49bb75c3..f39e91fcd6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-1 description: > Array.prototype.indexOf - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { }; Object.defineProperty(arr, "length", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return 2 === Array.prototype.indexOf.call(arr, "length"); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(arr, "length"), 2, 'Array.prototype.indexOf.call(arr, "length")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js index a3b208832a..eb7d14b7b1 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-11 description: > Array.prototype.indexOf - deleting own property causes index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { length: 2 }; Object.defineProperty(arr, "1", { @@ -28,6 +25,4 @@ function testcase() { configurable: true }); - return -1 === Array.prototype.indexOf.call(arr, 6.99); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(arr, 6.99), -1, 'Array.prototype.indexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js index 2f9ebae04e..b0cae059a9 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-12 description: > Array.prototype.indexOf - deleting own property causes index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [1, 2]; Object.defineProperty(arr, "1", { @@ -28,6 +25,4 @@ function testcase() { configurable: true }); - return -1 === arr.indexOf("6.99"); - } -runTestCase(testcase); +assert.sameValue(arr.indexOf("6.99"), -1, 'arr.indexOf("6.99")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js index d676d63727..1451a026ba 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-17 description: > Array.prototype.indexOf - decreasing length of array causes index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, "last"]; Object.defineProperty(arr, "0", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return -1 === arr.indexOf("last"); - } -runTestCase(testcase); +assert.sameValue(arr.indexOf("last"), -1, 'arr.indexOf("last")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js index ef6d037a15..bc5ed33aae 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-19.js @@ -7,11 +7,8 @@ description: > Array.prototype.indexOf - decreasing length of array does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2]; Object.defineProperty(arr, "2", { @@ -29,6 +26,5 @@ function testcase() { configurable: true }); - return 2 === arr.indexOf("unconfigurable"); - } -runTestCase(testcase); + +assert.sameValue(arr.indexOf("unconfigurable"), 2, 'arr.indexOf("unconfigurable")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js index 51170421e9..4fd6fed9b3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-2 description: > Array.prototype.indexOf - added properties in step 5 are visible here on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { length: 30 }; var targetObj = function () { }; @@ -21,6 +18,5 @@ function testcase() { } }; - return 4 === Array.prototype.indexOf.call(arr, targetObj, fromIndex); - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.indexOf.call(arr, targetObj, fromIndex), 4, 'Array.prototype.indexOf.call(arr, targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js index 5a7e0eb61c..942ea64942 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-3 description: > Array.prototype.indexOf - added properties in step 5 are visible here on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = []; arr.length = 30; var targetObj = function () { }; @@ -22,6 +19,4 @@ function testcase() { } }; - return 4 === arr.indexOf(targetObj, fromIndex); - } -runTestCase(testcase); +assert.sameValue(arr.indexOf(targetObj, fromIndex), 4, 'arr.indexOf(targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js index 88b8c81a01..66145acd61 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-4 description: > Array.prototype.indexOf - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { 2: 6.99 }; Object.defineProperty(arr, "length", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return -1 === Array.prototype.indexOf.call(arr, 6.99); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(arr, 6.99), -1, 'Array.prototype.indexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js index 7589a50695..f213b2245a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-5 description: > Array.prototype.indexOf - deleted properties in step 5 are visible here on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { 10: false, length: 30 }; var fromIndex = { @@ -20,6 +17,4 @@ function testcase() { } }; - return -1 === Array.prototype.indexOf.call(arr, false, fromIndex); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(arr, false, fromIndex), -1, 'Array.prototype.indexOf.call(arr, false, fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js index 1d5715b2be..545e69ff3a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-6 description: > Array.prototype.indexOf - deleted properties in step 5 are visible here on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = []; arr[10] = "10"; arr.length = 20; @@ -22,6 +19,4 @@ function testcase() { } }; - return -1 === arr.indexOf("10", fromIndex); - } -runTestCase(testcase); +assert.sameValue(arr.indexOf("10", fromIndex), -1, 'arr.indexOf("10", fromIndex)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js index a58f13b5c3..d55c36de69 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-7 description: > Array.prototype.indexOf - properties added into own object after current position are visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { length: 2 }; Object.defineProperty(arr, "0", { @@ -26,6 +23,4 @@ function testcase() { configurable: true }); - return Array.prototype.indexOf.call(arr, 1) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(arr, 1), 1, 'Array.prototype.indexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js index 7333bb2d37..a4bff7b94c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-a-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-a-8 description: > Array.prototype.indexOf - properties added into own object after current position are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, , 2]; Object.defineProperty(arr, "0", { @@ -26,6 +23,4 @@ function testcase() { configurable: true }); - return arr.indexOf(1) === 1; - } -runTestCase(testcase); +assert.sameValue(arr.indexOf(1), 1, 'arr.indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js index 286215eaf9..e857ce6dcb 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-1.js @@ -6,13 +6,10 @@ es5id: 15.4.4.14-9-b-i-1 description: > Array.prototype.indexOf - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var obj = { 0: 0, 1: 1, 2: 2, length: 3 }; - return Array.prototype.indexOf.call(obj, 0) === 0 && - Array.prototype.indexOf.call(obj, 1) === 1 && - Array.prototype.indexOf.call(obj, 2) === 2; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); +assert.sameValue(Array.prototype.indexOf.call(obj, 1), 1, 'Array.prototype.indexOf.call(obj, 1)'); +assert.sameValue(Array.prototype.indexOf.call(obj, 2), 2, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js index 44326fee24..00f007383e 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-b-i-10 description: > Array.prototype.indexOf - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { length: 3 }; Object.defineProperty(obj, "0", { get: function () { @@ -33,8 +30,6 @@ function testcase() { configurable: true }); - return 0 === Array.prototype.indexOf.call(obj, 0) && - 1 === Array.prototype.indexOf.call(obj, 1) && - 2 === Array.prototype.indexOf.call(obj, 2); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, 0), 0, 'Array.prototype.indexOf.call(obj, 0)'); +assert.sameValue(Array.prototype.indexOf.call(obj, 1), 1, 'Array.prototype.indexOf.call(obj, 1)'); +assert.sameValue(Array.prototype.indexOf.call(obj, 2), 2, 'Array.prototype.indexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js index b07867069d..eb16f6e608 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-17.js @@ -6,17 +6,12 @@ es5id: 15.4.4.14-9-b-i-17 description: > Array.prototype.indexOf - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = []; Object.defineProperty(arr, "0", { set: function () { }, configurable: true }); - return arr.indexOf(undefined) === 0; - } -runTestCase(testcase); +assert.sameValue(arr.indexOf(undefined), 0, 'arr.indexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js index ac2fb8d40c..653a7ac03a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-18.js @@ -6,17 +6,12 @@ es5id: 15.4.4.14-9-b-i-18 description: > Array.prototype.indexOf - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { length: 1 }; Object.defineProperty(obj, "0", { set: function () { }, configurable: true }); - return 0 === Array.prototype.indexOf.call(obj, undefined); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, undefined), 0, 'Array.prototype.indexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js index 822b880c15..8183d3539b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-20.js @@ -7,11 +7,8 @@ description: > Array.prototype.indexOf - 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() { - var proto = {}; Object.defineProperty(proto, "0", { get: function () { @@ -31,6 +28,4 @@ function testcase() { configurable: true }); - return Array.prototype.indexOf.call(child, undefined) === 0; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(child, undefined), 0, 'Array.prototype.indexOf.call(child, undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js index bdb0342ee7..686925477d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-25.js @@ -7,16 +7,11 @@ description: > Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var func = function (a, b) { return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && -1 === Array.prototype.indexOf.call(arguments, arguments[1]); }; - return func(true); - } -runTestCase(testcase); +assert(func(true), 'func(true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js index eff7d2a6e8..aa9c8e3f5d 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-26.js @@ -7,17 +7,12 @@ description: > Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments equals to number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var func = function (a, b) { return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && 1 === Array.prototype.indexOf.call(arguments, arguments[1]) && -1 === Array.prototype.indexOf.call(arguments, arguments[2]); }; - return func(0, true); - } -runTestCase(testcase); +assert(func(0, true), 'func(0, true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js index 44f3c29375..b304db2a73 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-27.js @@ -7,17 +7,12 @@ description: > Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var func = function (a, b) { return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) && 3 === Array.prototype.indexOf.call(arguments, arguments[3]) && -1 === Array.prototype.indexOf.call(arguments, arguments[4]); }; - return func(0, false, 0, true); - } -runTestCase(testcase); +assert(func(0, false, 0, true), 'func(0, false, 0, true) !== true'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js index 6d2470aa91..1c2415e1eb 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-b-i-28 description: > Array.prototype.indexOf - side-effects are visible in subsequent iterations on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var arr = []; @@ -33,6 +30,4 @@ function testcase() { configurable: true }); - return arr.indexOf(true) === 1; - } -runTestCase(testcase); +assert.sameValue(arr.indexOf(true), 1, 'arr.indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js index ecaaaca523..b5ef9b0e51 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-b-i-29 description: > Array.prototype.indexOf - side-effects are visible in subsequent iterations on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var obj = { length: 2 }; @@ -33,6 +30,4 @@ function testcase() { configurable: true }); - return Array.prototype.indexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call(obj, true), 1, 'Array.prototype.indexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js index 1466083190..6b1a70b5c2 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.14-9-b-i-9 description: > Array.prototype.indexOf - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [, , , ]; Object.defineProperty(arr, "0", { get: function () { @@ -33,6 +30,6 @@ function testcase() { configurable: true }); - return arr.indexOf(0) === 0 && arr.indexOf(1) === 1 && arr.indexOf(2) === 2; - } -runTestCase(testcase); +assert.sameValue(arr.indexOf(0), 0, 'arr.indexOf(0)'); +assert.sameValue(arr.indexOf(1), 1, 'arr.indexOf(1)'); +assert.sameValue(arr.indexOf(2), 2, 'arr.indexOf(2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js index a6d1a9b5bd..18042eb42f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.14-9-b-iii-2 description: > Array.prototype.indexOf - returns without visiting subsequent element once search value is found -includes: [runTestCase.js] ---*/ -function testcase() { var arr = [1, 2, , 1, 2]; var elementThirdAccessed = false; var elementFifthAccessed = false; @@ -30,6 +28,6 @@ function testcase() { }); arr.indexOf(2); - return !elementThirdAccessed && !elementFifthAccessed; - } -runTestCase(testcase); + +assert.sameValue(elementThirdAccessed, false, 'elementThirdAccessed'); +assert.sameValue(elementFifthAccessed, false, 'elementFifthAccessed'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-0-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-0-1.js index 0fdbe89500..2ab710995f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-0-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.15-0-1 description: Array.prototype.lastIndexOf must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.lastIndexOf; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-0-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-0-2.js index de1db48d15..3cda6dac6a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-0-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.15-0-2 description: Array.prototype.lastIndexOf has a length property whose value is 1. -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.lastIndexOf.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.length, 1, 'Array.prototype.lastIndexOf.length'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-11.js index 2c4b696d3c..c8d087596e 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-11.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.15-1-11 description: Array.prototype.lastIndexOf applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Date(); obj.length = 2; obj[1] = true; - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-12.js index 36c1383e6c..5047d5fd0d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-12.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.15-1-12 description: Array.prototype.lastIndexOf applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new RegExp("afdasf"); obj.length = 100; obj[1] = "afdasf"; - return Array.prototype.lastIndexOf.call(obj, "afdasf") === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, "afdasf"), 1, 'Array.prototype.lastIndexOf.call(obj, "afdasf")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-14.js index e7f60ebe67..cc0ca6c7c4 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-14.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-14.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.15-1-14 description: Array.prototype.lastIndexOf applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new SyntaxError(); obj.length = 2; obj[1] = Infinity; - return Array.prototype.lastIndexOf.call(obj, Infinity) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, Infinity), 1, 'Array.prototype.lastIndexOf.call(obj, Infinity)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-15.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-15.js index 3d6f5ab4b1..8ea1456bbd 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-15.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-15.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.15-1-15 description: Array.prototype.lastIndexOf applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = (function fun() { return arguments; }(1, 2, 3)); - return Array.prototype.lastIndexOf.call(obj, 2) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), 1, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-4.js index 9e1bd0f062..ae93a2bb42 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-4.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.15-1-4 description: Array.prototype.lastIndexOf applied to Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Boolean(false); obj.length = 2; obj[1] = true; - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-6.js index ea9a30d2ee..e7b7d2a3d5 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-6.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.15-1-6 description: Array.prototype.lastIndexOf applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Number(-3); obj.length = 2; obj[1] = true; - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js index 558fdb375d..f91c8cf876 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-8.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.15-1-8 description: Array.prototype.lastIndexOf applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new String("undefined"); - return Array.prototype.lastIndexOf.call(obj, "f") === 4; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, "f"), 4, 'Array.prototype.lastIndexOf.call(obj, "f")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-9.js index f36ce31b0c..c50766f0eb 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-9.js @@ -4,16 +4,11 @@ /*--- es5id: 15.4.4.15-1-9 description: Array.prototype.lastIndexOf applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = function (a, b) { return a + b; }; obj[1] = true; - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-1.js index cde991369b..f7add9e98b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-1.js @@ -6,13 +6,9 @@ es5id: 15.4.4.15-2-1 description: > Array.prototype.lastIndexOf - 'length' is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var obj = { 1: null, 2: undefined, length: 2 }; - return Array.prototype.lastIndexOf.call(obj, null) === 1 && - Array.prototype.lastIndexOf.call(obj, undefined) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, null), 1, 'Array.prototype.lastIndexOf.call(obj, null)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, undefined), -1, 'Array.prototype.lastIndexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-10.js index ec8c487dc3..4666c52eb7 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-2-10 description: > Array.prototype.lastIndexOf - 'length' is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = {}; Object.defineProperty(proto, "length", { get: function () { @@ -26,7 +23,5 @@ function testcase() { child[1] = 1; child[2] = 2; - return Array.prototype.lastIndexOf.call(child, 1) === 1 && - Array.prototype.lastIndexOf.call(child, 2) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(child, 1), 1, 'Array.prototype.lastIndexOf.call(child, 1)'); +assert.sameValue(Array.prototype.lastIndexOf.call(child, 2), -1, 'Array.prototype.lastIndexOf.call(child, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-11.js index 1e1ba93358..55db980940 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-11.js @@ -6,17 +6,12 @@ es5id: 15.4.4.15-2-11 description: > Array.prototype.lastIndexOf - 'length' is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 1 }; Object.defineProperty(obj, "length", { set: function () { }, configurable: true }); - return Array.prototype.lastIndexOf.call(obj, 1) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), -1, 'Array.prototype.lastIndexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-13.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-13.js index baaee5fb43..d3d019c2b3 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-13.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-2-13 description: > Array.prototype.lastIndexOf - 'length' is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = {}; Object.defineProperty(proto, "length", { set: function () { }, @@ -23,6 +20,4 @@ function testcase() { var child = new Con(); child[0] = true; - return Array.prototype.lastIndexOf.call(child, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(child, true), -1, 'Array.prototype.lastIndexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-14.js index 52355805ba..8a4b1321eb 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-14.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-14.js @@ -6,13 +6,8 @@ es5id: 15.4.4.15-2-14 description: > Array.prototype.lastIndexOf - 'length' is undefined property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: null, 1: undefined }; - return Array.prototype.lastIndexOf.call(obj, null) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, null), -1, 'Array.prototype.lastIndexOf.call(obj, null)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-17.js index fce78d55c6..759a0b87b6 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-17.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-2-17 description: > Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var targetObj = function () { }; var func = function (a, b) { arguments[2] = function () { }; @@ -18,6 +15,4 @@ function testcase() { Array.prototype.lastIndexOf.call(arguments, arguments[2]) === -1; }; - return func(0, targetObj); - } -runTestCase(testcase); +assert(func(0, targetObj), 'func(0, targetObj) !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-19.js index 7dceed03e8..e34648908b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-19.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-19.js @@ -6,18 +6,13 @@ es5id: 15.4.4.15-2-19 description: > Array.prototype.lastIndexOf applied to String object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = function (a, b) { return a + b; }; obj[1] = "b"; obj[2] = "c"; - return Array.prototype.lastIndexOf.call(obj, obj[1]) === 1 && - Array.prototype.lastIndexOf.call(obj, obj[2]) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, obj[1]), 1, 'Array.prototype.lastIndexOf.call(obj, obj[1])'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, obj[2]), -1, 'Array.prototype.lastIndexOf.call(obj, obj[2])'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-3.js index 4ad48bbf23..a89823fe84 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-2-3 description: > Array.prototype.lastIndexOf - 'length' is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = {length: 0}; var Con = function () {}; @@ -20,6 +17,4 @@ function testcase() { child.length = 2; child[1] = child; - return Array.prototype.lastIndexOf.call(child, child) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(child, child), 1, 'Array.prototype.lastIndexOf.call(child, child)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-5.js index 3f6fe30d80..ec65672e09 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.15-2-5 description: > Array.prototype.lastIndexOf - 'length' is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var proto = {}; Object.defineProperty(proto, "length", { get: function () { @@ -29,6 +27,4 @@ function testcase() { }); child[1] = null; - return Array.prototype.lastIndexOf.call(child, null) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(child, null), 1, 'Array.prototype.lastIndexOf.call(child, null)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-6.js index 1299841e4a..b62956bda8 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-2-6 description: > Array.prototype.lastIndexOf - 'length' is an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = { length: 2 }; var Con = function () {}; @@ -20,7 +17,5 @@ function testcase() { child[1] = "x"; child[2] = "y"; - return Array.prototype.lastIndexOf.call(child, "x") === 1 && - Array.prototype.lastIndexOf.call(child, "y") === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(child, "x"), 1, 'Array.prototype.lastIndexOf.call(child, "x")'); +assert.sameValue(Array.prototype.lastIndexOf.call(child, "y"), -1, 'Array.prototype.lastIndexOf.call(child, "y")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-7.js index 8024d8db03..ae42d88b7b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-2-7 description: > Array.prototype.lastIndexOf - 'length' is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: true, 2: false }; Object.defineProperty(obj, "length", { @@ -20,7 +17,5 @@ function testcase() { configurable: true }); - return Array.prototype.lastIndexOf.call(obj, true) === 1 && - Array.prototype.lastIndexOf.call(obj, false) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, false), -1, 'Array.prototype.lastIndexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-8.js index 13a925e6a9..034d6e82d7 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-2-8 description: > Array.prototype.lastIndexOf - 'length' is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var proto = { length: 0 }; var Con = function () {}; @@ -26,6 +23,4 @@ function testcase() { configurable: true }); - return Array.prototype.lastIndexOf.call(child, eval) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(child, eval), 1, 'Array.prototype.lastIndexOf.call(child, eval)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-9.js index ea1998bb99..0532ead5fc 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-2-9.js @@ -7,10 +7,8 @@ description: > Array.prototype.lastIndexOf - 'length' is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var proto = {}; Object.defineProperty(proto, "length", { get: function () { @@ -32,6 +30,4 @@ function testcase() { configurable: true }); - return Array.prototype.lastIndexOf.call(child, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(child, true), 1, 'Array.prototype.lastIndexOf.call(child, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-1.js index 92063ff838..50942bbe45 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.15-3-1 description: Array.prototype.lastIndexOf - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 1, 1: 1, length: undefined }; - return Array.prototype.lastIndexOf.call(obj, 1) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), -1, 'Array.prototype.lastIndexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-10.js index 523b79577e..f07ce995f5 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-10.js @@ -6,13 +6,8 @@ es5id: 15.4.4.15-3-10 description: > Array.prototype.lastIndexOf - value of 'length' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 0, length: NaN }; - return Array.prototype.lastIndexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), -1, 'Array.prototype.lastIndexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-11.js index 5c8648f770..1a7360b2b9 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-11.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-11 description: > Array.prototype.lastIndexOf - value of 'length' is a string containing positive number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = {1: true, 2: false, length: "2"}; - return Array.prototype.lastIndexOf.call(obj, true) === 1 && - Array.prototype.lastIndexOf.call(obj, false) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, false), -1, 'Array.prototype.lastIndexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js index 1288d30243..f48622efef 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-12.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-12 description: > Array.prototype.lastIndexOf - value of 'length' is a string containing negative number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = {1: null, 2: undefined, length: "-4294967294"}; - return Array.prototype.lastIndexOf.call(obj, null) === -1 && - Array.prototype.lastIndexOf.call(obj, undefined) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, null), -1, 'Array.prototype.lastIndexOf.call(obj, null)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, undefined), -1, 'Array.prototype.lastIndexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js index 13902394b6..038bb63eda 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-13.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-13 description: > Array.prototype.lastIndexOf - value of 'length' is a string containing a decimal number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 4: 4, 5: 5, length: "5.512345" }; - return Array.prototype.lastIndexOf.call(obj, 4) === 4 && - Array.prototype.lastIndexOf.call(obj, 5) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 4), 4, 'Array.prototype.lastIndexOf.call(obj, 4)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 5), -1, 'Array.prototype.lastIndexOf.call(obj, 5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-14.js index 316aa3844e..3eb3a8c25d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-14.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-14.js @@ -6,13 +6,8 @@ es5id: 15.4.4.15-3-14 description: > Array.prototype.lastIndexOf - value of 'length' is a string containing -Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - var objThree = { 0: true, 1: true, length: "-Infinity" }; - return Array.prototype.lastIndexOf.call(objThree, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(objThree, true), -1, 'Array.prototype.lastIndexOf.call(objThree, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-15.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-15.js index d1021b5c96..e067aeac52 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-15.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-15.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-15 description: > Array.prototype.lastIndexOf - value of 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = {229: 229, 230: 2.3E2, length: "2.3E2"}; - return Array.prototype.lastIndexOf.call(obj, 229) === 229 && - Array.prototype.lastIndexOf.call(obj, 2.3E2) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 229), 229, 'Array.prototype.lastIndexOf.call(obj, 229)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2.3E2), -1, 'Array.prototype.lastIndexOf.call(obj, 2.3E2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-16.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-16.js index af3b8fab2e..334004e207 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-16.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-16.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-16 description: > Array.prototype.lastIndexOf - value of 'length' is a string which is able to be converted into hex number -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 2573: 2573, 2574: 0x000A0E, length: "0x000A0E" }; - return Array.prototype.lastIndexOf.call(obj, 2573) === 2573 && - Array.prototype.lastIndexOf.call(obj, 0x000A0E) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2573), 2573, 'Array.prototype.lastIndexOf.call(obj, 2573)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0x000A0E), -1, 'Array.prototype.lastIndexOf.call(obj, 0x000A0E)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-17.js index f4957e7a21..3c855c3a1d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-17.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-17.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-17 description: > Array.prototype.lastIndexOf - value of 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: 1, 2: 2, length: "0002.0" }; - return Array.prototype.lastIndexOf.call(obj, 1) === 1 && - Array.prototype.lastIndexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), 1, 'Array.prototype.lastIndexOf.call(obj, 1)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), -1, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-18.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-18.js index 64805a4425..bdec51c07d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-18.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-18.js @@ -6,13 +6,9 @@ es5id: 15.4.4.15-3-18 description: > Array.prototype.lastIndexOf - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = new String("123abc123"); var obj = { 0: targetObj, length: "123abc123" }; - return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), -1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js index ade1804a98..9999575a4f 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-19.js @@ -6,13 +6,9 @@ es5id: 15.4.4.15-3-19 description: > Array.prototype.lastIndexOf - value of 'length' is an Object which has an own toString method -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - // objects inherit the default valueOf() method from Object // that simply returns itself. Since the default valueOf() method // does not return a primitive value, ES next tries to convert the object @@ -31,7 +27,5 @@ function testcase() { } }; - return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 && - Array.prototype.lastIndexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), 1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), -1, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-2.js index 20644243b5..06e7cefa39 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-2.js @@ -6,12 +6,9 @@ es5id: 15.4.4.15-3-2 description: > Array.prototype.lastIndexOf return -1 when value of 'length' is a boolean (value is true) -includes: [runTestCase.js] ---*/ -function testcase() { var obj = { 0: 0, 1: 1, length: true }; - return Array.prototype.lastIndexOf.call(obj, 0) === 0 && - Array.prototype.lastIndexOf.call(obj, 1) === -1; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), 0, 'Array.prototype.lastIndexOf.call(obj, 0)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), -1, 'Array.prototype.lastIndexOf.call(obj, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-20.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-20.js index ab523b94c3..7f8ef955f4 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-20.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-3-20 description: > Array.prototype.lastIndexOf - value of 'length' is an Object which has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { - //valueOf method will be invoked first, since hint is Number var obj = { 1: true, @@ -23,7 +20,5 @@ function testcase() { } }; - return Array.prototype.lastIndexOf.call(obj, true) === 1 && - Array.prototype.lastIndexOf.call(obj, 2) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), -1, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-21.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-21.js index 74e6ff5219..62cf4d1255 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-21.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-21.js @@ -7,11 +7,8 @@ description: > Array.prototype.lastIndexOf - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - var toStringAccessed = false; var valueOfAccessed = false; @@ -31,6 +28,6 @@ function testcase() { } }; - return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 && toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), 1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); +assert(toStringAccessed, 'toStringAccessed !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-23.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-23.js index ffb3721cf3..5a768ba622 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-23.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-23.js @@ -7,11 +7,8 @@ description: > Array.prototype.lastIndexOf uses inherited valueOf method when 'length' is an object with an own toString and an inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - var toStringAccessed = false; var valueOfAccessed = false; @@ -36,6 +33,6 @@ function testcase() { length: child }; - return Array.prototype.lastIndexOf.call(obj, child) === 1 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, child), 1, 'Array.prototype.lastIndexOf.call(obj, child)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-24.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-24.js index b0e5d4b2fd..7be5d3ae1d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-24.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-24.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-24 description: > Array.prototype.lastIndexOf - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 122: true, 123: false, length: 123.5 }; - return Array.prototype.lastIndexOf.call(obj, true) === 122 && - Array.prototype.lastIndexOf.call(obj, false) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 122, 'Array.prototype.lastIndexOf.call(obj, true)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, false), -1, 'Array.prototype.lastIndexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js index 3334882165..e7b10e7263 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-25.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-25 description: > Array.prototype.lastIndexOf - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: true, 2: false, length: -4294967294.5 }; - return Array.prototype.lastIndexOf.call(obj, true) === -1 && - Array.prototype.lastIndexOf.call(obj, false) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), -1, 'Array.prototype.lastIndexOf.call(obj, true)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, false), -1, 'Array.prototype.lastIndexOf.call(obj, false)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-3.js index de8c910483..008b7f7727 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-3.js @@ -6,13 +6,8 @@ es5id: 15.4.4.15-3-3 description: > Array.prototype.lastIndexOf - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: "undefined", length: 0 }; - return Array.prototype.lastIndexOf.call(obj, "undefined") === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, "undefined"), -1, 'Array.prototype.lastIndexOf.call(obj, "undefined")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-4.js index 066e9be973..e40befa623 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-4.js @@ -6,13 +6,8 @@ es5id: 15.4.4.15-3-4 description: > Array.prototype.lastIndexOf - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: true, length: -0 }; - return Array.prototype.lastIndexOf.call(obj, true) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), -1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-5.js index 2d493e086b..d5ca9992fe 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-5.js @@ -6,13 +6,8 @@ es5id: 15.4.4.15-3-5 description: > Array.prototype.lastIndexOf - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: +0, length: +0 }; - return Array.prototype.lastIndexOf.call(obj, +0) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, +0), -1, 'Array.prototype.lastIndexOf.call(obj, +0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-6.js index 1bc97cbb8b..915fa20021 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-6.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-6 description: > Array.prototype.lastIndexOf - value of 'length' is a number (value is a positive number) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 99: true, 100: 100, length: 100 }; - return Array.prototype.lastIndexOf.call(obj, true) === 99 && - Array.prototype.lastIndexOf.call(obj, 100) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 99, 'Array.prototype.lastIndexOf.call(obj, true)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 100), -1, 'Array.prototype.lastIndexOf.call(obj, 100)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js index b78b385d77..e82434d410 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-7.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-3-7 description: > Array.prototype.lastIndexOf - value of 'length' is a number (value is a negative number) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 4: -Infinity, 5: Infinity, length: 5 - Math.pow(2, 32) }; - return Array.prototype.lastIndexOf.call(obj, -Infinity) === -1 && - Array.prototype.lastIndexOf.call(obj, Infinity) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, -Infinity), -1, 'Array.prototype.lastIndexOf.call(obj, -Infinity)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, Infinity), -1, 'Array.prototype.lastIndexOf.call(obj, Infinity)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js index 3dd1c28950..b0af5fb9e8 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-3-9.js @@ -6,13 +6,8 @@ es5id: 15.4.4.15-3-9 description: > Array.prototype.lastIndexOf - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 0, length: -Infinity }; - return Array.prototype.lastIndexOf.call(obj, 0) === -1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), -1, 'Array.prototype.lastIndexOf.call(obj, 0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-1.js index dcf7a58f0b..4095313c80 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-1.js @@ -6,13 +6,8 @@ es5id: 15.4.4.15-4-1 description: > Array.prototype.lastIndexOf returns -1 if 'length' is 0 (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { var i = [].lastIndexOf(42); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-10.js index 82d5899218..d2dc602e35 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-10.js @@ -4,12 +4,9 @@ /*--- es5id: 15.4.4.15-4-10 description: Array.prototype.lastIndexOf - 'length' is a number of value -6e-1 -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = []; var obj = { 0: targetObj, 100: targetObj, length: -6e-1 }; - return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), -1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-11.js index 094aac5d6f..db08a1bdf0 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-11.js @@ -4,12 +4,9 @@ /*--- es5id: 15.4.4.15-4-11 description: Array.prototype.lastIndexOf - 'length' is an empty string -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = []; var obj = { 0: targetObj, 100: targetObj, length: "" }; - return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), -1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-2.js index d8ffff3cab..e0b02ffa77 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-2.js @@ -6,15 +6,9 @@ es5id: 15.4.4.15-4-2 description: > Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length overridden to null (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var i = Array.prototype.lastIndexOf.call({length: null}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-3.js index ef750bd33c..144e49533b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-3.js @@ -6,15 +6,9 @@ es5id: 15.4.4.15-4-3 description: > Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length overridden to false (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var i = Array.prototype.lastIndexOf.call({length: false}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-4.js index ff33065476..41da0f5a07 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.15-4-4 description: > Array.prototype.lastIndexOf returns -1 if 'length' is 0 (generic 'array' with length 0 ) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -17,8 +15,5 @@ function testcase() { var i = Array.prototype.lastIndexOf.call({length: 0}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-5.js index ed91858c43..36d926ba6a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-5.js @@ -6,15 +6,9 @@ es5id: 15.4.4.15-4-5 description: > Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length overridden to '0' (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var i = Array.prototype.lastIndexOf.call({length: '0'}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-6.js index e0c041282c..14e452b50a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-6.js @@ -6,15 +6,9 @@ es5id: 15.4.4.15-4-6 description: > Array.prototype.lastIndexOf returns -1 if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) -includes: [runTestCase.js] ---*/ -function testcase() { - var i = Array.prototype.lastIndexOf.call({length: { valueOf: function () { return 0;}}}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-7.js index 7e18aa2727..0d719af97b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.15-4-7 description: > Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length is object overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -24,8 +22,5 @@ function testcase() { // resulting string to a number. var i = Array.prototype.lastIndexOf.call({length: { toString: function () { return '0';}}}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-8.js index b8f48409a7..1fffacd0fa 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-8.js @@ -6,12 +6,8 @@ es5id: 15.4.4.15-4-8 description: > Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length is an empty array) -includes: [runTestCase.js] ---*/ -function testcase() { - - // objects inherit the default valueOf method of the Object object; // that simply returns the itself. Since the default valueOf() method // does not return a primitive value, ES next tries to convert the object @@ -27,8 +23,5 @@ function testcase() { // or if its one element is not a number, the array converts to NaN. var i = Array.prototype.lastIndexOf.call({length: [ ]}, 1); - if (i === -1) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-9.js index 9b2d972ca1..62e4e34c7b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-4-9.js @@ -4,12 +4,9 @@ /*--- es5id: 15.4.4.15-4-9 description: Array.prototype.lastIndexOf - 'length' is a number of value 0.1 -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = []; var obj = { 0: targetObj, 100: targetObj, length: 0.1 }; - return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.lastIndexOf.call(obj, targetObj), -1, 'Array.prototype.lastIndexOf.call(obj, targetObj)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-10.js index 951360afe4..417a0365b2 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-10.js @@ -6,12 +6,9 @@ es5id: 15.4.4.15-5-10 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is positive number) -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 && - [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1; - } -runTestCase(testcase); + +assert.sameValue([0, targetObj, true].lastIndexOf(targetObj, 1.5), 1, '[0, targetObj, true].lastIndexOf(targetObj, 1.5)'); +assert.sameValue([0, true, targetObj].lastIndexOf(targetObj, 1.5), -1, '[0, true, targetObj].lastIndexOf(targetObj, 1.5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-11.js index d1bc4a0654..df9d705d64 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-11.js @@ -6,12 +6,9 @@ es5id: 15.4.4.15-5-11 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is negative number) -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 && - [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1; - } -runTestCase(testcase); + +assert.sameValue([0, targetObj, true].lastIndexOf(targetObj, -2.5), 1, '[0, targetObj, true].lastIndexOf(targetObj, -2.5)'); +assert.sameValue([0, true, targetObj].lastIndexOf(targetObj, -2.5), -1, '[0, true, targetObj].lastIndexOf(targetObj, -2.5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-12.js index 9e713cc1d2..64fac83f29 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-12.js @@ -6,12 +6,9 @@ es5id: 15.4.4.15-5-12 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { var arr = []; arr[Math.pow(2, 32) - 2] = null; // length is the max value of Uint type - return arr.lastIndexOf(null, Infinity) === (Math.pow(2, 32) - 2); - } -runTestCase(testcase); + +assert.sameValue(arr.lastIndexOf(null, Infinity), Math.pow(2, 32) - 2, 'arr.lastIndexOf(null, Infinity)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-16.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-16.js index dd885431a7..65c32cf5c5 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-16.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-16.js @@ -6,12 +6,9 @@ es5id: 15.4.4.15-5-16 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing Infinity -includes: [runTestCase.js] ---*/ -function testcase() { var arr = []; arr[Math.pow(2, 32) - 2] = true; // length is the max value of Uint type - return arr.lastIndexOf(true, "Infinity") === (Math.pow(2, 32) - 2); - } -runTestCase(testcase); + +assert.sameValue(arr.lastIndexOf(true, "Infinity"), Math.pow(2, 32) - 2, 'arr.lastIndexOf(true, "Infinity")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-18.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-18.js index e4c315c211..67cb3acf27 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-18.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-18.js @@ -6,12 +6,9 @@ es5id: 15.4.4.15-5-18 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0") === 2 && - [0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0") === -1; - } -runTestCase(testcase); + +assert.sameValue([0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0"), 2, '[0, NaN, targetObj, 3, false].lastIndexOf(targetObj, "2E0")'); +assert.sameValue([0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0"), -1, '[0, NaN, 3, targetObj, false].lastIndexOf(targetObj, "2E0")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-19.js index 4d731b69e7..20e8ae5235 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-19.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-19.js @@ -6,12 +6,9 @@ es5id: 15.4.4.15-5-19 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, true, targetObj, 3, false].lastIndexOf(targetObj, "0x0002") === 2 && - [0, true, 3, targetObj, false].lastIndexOf(targetObj, "0x0002") === -1; - } -runTestCase(testcase); + +assert.sameValue([0, true, targetObj, 3, false].lastIndexOf(targetObj, "0x0002"), 2, '[0, true, targetObj, 3, false].lastIndexOf(targetObj, "0x0002")'); +assert.sameValue([0, true, 3, targetObj, false].lastIndexOf(targetObj, "0x0002"), -1, '[0, true, 3, targetObj, false].lastIndexOf(targetObj, "0x0002")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-20.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-20.js index b1bd4d7d74..fa30923734 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-20.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-20.js @@ -6,12 +6,9 @@ es5id: 15.4.4.15-5-20 description: > Array.prototype.lastIndexOf - value of 'fromIndex' which is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, true, targetObj, 3, false].lastIndexOf(targetObj, "0002.10") === 2 && - [0, true, 3, targetObj, false].lastIndexOf(targetObj, "0002.10") === -1; - } -runTestCase(testcase); + +assert.sameValue([0, true, targetObj, 3, false].lastIndexOf(targetObj, "0002.10"), 2, '[0, true, targetObj, 3, false].lastIndexOf(targetObj, "0002.10")'); +assert.sameValue([0, true, 3, targetObj, false].lastIndexOf(targetObj, "0002.10"), -1, '[0, true, 3, targetObj, false].lastIndexOf(targetObj, "0002.10")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-21.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-21.js index 29efc1789c..34c98e7af2 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-21.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-5-21 description: > Array.prototype.lastIndexOf - value of 'fromIndex' which is an Object, and has an own toString method -includes: [runTestCase.js] ---*/ -function testcase() { - // objects inherit the default valueOf() method from Object // that simply returns itself. Since the default valueOf() method // does not return a primitive value, ES next tries to convert the object @@ -23,7 +20,5 @@ function testcase() { }; var targetObj = new RegExp(); - return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 && - [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1; - } -runTestCase(testcase); +assert.sameValue([0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex), 2, '[0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex)'); +assert.sameValue([0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex), -1, '[0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-22.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-22.js index f5108e1f6d..5783177f72 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-22.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-5-22 description: > Array.prototype.lastIndexOf - value of 'fromIndex' which is an object, and has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { - var fromIndex = { valueOf: function () { return 2; @@ -18,7 +15,6 @@ function testcase() { }; var targetObj = function () {}; - return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 && - [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1; - } -runTestCase(testcase); + +assert.sameValue([0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex), 2, '[0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex)'); +assert.sameValue([0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex), -1, '[0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-23.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-23.js index d7e89581cf..fb323cbcbb 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-23.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-23.js @@ -7,11 +7,8 @@ description: > Array.prototype.lastIndexOf - value of 'fromIndex' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - var toStringAccessed = false; var valueOfAccessed = false; @@ -27,6 +24,6 @@ function testcase() { } }; - return [0, true].lastIndexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed; - } -runTestCase(testcase); +assert.sameValue([0, true].lastIndexOf(true, fromIndex), 1, '[0, true].lastIndexOf(true, fromIndex)'); +assert(toStringAccessed, 'toStringAccessed !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-25.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-25.js index f3c4f64ca4..b025aae8f0 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-25.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.lastIndexOf use inherited valueOf method when value of 'fromIndex' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - var toStringAccessed = false; var valueOfAccessed = false; @@ -31,6 +28,6 @@ function testcase() { return 1; }; - return [0, true].lastIndexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert.sameValue([0, true].lastIndexOf(true, child), 1, '[0, true].lastIndexOf(true, child)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-31.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-31.js index 94359f1ce2..a2e746148c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-31.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-31.js @@ -6,12 +6,9 @@ es5id: 15.4.4.15-5-31 description: > Array.prototype.lastIndexOf - 'fromIndex' is a positive non-integer, verify truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 && - [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1; - } -runTestCase(testcase); + +assert.sameValue([0, targetObj, true].lastIndexOf(targetObj, 1.5), 1, '[0, targetObj, true].lastIndexOf(targetObj, 1.5)'); +assert.sameValue([0, true, targetObj].lastIndexOf(targetObj, 1.5), -1, '[0, true, targetObj].lastIndexOf(targetObj, 1.5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-32.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-32.js index 310b69d652..62052efbe7 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-32.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-32.js @@ -6,13 +6,9 @@ es5id: 15.4.4.15-5-32 description: > Array.prototype.lastIndexOf - 'fromIndex' is a negative non-integer, verify truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { var targetObj = {}; - return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 && - [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1; - } -runTestCase(testcase); +assert.sameValue([0, targetObj, true].lastIndexOf(targetObj, -2.5), 1, '[0, targetObj, true].lastIndexOf(targetObj, -2.5)'); +assert.sameValue([0, true, targetObj].lastIndexOf(targetObj, -2.5), -1, '[0, true, targetObj].lastIndexOf(targetObj, -2.5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-6.js index fdc15ac1c3..24ff075519 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-6.js @@ -4,14 +4,11 @@ /*--- es5id: 15.4.4.15-5-6 description: Array.prototype.lastIndexOf when 'fromIndex' isn't passed -includes: [runTestCase.js] ---*/ -function testcase() { var arr = [0, 1, 2, 3, 4]; //'fromIndex' will be set as 4 if not passed by default - return arr.lastIndexOf(0) === arr.lastIndexOf(0, 4) && - arr.lastIndexOf(2) === arr.lastIndexOf(2, 4) && - arr.lastIndexOf(4) === arr.lastIndexOf(4, 4); - } -runTestCase(testcase); + +assert.sameValue(arr.lastIndexOf(0), arr.lastIndexOf(0, 4), 'arr.lastIndexOf(0)'); +assert.sameValue(arr.lastIndexOf(2), arr.lastIndexOf(2, 4), 'arr.lastIndexOf(2)'); +assert.sameValue(arr.lastIndexOf(4), arr.lastIndexOf(4, 4), 'arr.lastIndexOf(4)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-1.js index acd7d1d5a6..89811caf37 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-1.js @@ -6,14 +6,9 @@ es5id: 15.4.4.15-6-1 description: > Array.prototype.lastIndexOf when fromIndex greater than Array.length -includes: [runTestCase.js] ---*/ -function testcase() { var a = new Array(1,2,3); - if (a.lastIndexOf(3,5.4) === 2 && - a.lastIndexOf(3,3.1) === 2 ) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.lastIndexOf(3,5.4), 2, 'a.lastIndexOf(3,5.4)'); +assert.sameValue(a.lastIndexOf(3,3.1), 2, 'a.lastIndexOf(3,3.1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-1.js index 977f2397e2..288516f3c8 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-1.js @@ -4,16 +4,11 @@ /*--- es5id: 15.4.4.15-7-1 description: Array.prototype.lastIndexOf with negative fromIndex -includes: [runTestCase.js] ---*/ -function testcase() { var a = new Array(1,2,3); - if (a.lastIndexOf(2,-2) === 1 && - a.lastIndexOf(2,-3) === -1 && - a.lastIndexOf(1,-5.3) === -1 ) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.lastIndexOf(2,-2), 1, 'a.lastIndexOf(2,-2)'); +assert.sameValue(a.lastIndexOf(2,-3), -1, 'a.lastIndexOf(2,-3)'); +assert.sameValue(a.lastIndexOf(1,-5.3), -1, 'a.lastIndexOf(1,-5.3)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-11.js index 640c177015..dd28cbc65b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-11 description: > Array.prototype.lastIndexOf - the length of iteration isn't changed by adding elements to the array during iteration -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [20]; Object.defineProperty(arr, "0", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return arr.lastIndexOf(1) === -1; - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf(1), -1, 'arr.lastIndexOf(1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-3.js index 47048b5347..6f8847b9be 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-3.js @@ -4,16 +4,10 @@ /*--- es5id: 15.4.4.15-8-3 description: Array.prototype.lastIndexOf must return correct index(string) -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {toString:function (){return "false"}}; var szFalse = "false"; var a = new Array(szFalse, "false","false1",undefined,0,false,null,1,obj,0); - if (a.lastIndexOf("false") === 1) - { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.lastIndexOf("false"), 1, 'a.lastIndexOf("false")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-4.js index a70f426aee..06ee8325bf 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-4.js @@ -4,17 +4,11 @@ /*--- es5id: 15.4.4.15-8-4 description: Array.prototype.lastIndexOf must return correct index(undefined) -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {toString:function (){return undefined;}}; var _undefined1 = undefined; var _undefined2; var a = new Array(_undefined1,_undefined2,undefined,true,0,false,null,1,"undefined",obj,1); - if (a.lastIndexOf(undefined) === 2) - { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.lastIndexOf(undefined), 2, 'a.lastIndexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-5.js index 2d9f5864fe..31db157916 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-5.js @@ -4,17 +4,11 @@ /*--- es5id: 15.4.4.15-8-5 description: Array.prototype.lastIndexOf must return correct index(Object) -includes: [runTestCase.js] ---*/ -function testcase() { var obj1 = {toString:function (){return "false"}}; var obj2 = {toString:function (){return "false"}}; var obj3 = obj1; var a = new Array(obj2,obj1,obj3,false,undefined,0,false,null,{toString:function (){return "false"}},"false"); - if (a.lastIndexOf(obj3) === 2) - { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.lastIndexOf(obj3), 2, 'a.lastIndexOf(obj3)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-6.js index efd470b2ca..3bbb963344 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-6.js @@ -4,16 +4,10 @@ /*--- es5id: 15.4.4.15-8-6 description: Array.prototype.lastIndexOf must return correct index(null) -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {toString:function (){return null}}; var _null = null; var a = new Array(true,undefined,0,false,null,1,"str",0,1,null,true,false,undefined,_null,"null",undefined,"str",obj); - if (a.lastIndexOf(null) === 13 ) - { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.lastIndexOf(null), 13, 'a.lastIndexOf(null)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-7.js index 7885347573..b26e8401db 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-7.js @@ -6,16 +6,10 @@ es5id: 15.4.4.15-8-7 description: > Array.prototype.lastIndexOf must return correct index (self reference) -includes: [runTestCase.js] ---*/ -function testcase() { var a = new Array(0,1,2,3); a[2] = a; - if (a.lastIndexOf(a) === 2 && - a.lastIndexOf(3) === 3 ) - { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.lastIndexOf(a), 2, 'a.lastIndexOf(a)'); +assert.sameValue(a.lastIndexOf(3), 3, 'a.lastIndexOf(3)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-8.js index 5cd268bdc3..976a95ffde 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-8.js @@ -4,16 +4,10 @@ /*--- es5id: 15.4.4.15-8-8 description: Array.prototype.lastIndexOf must return correct index (Array) -includes: [runTestCase.js] ---*/ -function testcase() { var b = new Array("0,1"); var a = new Array(0,b,"0,1",3); - if (a.lastIndexOf(b.toString()) === 2 && - a.lastIndexOf("0,1") === 2 ) - { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(a.lastIndexOf(b.toString()), 2, 'a.lastIndexOf(b.toString())'); +assert.sameValue(a.lastIndexOf("0,1"), 2, 'a.lastIndexOf("0,1")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-9.js index e97435009e..4137619f15 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.15-8-9 description: > Array.prototype.lastIndexOf must return correct index (Sparse Array) -includes: [runTestCase.js] ---*/ -function testcase() { var a = new Array(0,1); a[4294967294] = 2; // 2^32-2 - is max array element index a[4294967295] = 3; // 2^32-1 added as non-array element property @@ -21,9 +19,7 @@ function testcase() { a[4294967202] = 5; - return (a.lastIndexOf(2) === 4294967294 && - a.lastIndexOf(3) === 4294967200 && - a.lastIndexOf(4) === 4294967201 && - a.lastIndexOf(5) === 4294967202) ; - } -runTestCase(testcase); +assert.sameValue(a.lastIndexOf(2), 4294967294, 'a.lastIndexOf(2)'); +assert.sameValue(a.lastIndexOf(3), 4294967200, 'a.lastIndexOf(3)'); +assert.sameValue(a.lastIndexOf(4), 4294967201, 'a.lastIndexOf(4)'); +assert.sameValue(a.lastIndexOf(5), 4294967202, 'a.lastIndexOf(5)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-1.js index b65302a9c0..a65085b9cf 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-1 description: > Array.prototype.lastIndexOf - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { }; Object.defineProperty(arr, "length", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return 2 === Array.prototype.lastIndexOf.call(arr, "length"); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(arr, "length"), 2, 'Array.prototype.lastIndexOf.call(arr, "length")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-11.js index 3467256c8a..da2fb2d513 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-11 description: > Array.prototype.lastIndexOf - deleting own property causes index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { length: 200 }; Object.defineProperty(arr, "1", { @@ -28,6 +25,4 @@ function testcase() { configurable: true }); - return -1 === Array.prototype.lastIndexOf.call(arr, 6.99); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(arr, 6.99), -1, 'Array.prototype.lastIndexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-12.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-12.js index ce32868d03..a0c3e09371 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-12.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-12 description: > Array.prototype.lastIndexOf - deleting own property causes index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [1, 2, 3, 4]; Object.defineProperty(arr, "1", { @@ -28,6 +25,4 @@ function testcase() { configurable: true }); - return -1 === arr.lastIndexOf("6.99"); - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf("6.99"), -1, 'arr.lastIndexOf("6.99")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-17.js index d8d085be57..5b0ebef6a2 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-17.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-17 description: > Array.prototype.lastIndexOf - decreasing length of array causes index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, "last", 4]; Object.defineProperty(arr, "4", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return -1 === arr.lastIndexOf("last"); - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf("last"), -1, 'arr.lastIndexOf("last")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-19.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-19.js index 34036e64eb..8eab0c85a8 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-19.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-19.js @@ -7,11 +7,8 @@ description: > Array.prototype.lastIndexOf - decreasing length of array does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3]; Object.defineProperty(arr, "2", { @@ -29,6 +26,4 @@ function testcase() { configurable: true }); - return 2 === arr.lastIndexOf("unconfigurable"); - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf("unconfigurable"), 2, 'arr.lastIndexOf("unconfigurable")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-2.js index 0f814bac0a..176650e595 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-2 description: > Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { length: 30 }; var targetObj = function () { }; @@ -21,6 +18,5 @@ function testcase() { } }; - return 4 === Array.prototype.lastIndexOf.call(arr, targetObj, fromIndex); - } -runTestCase(testcase); + +assert.sameValue(Array.prototype.lastIndexOf.call(arr, targetObj, fromIndex), 4, 'Array.prototype.lastIndexOf.call(arr, targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-3.js index 43c55a6971..7b6a599ded 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-3 description: > Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = []; arr.length = 30; var targetObj = function () { }; @@ -22,6 +19,4 @@ function testcase() { } }; - return 4 === arr.lastIndexOf(targetObj, fromIndex); - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf(targetObj, fromIndex), 4, 'arr.lastIndexOf(targetObj, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-4.js index ac4310297e..75bab0fb81 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-4 description: > Array.prototype.lastIndexOf - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { 2: 6.99 }; Object.defineProperty(arr, "length", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return -1 === Array.prototype.lastIndexOf.call(arr, 6.99); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(arr, 6.99), -1, 'Array.prototype.lastIndexOf.call(arr, 6.99)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-5.js index 21ec4779b4..d4e8197b03 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-5 description: > Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { 10: false, length: 30 }; var fromIndex = { @@ -20,6 +17,4 @@ function testcase() { } }; - return -1 === Array.prototype.lastIndexOf.call(arr, false, fromIndex); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(arr, false, fromIndex), -1, 'Array.prototype.lastIndexOf.call(arr, false, fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-6.js index b0af673fff..3a2fc602fd 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-6 description: > Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = []; arr[10] = "10"; arr.length = 20; @@ -22,6 +19,4 @@ function testcase() { } }; - return -1 === arr.lastIndexOf("10", fromIndex); - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf("10", fromIndex), -1, 'arr.lastIndexOf("10", fromIndex)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-7.js index 3c5895fb3b..83d99da606 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-7 description: > Array.prototype.lastIndexOf - properties added into own object after current position are visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = { length: 8 }; Object.defineProperty(arr, "4", { @@ -26,6 +23,4 @@ function testcase() { configurable: true }); - return Array.prototype.lastIndexOf.call(arr, 1) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(arr, 1), 1, 'Array.prototype.lastIndexOf.call(arr, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-8.js index d63c551b53..aa51b656e0 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-a-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-a-8 description: > Array.prototype.lastIndexOf - properties added into own object after current position are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, , 2]; Object.defineProperty(arr, "2", { @@ -26,6 +23,4 @@ function testcase() { configurable: true }); - return arr.lastIndexOf(1) === 1; - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf(1), 1, 'arr.lastIndexOf(1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-1.js index 324c9a45b3..38c04f33ec 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-1.js @@ -6,15 +6,10 @@ es5id: 15.4.4.15-8-b-i-1 description: > Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 0, 1: 1, 2: 2, length: 3 }; - return Array.prototype.lastIndexOf.call(obj, 0) === 0 && - Array.prototype.lastIndexOf.call(obj, 1) === 1 && - Array.prototype.lastIndexOf.call(obj, 2) === 2; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), 0, 'Array.prototype.lastIndexOf.call(obj, 0)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), 1, 'Array.prototype.lastIndexOf.call(obj, 1)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), 2, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-10.js index 1a82655ab0..48a5f6129a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-b-i-10 description: > Array.prototype.lastIndexOf - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { length: 3 }; Object.defineProperty(obj, "0", { get: function () { @@ -33,8 +30,6 @@ function testcase() { configurable: true }); - return 0 === Array.prototype.lastIndexOf.call(obj, 0) && - 1 === Array.prototype.lastIndexOf.call(obj, 1) && - 2 === Array.prototype.lastIndexOf.call(obj, 2); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 0), 0, 'Array.prototype.lastIndexOf.call(obj, 0)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 1), 1, 'Array.prototype.lastIndexOf.call(obj, 1)'); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, 2), 2, 'Array.prototype.lastIndexOf.call(obj, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-17.js index 7621d46c18..8647750c98 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-17.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-17.js @@ -6,17 +6,12 @@ es5id: 15.4.4.15-8-b-i-17 description: > Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = []; Object.defineProperty(arr, "0", { set: function () { }, configurable: true }); - return arr.lastIndexOf(undefined) === 0; - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf(undefined), 0, 'arr.lastIndexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-18.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-18.js index 146887c824..f45757d193 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-18.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-18.js @@ -6,17 +6,12 @@ es5id: 15.4.4.15-8-b-i-18 description: > Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { length: 1 }; Object.defineProperty(obj, "0", { set: function () { }, configurable: true }); - return 0 === Array.prototype.lastIndexOf.call(obj, undefined); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, undefined), 0, 'Array.prototype.lastIndexOf.call(obj, undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-25.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-25.js index 8fb4943e72..25feef567b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-25.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-25.js @@ -7,16 +7,11 @@ description: > Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var func = function (a, b) { return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && -1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]); }; - return func(true); - } -runTestCase(testcase); +assert(func(true), 'func(true) !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-26.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-26.js index 49a7a91231..3c9044538d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-26.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-26.js @@ -7,17 +7,12 @@ description: > Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments equals to number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var func = function (a, b) { return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) && 1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]) && -1 === Array.prototype.lastIndexOf.call(arguments, arguments[2]); }; - return func(0, true); - } -runTestCase(testcase); +assert(func(0, true), 'func(0, true) !== true'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-28.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-28.js index 9339ac9dd8..b267199c8a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-28.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-b-i-28 description: > Array.prototype.lastIndexOf - side-effects are visible in subsequent iterations on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var arr = []; @@ -33,6 +30,4 @@ function testcase() { configurable: true }); - return arr.lastIndexOf(true) === 1; - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf(true), 1, 'arr.lastIndexOf(true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-29.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-29.js index 2e9a15ec8a..57abd4ba0a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-29.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-b-i-29 description: > Array.prototype.lastIndexOf - side-effects are visible in subsequent iterations on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var obj = { length: 3 }; @@ -33,6 +30,4 @@ function testcase() { configurable: true }); - return Array.prototype.lastIndexOf.call(obj, true) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call(obj, true), 1, 'Array.prototype.lastIndexOf.call(obj, true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-9.js index 3b8e394ab2..ea022e0fe7 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.15-8-b-i-9 description: > Array.prototype.lastIndexOf - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [, , , ]; Object.defineProperty(arr, "0", { get: function () { @@ -33,6 +30,6 @@ function testcase() { configurable: true }); - return arr.lastIndexOf(0) === 0 && arr.lastIndexOf(1) === 1 && arr.lastIndexOf(2) === 2; - } -runTestCase(testcase); +assert.sameValue(arr.lastIndexOf(0), 0, 'arr.lastIndexOf(0)'); +assert.sameValue(arr.lastIndexOf(1), 1, 'arr.lastIndexOf(1)'); +assert.sameValue(arr.lastIndexOf(2), 2, 'arr.lastIndexOf(2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-11.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-11.js index aa3e4a53b5..1437a8037d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-11.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-11.js @@ -6,14 +6,10 @@ es5id: 15.4.4.15-8-b-ii-11 description: > Array.prototype.lastIndexOf - both array element and search element are Objects, and they refer to the same object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj1 = {}; var obj2 = {}; var obj3 = obj2; - return [obj2, obj1].lastIndexOf(obj3) === 0; - } -runTestCase(testcase); + +assert.sameValue([obj2, obj1].lastIndexOf(obj3), 0, '[obj2, obj1].lastIndexOf(obj3)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-2.js index ad455f967f..fa8d820f8b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.15-8-b-iii-2 description: > Array.prototype.lastIndexOf returns without visiting subsequent element once search value is found -includes: [runTestCase.js] ---*/ -function testcase() { var arr = [2, 1, , 1, 2]; var elementFirstAccessed = false; var elementThirdAccessed = false; @@ -30,6 +28,6 @@ function testcase() { }); arr.lastIndexOf(2); - return !elementThirdAccessed && !elementFirstAccessed; - } -runTestCase(testcase); + +assert.sameValue(elementThirdAccessed, false, 'elementThirdAccessed'); +assert.sameValue(elementFirstAccessed, false, 'elementFirstAccessed'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-2.js index f6c21efeda..c27b07ed94 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-9-2.js @@ -6,18 +6,14 @@ es5id: 15.4.4.15-9-2 description: > Array.prototype.lastIndexOf returns -1 if 'length' is 0 and does not access any other properties -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; var f = {length: 0}; Object.defineProperty(f,"0",{get: function () {accessed = true; return 1;}}); var i = Array.prototype.lastIndexOf.call(f,1); - if (i === -1 && accessed==false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, -1, 'i'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-0-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-0-1.js index e4d4b2f2e6..8d05c641ec 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-0-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.19-0-1 description: Array.prototype.map must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.map; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-0-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-0-2.js index 7bddbc2fe5..6d2d6f65bd 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-0-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.19-0-2 description: Array.prototype.map.length must be 1 -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.map.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.map.length, 1, 'Array.prototype.map.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js index fa115d9de5..e514ba9d85 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-11.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-11 description: Array.prototype.map - applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Date; } @@ -18,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js index 58d55ea04f..79c16ba375 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-12.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-12 description: Array.prototype.map - applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof RegExp; } @@ -18,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js index 8f5a5bbd1d..93e5dae755 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-14.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-14 description: Array.prototype.map - applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Error; } @@ -18,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js index c7ded2b3db..7f68999e61 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-15.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-15 description: Array.prototype.map - applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return ('[object Arguments]' === Object.prototype.toString.call(obj)); } @@ -18,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js index 91d5b64da7..c4b6763521 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-4.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-4 description: Array.prototype.map - applied to Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Boolean; } @@ -19,6 +17,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js index f0ada3f690..bf6b29c01c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-6 description: Array.prototype.map - applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Number; } @@ -19,6 +17,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js index 5b30d162c8..5e2841e89c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-7.js @@ -4,16 +4,14 @@ /*--- es5id: 15.4.4.19-1-7 description: Array.prototype.map - applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof String; } var testResult = Array.prototype.map.call("abc", callbackfn); - return testResult[0] === true && testResult[1] === true && testResult[2] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); +assert.sameValue(testResult[2], true, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js index 2a86aa7013..ddc3dbf0b5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-8.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-8 description: Array.prototype.map - applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof String; } @@ -15,6 +13,6 @@ function testcase() { var obj = new String("abc"); var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true && testResult[2] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); +assert.sameValue(testResult[2], true, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js index adeaad7fa1..ec91b16d09 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-1-9.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-1-9 description: Array.prototype.map - applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Function; } @@ -20,6 +18,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js index f58e41c0cf..c1c71c7653 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-1.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-1 description: > Array.prototype.map - applied to Array-like object when 'length' is an own data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -23,6 +21,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js index cf99f39d48..d6fc11dfe9 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-10.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-10 description: > Array.prototype.map - applied to Array-like object, 'length' is an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -33,6 +31,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js index 0814862ba1..6c0386eba8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-2-11 description: > Array.prototype.map - applied to Array-like object when 'length' is an own accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -26,6 +23,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return 0 === testResult.length; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js index b54b970a10..e04daf059d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-2-13 description: > Array.prototype.map - applied to the Array-like object when 'length' is inherited accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -30,6 +27,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return 0 === testResult.length; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js index 9303d83f8d..798af3aca8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-2-14 description: > Array.prototype.map - applied to the Array-like object that 'length' property doesn't exist -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return 0 === testResult.length; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js index 3691818d5b..64dc777bdf 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-17.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-17 description: > Array.prototype.map - applied to Arguments object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -20,6 +18,4 @@ function testcase() { var testResult = func(12, 11); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js index ef7d50c801..70600db5b6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-19.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-19 description: > Array.prototype.map - applied to Function object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -23,6 +21,4 @@ function testcase() { var testResult = Array.prototype.map.call(fun, callbackfn); - return 2 === testResult.length; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js index ddbbdc5b73..feae653255 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-2.js @@ -6,15 +6,12 @@ es5id: 15.4.4.19-2-2 description: > Array.prototype.map - when 'length' is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } var testResult = [12, 11].map(callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js index 2591265b98..f0f3423e14 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-3 description: > Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -27,6 +25,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js index 93ac029027..ef5f878a2a 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-5 description: > Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -37,6 +35,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js index d130e751bb..764e73c102 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-6 description: > Array.prototype.map - applied to Array-like object, 'length' is an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -26,6 +24,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js index 1e2c7a9f82..23bb799e6d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-7 description: > Array.prototype.map - applied to Array-like object, 'length' is an own accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -29,6 +27,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js index 65a36ac609..4657bd29c6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-2-8 description: > Array.prototype.map - applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -34,6 +32,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js index 62c343ffe3..68b8eeb84d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-2-9.js @@ -7,10 +7,8 @@ description: > Array.prototype.map - applied to Array-like object when 'length' is an own accessor property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -42,6 +40,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult.length === 2; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 2, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js index 767a09e45b..fe7fba99c6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-1.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-1 description: Array.prototype.map - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js index 4366bca5d1..818353a02b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-10.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-10 description: Array.prototype.map - value of 'length' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js index 1bc227723b..cd0ea5b099 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-11.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-11 description: > Array.prototype.map - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js index 33b21348c1..b31d62059c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-12.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-12 description: > Array.prototype.map - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js index 3677588b08..2c97e017e9 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-13.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-13 description: > Array.prototype.map - value of 'length' is string that is able to convert to number primitive (value is a decimal number) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js index 0425de952d..7cd17e4ae1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-15.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-15 description: > Array.prototype.map - 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js index 5b68c30851..041d081f7b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-16.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-16 description: Array.prototype.map - 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js index 1342d77b1f..13fac983f8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-17.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-17 description: > Array.prototype.map - when 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js index e825d6ed5d..daba6b35e1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-3-18 description: > Array.prototype.map - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -19,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js index a0eac24c22..2e24f1677e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-3-19 description: > Array.prototype.map - value of 'length' is an Object which has an own toString method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -28,6 +25,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js index b123736a9e..d5c4e68f53 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-2 description: > Array.prototype.map on an Array-like object if 'length' is 1 (length overridden to true(type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 1; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 1, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js index b80c12366d..73b1bcf0bc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-20.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-20 description: > Array.prototype.map - value of 'length' is an Object which has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -27,6 +25,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js index 9a7970e2f7..3e7d013466 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-21.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -36,6 +33,6 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2 && firstStepOccured && secondStepOccured; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); +assert(firstStepOccured, 'firstStepOccured !== true'); +assert(secondStepOccured, 'secondStepOccured !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js index 157c6a039b..c958113651 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-3-23 description: > Array.prototype.map uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -43,6 +40,6 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js index 29a0f9339b..78ac44bb4f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-3-24 description: > Array.prototype.map - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -23,6 +20,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js index e4491787b3..5aea98f4f4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-25.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-3-25 description: Array.prototype.map - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val < 10; } @@ -21,6 +18,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js index 33326ebd41..2811585496 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-3 description: Array.prototype.map - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js index dc96b88782..47e24eed5d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-4.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-4 description: Array.prototype.map - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js index 6295296160..14c9a279f2 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-5.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-3-5 description: Array.prototype.map - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -16,6 +14,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js index f6ccb10a35..a27aab6c6e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-6 description: > Array.prototype.map - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 2; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 2, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js index 6f7b1df234..838ce7b4ee 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-7 description: > Array.prototype.map - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val > 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js index 5aab7c323b..6d891e2c14 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-3-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-3-9 description: > Array.prototype.map - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return val < 10; } @@ -18,6 +16,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr.length === 0; - } -runTestCase(testcase); +assert.sameValue(newArr.length, 0, 'newArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js index d95dba528b..efc01ed4ac 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-4-12.js @@ -4,16 +4,14 @@ /*--- es5id: 15.4.4.19-4-12 description: Array.prototype.map - 'callbackfn' is a function -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } var testResult = [11, 9].map(callbackfn); - return testResult.length === 2 && testResult[0] === true && testResult[1] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 2, 'testResult.length'); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js index 9db2bbe0bb..ac74c0a42b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-1-s.js @@ -5,10 +5,8 @@ es5id: 15.4.4.19-5-1-s description: Array.prototype.map - thisArg not passed to strict callbackfn flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var innerThisCorrect = false; function callbackfn(val, idx, obj) { @@ -18,6 +16,5 @@ function testcase() { } [1].map(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); + +assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js index 4b87507a53..3e53cbe9b5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-10.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-10 description: Array.prototype.map - Array object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objArray = new Array(2); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objArray); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js index cd5aa5e430..40a9ae70b2 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-11.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-11 description: Array.prototype.map - String object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objString = new String(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objString); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js index e2c8b9eb0f..1227e5b5b8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-12 description: Array.prototype.map - Boolean object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objBoolean = new Boolean(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objBoolean); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js index 6a2cec23d2..8571d3cc6d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-13.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-13 description: Array.prototype.map - Number object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objNumber = new Number(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objNumber); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js index 573e588245..1f1d06b03c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-14.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-14 description: Array.prototype.map - the Math object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === Math; } var testResult = [11].map(callbackfn, Math); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js index 043bcb3f0e..fcaaccb1de 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-15.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-15 description: Array.prototype.map - Date object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objDate = new Date(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objDate); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js index e4bb588415..7aa94c8535 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-16.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-16 description: Array.prototype.map - RegExp object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objRegExp = new RegExp(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objRegExp); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js index 7276e9e2cf..b801f2d7dc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-17.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-17 description: Array.prototype.map - the JSON object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === JSON; } var testResult = [11].map(callbackfn, JSON); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js index 874a446b23..c086d0ec66 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-18.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-18 description: Array.prototype.map - Error object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objError = new RangeError(); function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objError); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js index 9138eb2abe..bd74085e17 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-19 description: Array.prototype.map - the Arguments object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var arg; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { }(1, 2, 3)); var testResult = [11].map(callbackfn, arg); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js index c1a5b58af4..b13fe07d37 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-5-2 description: Array.prototype.map - thisArg is Object -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var o = new Object(); o.res = true; @@ -18,8 +16,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,o); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js index b00ebbc66f..099adba0f6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-21.js @@ -4,18 +4,13 @@ /*--- es5id: 15.4.4.19-5-21 description: Array.prototype.map - the global object can be used as thisArg -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === fnGlobalObject(); } var testResult = [11].map(callbackfn, fnGlobalObject()); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js index 1e31612e34..ed8fb89c84 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-22.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-22 description: Array.prototype.map - boolean primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === false; } var testResult = [11].map(callbackfn, false); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js index b2aad18879..ff77be07c4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-23.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-23 description: Array.prototype.map - number primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === 101; } var testResult = [11].map(callbackfn, 101); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js index e00487da5b..31d0bc52c1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-24.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-24 description: Array.prototype.map - string primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === "abc"; } var testResult = [11].map(callbackfn, "abc"); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js index dd3687056a..99606d5ba5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-5-3 description: Array.prototype.map - thisArg is Array -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var a = new Array(); a.res = true; @@ -18,8 +16,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,a); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js index dd4a03b546..b4a94e4fcd 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-5-4 description: > Array.prototype.map - thisArg is object from object template(prototype) -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -22,8 +20,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,f); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js index 6c023be2d8..bb24fb6176 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-5.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-5-5 description: Array.prototype.map - thisArg is object from object template -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -20,8 +18,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,f); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js index 23d6c0092a..4afa6b356e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-5-6 description: Array.prototype.map - thisArg is function -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -19,8 +17,5 @@ function testcase() { var srcArr = [1]; var resArr = srcArr.map(callbackfn,foo); - if( resArr[0] === true) - return true; - } -runTestCase(testcase); +assert.sameValue(resArr[0], true, 'resArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js index 28ea08de05..60c9a3c302 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-7.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-5-7 description: Array.prototype.map - built-in functions can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === eval; } var testResult = [11].map(callbackfn, eval); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js index 6c651a0519..927d5a55c2 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-5-9.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-5-9 description: Array.prototype.map - Function object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objFunction = function () { }; function callbackfn(val, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { } var testResult = [11].map(callbackfn, objFunction); - return testResult[0] === true; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js index 144a0bac61..689aea7378 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-6-1.js @@ -6,14 +6,8 @@ es5id: 15.4.4.19-6-1 description: > Array.prototype.map - Array.isArray returns true when input argument is the ourput array -includes: [runTestCase.js] ---*/ -function testcase() { - var newArr = [11].map(function () { }); - return Array.isArray(newArr); - - } -runTestCase(testcase); +assert(Array.isArray(newArr), 'Array.isArray(newArr) !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js index 79ed739f8f..93a1b3a59e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-6-2.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.19-6-2 description: Array.prototype.map - the returned array is instanceof Array -includes: [runTestCase.js] ---*/ -function testcase() { - var newArr = [11].map(function () { }); - return newArr instanceof Array; - } -runTestCase(testcase); +assert(newArr instanceof Array, 'newArr instanceof Array !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js index e6eebaccbd..813d2a9a0b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-1 description: > Array.prototype.map doesn't consider new elements added to array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { srcArr[2] = 3; @@ -20,8 +17,5 @@ function testcase() { var srcArr = [1,2,,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr.length === 5) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js index 3a3cbdc89e..728f6e6637 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-2 description: > Array.prototype.map considers new value of elements in array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { srcArr[4] = -1; @@ -22,8 +19,6 @@ function testcase() { var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr.length === 5 && resArr[4] === 0) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); +assert.sameValue(resArr[4], 0, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js index ff9bf8077c..c0392d6333 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-3 description: > Array.prototype.map doesn't visit deleted elements in array after the call -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { delete srcArr[4]; @@ -23,8 +20,6 @@ function testcase() { var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr.length === 5 && resArr[4] === undefined) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); +assert.sameValue(resArr[4], undefined, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js index b6b4055d5a..87291f9a49 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-4 description: > Array.prototype.map doesn't visit deleted elements when Array.length is decreased -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -21,8 +18,7 @@ function testcase() { var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr.length === 5 && callCnt === 2 && resArr[2] === undefined) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); +assert.sameValue(callCnt, 2, 'callCnt'); +assert.sameValue(resArr[2], undefined, 'resArr[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js index 0bbefc3076..6073581621 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-5 description: > Array.prototype.map doesn't consider newly added elements in sparse array -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -23,8 +20,6 @@ function testcase() { srcArr[1] = 1; srcArr[2] = 2; var resArr = srcArr.map(callbackfn); - if( resArr.length === 10 && callCnt === 2) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 10, 'resArr.length'); +assert.sameValue(callCnt, 2, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js index 1d583e4115..7bf09ac89f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-6 description: > Array.prototype.map visits deleted element in array after the call when same index is also present in prototype -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { delete srcArr[4]; @@ -25,8 +22,6 @@ function testcase() { var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); delete Array.prototype[4]; - if(resArr.length === 5 && resArr[4] === 1) - return true; - - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 5, 'resArr.length'); +assert.sameValue(resArr[4], 1, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js index 835653ae99..6c39924eb2 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-7.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-8-7 description: Array.prototype.map successful to delete the object in callbackfn -includes: [runTestCase.js] ---*/ -function testcase() { var obj = {}; obj.srcArr = [1, 2, 3, 4, 5]; @@ -20,6 +18,6 @@ function testcase() { } var resArr = obj.srcArr.map(callbackfn); - return resArr.toString() === "1,1,1,1,1" && !obj.hasOwnProperty("arr"); - } -runTestCase(testcase); + +assert.sameValue(resArr.toString(), "1,1,1,1,1", 'resArr.toString()'); +assert.sameValue(obj.hasOwnProperty("arr"), false, 'obj.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js index 35861301c4..b64dd53d73 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-8 description: > Array.prototype.map - no observable effects occur if length is 0 on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -21,6 +18,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0 && !accessed; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js index 2316901043..7647c26ad3 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-8-9 description: > Array.prototype.map - modifications to length don't change number of iterations on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var called = 0; function callbackfn(val, idx, obj) { called += 1; @@ -28,6 +26,6 @@ function testcase() { var testResult = arr.map(callbackfn); - return testResult.length === 3 && called === 2 && typeof testResult[2] === "undefined"; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 3, 'testResult.length'); +assert.sameValue(called, 2, 'called'); +assert.sameValue(typeof testResult[2], "undefined", 'typeof testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js index 2d4d57d78d..1340052d22 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-b-1 description: > Array.prototype.map - callbackfn not called for indexes never been assigned values -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -21,7 +18,6 @@ function testcase() { var srcArr = new Array(10); srcArr[1] = undefined; //explicitly assigning a value var resArr = srcArr.map(callbackfn); - if( resArr.length === 10 && callCnt === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(resArr.length, 10, 'resArr.length'); +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js index 9d44f5d4f5..e3caf87c3e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-b-14 description: > Array.prototype.map - decreasing length of array causes index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return idx === 3 && typeof val === "undefined"; } @@ -26,6 +23,5 @@ function testcase() { }); var testResult = arr.map(callbackfn); - return typeof testResult[3] === "undefined"; - } -runTestCase(testcase); + +assert.sameValue(typeof testResult[3], "undefined", 'typeof testResult[3]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js index 3ed74d6b6d..9faaf8aafa 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-16.js @@ -7,10 +7,8 @@ description: > Array.prototype.map - decreasing length of array does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 2 && val === "unconfigurable") { return false; @@ -37,6 +35,6 @@ function testcase() { }); var testResult = arr.map(callbackfn); - return testResult.length === 3 && testResult[2] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 3, 'testResult.length'); +assert.sameValue(testResult[2], false, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js index a8a374393c..1751eb5631 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-8-b-2 description: Array.prototype.map - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 2 && val === "length") { return false; @@ -27,6 +25,5 @@ function testcase() { }); var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[2] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult[2], false, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js index 6c8ec807f2..f2546b8177 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-8-b-3 description: Array.prototype.map - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 2) { return false; @@ -26,6 +24,5 @@ function testcase() { }); var testResult = Array.prototype.map.call(obj, callbackfn); - return typeof testResult[2] === "undefined"; - } -runTestCase(testcase); + +assert.sameValue(typeof testResult[2], "undefined", 'typeof testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js index 4ce7c89d5a..93a0a5f5b4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-b-4 description: > Array.prototype.map - properties added into own object after current position are visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1 && val === 1) { return false; @@ -35,6 +32,6 @@ function testcase() { }); var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js index 28d493c57c..13e51af5bb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-8-b-5 description: > Array.prototype.map - properties added into own object after current position are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 1 && val === 1) { return false; @@ -34,6 +32,6 @@ function testcase() { }); var testResult = arr.map(callbackfn); - return testResult[0] === true && testResult[1] === false; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js index d1646c958c..402fbb28d8 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-8-b-8 description: > Array.prototype.map - deleting own property causes index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 1) { return false; @@ -35,6 +33,6 @@ function testcase() { }); var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && typeof testResult[1] === "undefined"; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(typeof testResult[1], "undefined", 'typeof testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js index 0715f8f358..6bd9e877f1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-b-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-b-9 description: > Array.prototype.map - deleting own property causes index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return false; @@ -36,6 +33,6 @@ function testcase() { }); var testResult = arr.map(callbackfn); - return testResult[0] === true && typeof testResult[1] === "undefined"; - } -runTestCase(testcase); + +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(typeof testResult[1], "undefined", 'typeof testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js index 3dd2e09e9d..b24387d2ce 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-1 description: > Array.prototype.map - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = {}; function callbackfn(val, idx, obj) { @@ -24,6 +21,4 @@ function testcase() { var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr[5] === true; - } -runTestCase(testcase); +assert.sameValue(newArr[5], true, 'newArr[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js index ec38ec06ef..c6ce4900eb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-10 description: > Array.prototype.map - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -31,6 +28,4 @@ function testcase() { var testResult = arr.map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js index b69eec1478..1447a34b79 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -37,6 +34,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js index 302732bcad..79251ae7c5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-13.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -44,6 +41,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js index c483e7ed5d..5586a4fda3 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-15 description: > Array.prototype.map - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -36,6 +33,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js index 8165e146ef..5c150c5684 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-17 description: > Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return typeof val === "undefined"; @@ -27,6 +24,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js index 53d5335240..3b4f9c32c1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-18 description: > Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return typeof val === "undefined"; @@ -27,6 +24,4 @@ function testcase() { var testResult = arr.map(callbackfn); - return testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js index 16f7895557..1490b877ab 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-2 description: > Array.prototype.map - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = {}; function callbackfn(val, idx, obj) { @@ -24,6 +21,4 @@ function testcase() { var newArr = arr.map(callbackfn); - return newArr[0] === true; - } -runTestCase(testcase); +assert.sameValue(newArr[0], true, 'newArr[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js index 8088a3cbad..cbfbd8230e 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-20.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return typeof val === "undefined"; @@ -41,6 +38,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js index 05bed800de..6f75b88b58 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-21 description: > Array.prototype.map - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return typeof val === "undefined"; @@ -31,6 +28,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js index fca9938a62..e94dcaac82 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 9; @@ -26,6 +23,4 @@ function testcase() { var testResult = func(9); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js index caa91750ef..5a44a129cc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 9; @@ -28,6 +25,5 @@ function testcase() { var testResult = func(9, 11); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js index fd533e37d0..269869f849 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 9; @@ -31,6 +28,6 @@ function testcase() { var testResult = func(9, 11, 12); - return testResult[0] === true && testResult[1] === true && testResult[2] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); +assert.sameValue(testResult[2], true, 'testResult[2]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js index 2fe0260d07..801ddea6ec 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-28 description: > Array.prototype.map - element changed by getter on previous iterations is observed on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var arr = []; @@ -45,6 +42,5 @@ function testcase() { var testResult = arr.map(callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js index b3d3a1cdaa..60a2513c32 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-29 description: > Array.prototype.map - element changed by getter on previous iterations is observed on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var preIterVisible = false; var obj = { length: 2 }; @@ -45,6 +42,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js index f51b9099b4..fafb9436e0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-3 description: > Array.prototype.map - element to be retrieved is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -30,6 +27,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[5] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[5], true, 'testResult[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js index 0fabd223f5..0958b759e5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.map - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -42,6 +39,4 @@ function testcase() { var testResult = Array.prototype.map.call(child, callbackfn); - return testResult[5] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[5], true, 'testResult[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js index 80e47ae866..ff5e2e1571 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-7 description: > Array.prototype.map - element to be retrieved is inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -29,6 +26,4 @@ function testcase() { var newArr = Array.prototype.map.call(child, callbackfn); - return newArr[5] === true; - } -runTestCase(testcase); +assert.sameValue(newArr[5], true, 'newArr[5]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js index 7c5144a6f7..d6a758f844 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-i-9 description: > Array.prototype.map - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -31,6 +28,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js index c5e80687fd..05e901363c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-1 description: Array.prototype.map - callbackfn called with correct parameters -includes: [runTestCase.js] ---*/ -function testcase() { - var bPar = true; var bCalled = false; function callbackfn(val, idx, obj) @@ -22,7 +19,6 @@ function testcase() { srcArr[999999] = -6.6; var resArr = srcArr.map(callbackfn); - if(bCalled === true && bPar === true) - return true; - } -runTestCase(testcase); + +assert.sameValue(bCalled, true, 'bCalled'); +assert.sameValue(bPar, true, 'bPar'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js index af01ca61f2..e85465cdf0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-10.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.19-8-c-ii-10 description: Array.prototype.map - callbackfn is called with 1 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val) { return val > 10; } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js index 05e2a0892b..4027809567 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-11.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.19-8-c-ii-11 description: Array.prototype.map - callbackfn is called with 2 formal parameters -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx) { return (val > 10 && arguments[2][idx] === val); } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js index 7bcd553c41..03707a5b8b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-12.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.19-8-c-ii-12 description: Array.prototype.map - callbackfn is called with 3 formal parameters -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return (val > 10 && obj[idx] === val); } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js index e50cedffe7..ff631ecb89 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-13.js @@ -6,17 +6,12 @@ es5id: 15.4.4.19-8-c-ii-13 description: > Array.prototype.map - callbackfn that uses arguments object to get parameter value -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return arguments[2][arguments[1]] === arguments[0]; } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js index a2b2e6ca4e..bd8ce29fef 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-16 description: > Array.prototype.map - 'this' object when T is not an object (T is a boolean primitive) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === false; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, false); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js index 23fb0d15db..dfd7c7803d 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-17 description: > Array.prototype.map - 'this' object when T is not an object (T is a number) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === 5; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, 5); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js index 3dbce30f6c..f4d29581de 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-18 description: > Array.prototype.map - 'this' object when T is not an object (T is a string primitive) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === "hello!"; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, "hello!"); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js index 1b63e2df67..4061fe67d0 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-19 description: Array.prototype.map - non-indexed properties are not called. -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; var result = false; @@ -24,6 +21,6 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return !result && testResult[0] === true && called === 1; - } -runTestCase(testcase); +assert.sameValue(result, false, 'result'); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js index 94cbcb0b17..f9bc8cbca5 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-2 description: Array.prototype.map - callbackfn takes 3 arguments -includes: [runTestCase.js] ---*/ -function testcase() { - var parCnt = 3; var bCalled = false function callbackfn(val, idx, obj) @@ -20,9 +17,6 @@ function testcase() { var srcArr = [0,1,2,3,4,5,6,7,8,9]; var resArr = srcArr.map(callbackfn); - if(bCalled === true && parCnt === 3) - return true; - - } -runTestCase(testcase); +assert.sameValue(bCalled, true, 'bCalled'); +assert.sameValue(parCnt, 3, 'parCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js index 8d1c2800bc..50b08313c6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-20 description: > Array.prototype.map - callbackfn called with correct parameters (thisArg is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.threshold === 10; } @@ -21,6 +18,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js index 3f3cf53e07..327bbc60a4 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-21 description: > Array.prototype.map - callbackfn called with correct parameters (kValue is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { return val === 11; @@ -27,6 +24,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js index 9b08f366c8..4ef0b63143 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-22 description: > Array.prototype.map - callbackfn called with correct parameters (the index k is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (val === 11) { return idx === 0; @@ -27,6 +24,5 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true && testResult[1] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); +assert.sameValue(testResult[1], true, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js index 1361280053..ebd1725622 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-23 description: > Array.prototype.map - callbackfn called with correct parameters (this object O is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, length: 2 }; function callbackfn(val, idx, o) { @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js index 8cf6ff2775..6f8181cdec 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-4 description: Array.prototype.map - k values are passed in acending numeric order -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3, 4, 5]; var lastIdx = 0; var called = 0; @@ -23,6 +20,6 @@ function testcase() { } arr.map(callbackfn); - return result && arr.length === called; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert.sameValue(arr.length, called, 'arr.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js index c37da6a6ba..e3cb09b1b7 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-5 description: > Array.prototype.map - k values are accessed during each iteration and not prior to starting the loop. -includes: [runTestCase.js] ---*/ -function testcase() { - var kIndex = []; //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time. @@ -30,8 +27,8 @@ function testcase() { var testResult = [11, 12, 13, 14].map(callbackfn); - return testResult.length === 4 && testResult[0] === false && - testResult[1] === false && testResult[2] === false && - testResult[3] === false; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 4, 'testResult.length'); +assert.sameValue(testResult[0], false, 'testResult[0]'); +assert.sameValue(testResult[1], false, 'testResult[1]'); +assert.sameValue(testResult[2], false, 'testResult[2]'); +assert.sameValue(testResult[3], false, 'testResult[3]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js index d4e7ab1ba9..67ddced639 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-6.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-8-c-ii-6 description: Array.prototype.map - arguments to callbackfn are self consistent. -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, length: 1 }; var thisArg = {}; @@ -21,6 +18,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn, thisArg); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js index 8e2495ffbc..051d561014 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-ii-8 description: > Array.prototype.map - element changed by callbackfn on previous iterations is observed -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 9, 1: 12, length: 2 }; function callbackfn(val, idx, o) { @@ -22,6 +19,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult[1] === false; - } -runTestCase(testcase); +assert.sameValue(testResult[1], false, 'testResult[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js index 35416e0dd4..2965c92834 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-ii-9.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.19-8-c-ii-9 description: Array.prototype.map - callbackfn with 0 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return true; } var testResult = [11].map(callbackfn); - return testResult[0] === true; - } -runTestCase(testcase); +assert.sameValue(testResult[0], true, 'testResult[0]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js index 540c999561..34b15a2bc6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-iii-2 description: > Array.prototype.map - value of returned array element equals to 'mappedValue' -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val; } @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, 1: 9, length: 2 }; var newArr = Array.prototype.map.call(obj, callbackfn); - return newArr[0] === obj[0] && newArr[1] === obj[1]; - } -runTestCase(testcase); +assert.sameValue(newArr[0], obj[0], 'newArr[0]'); +assert.sameValue(newArr[1], obj[1], 'newArr[1]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js index bac867e12a..3638dd0abc 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-8-c-iii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-8-c-iii-4 description: > Array.prototype.map - value of returned array element can be enumerated -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } @@ -28,6 +25,4 @@ function testcase() { } } - return enumerable; - } -runTestCase(testcase); +assert(enumerable, 'enumerable !== true'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js index 7923f98890..4d93ba2704 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-1.js @@ -6,25 +6,17 @@ es5id: 15.4.4.19-9-1 description: > Array.prototype.map doesn't mutate the Array on which it is called on -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } var srcArr = [1,2,3,4,5]; srcArr.map(callbackfn); - if(srcArr[0] === 1 && - srcArr[1] === 2 && - srcArr[2] === 3 && - srcArr[3] === 4 && - srcArr[4] === 5) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(srcArr[0], 1, 'srcArr[0]'); +assert.sameValue(srcArr[1], 2, 'srcArr[1]'); +assert.sameValue(srcArr[2], 3, 'srcArr[2]'); +assert.sameValue(srcArr[3], 4, 'srcArr[3]'); +assert.sameValue(srcArr[4], 5, 'srcArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js index 4acc145c89..759be889c1 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-10 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -28,6 +25,5 @@ function testcase() { }; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js index 93a3dfd9a2..2b38f89188 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-11.js @@ -7,10 +7,8 @@ description: > Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { function Foo() { } Foo.prototype = [1, 2, 3]; @@ -32,8 +30,5 @@ function testcase() { function cb() { } var a = Array.prototype.map.call(f, cb); - if (Array.isArray(a) && a.length === 0) { - return true; - } - } -runTestCase(testcase); +assert(Array.isArray(a), 'Array.isArray(a) !== true'); +assert.sameValue(a.length, 0, 'a.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js index 5cec5b92e6..7fc1be560f 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-12.js @@ -6,10 +6,8 @@ es5id: 15.4.4.19-9-12 description: > Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with []) -includes: [runTestCase.js] ---*/ -function testcase() { function Foo() { } Foo.prototype = [1, 2, 3]; var f = new Foo(); @@ -33,8 +31,5 @@ function testcase() { function cb() { } var a = Array.prototype.map.call(f, cb); - if (Array.isArray(a) && a.length === 0) { - return true; - } - } -runTestCase(testcase); +assert(Array.isArray(a), 'Array.isArray(a) !== true'); +assert.sameValue(a.length, 0, 'a.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js index b52cf9c8fe..58196c81bb 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-13 description: > Array.prototype.map - if there are no side effects of the functions, O is unmodified -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -22,8 +19,8 @@ function testcase() { arr.map(callbackfn); - return 1 === arr[0] && 2 === arr[1] && 3 === arr[2] && 4 === arr[3] && 4 === called; - - - } -runTestCase(testcase); +assert.sameValue(arr[0], 1, 'arr[0]'); +assert.sameValue(arr[1], 2, 'arr[1]'); +assert.sameValue(arr[2], 3, 'arr[2]'); +assert.sameValue(arr[3], 4, 'arr[3]'); +assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js index 4a7189ecad..57b9018914 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-2.js @@ -6,25 +6,17 @@ es5id: 15.4.4.19-9-2 description: > Array.prototype.map returns new Array with same number of elements and values the result of callbackfn -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val + 10; } var srcArr = [1,2,3,4,5]; var resArr = srcArr.map(callbackfn); - if(resArr[0] === 11 && - resArr[1] === 12 && - resArr[2] === 13 && - resArr[3] === 14 && - resArr[4] === 15) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(resArr[0], 11, 'resArr[0]'); +assert.sameValue(resArr[1], 12, 'resArr[1]'); +assert.sameValue(resArr[2], 13, 'resArr[2]'); +assert.sameValue(resArr[3], 14, 'resArr[3]'); +assert.sameValue(resArr[4], 15, 'resArr[4]'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js index 44b42ab6f1..6c20378697 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.19-9-3 description: Array.prototype.map - subclassed array when length is reduced -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -16,9 +14,6 @@ function testcase() { function cb(){} var a = f.map(cb); - if (Array.isArray(a) && - a.length === 1) { - return true; - } - } -runTestCase(testcase); + +assert(Array.isArray(a), 'Array.isArray(a) !== true'); +assert.sameValue(a.length, 1, 'a.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js index 17a3554d7a..3f2955c584 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.19-9-4 description: Array.prototype.map doesn't visit expandos -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -19,10 +16,5 @@ function testcase() { srcArr[true] = 11; var resArr = srcArr.map(callbackfn); - if(callCnt == 5) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(callCnt, 5, 'callCnt'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js index af5488f13e..20c048f84b 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-5 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -19,6 +16,4 @@ function testcase() { var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js index 01729bcc72..b052968f05 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-6 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } @@ -21,6 +18,5 @@ function testcase() { obj.length = null; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); + +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js index f5bf8f600c..cc8f9d633c 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-7 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -24,7 +21,5 @@ function testcase() { obj.length = false; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js index ef611825db..0544689401 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-8 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -24,7 +21,5 @@ function testcase() { obj.length = 0; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js b/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js index c341398532..f7a6ad78e6 100644 --- a/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js +++ b/test/built-ins/Array/prototype/map/15.4.4.19-9-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.19-9-9 description: > Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -24,7 +21,5 @@ function testcase() { obj.length = '0'; var testResult = Array.prototype.map.call(obj, callbackfn); - return testResult.length === 0; - } -runTestCase(testcase); +assert.sameValue(testResult.length, 0, 'testResult.length'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-0-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-0-1.js index f9ed27c78e..b6a168723e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-0-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.21-0-1 description: Array.prototype.reduce must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.reduce; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-0-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-0-2.js index 5df27324c9..06afb159dd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-0-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.21-0-2 description: Array.prototype.reduce.length must be 1 -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.reduce.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.length, 1, 'Array.prototype.reduce.length'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js index 47df4a005e..3c7a850ef2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.21-1-11 description: Array.prototype.reduce applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { return obj instanceof Date; } @@ -16,6 +14,4 @@ function testcase() { obj.length = 1; obj[0] = 1; - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js index 6c7e916d64..e107e890fd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.21-1-12 description: Array.prototype.reduce applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { return obj instanceof RegExp; } @@ -16,6 +14,4 @@ function testcase() { obj.length = 1; obj[0] = 1; - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js index d14c442e2e..26d6b9067a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.21-1-14 description: Array.prototype.reduce applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { return obj instanceof Error; } @@ -16,6 +14,4 @@ function testcase() { obj.length = 1; obj[0] = 1; - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js index 726a931c83..856b8fc76f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-1-15 description: Array.prototype.reduce applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return ('[object Arguments]' === Object.prototype.toString.call(obj)); } @@ -17,6 +14,4 @@ function testcase() { return arguments; }("a", "b")); - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js index d09aebad48..c32bd16246 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.21-1-4 description: Array.prototype.reduce applied to Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { return obj instanceof Boolean; } @@ -17,6 +15,4 @@ function testcase() { obj[0] = 11; obj[1] = 12; - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js index 137efb0b47..d9a979e1bb 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.21-1-6 description: Array.prototype.reduce applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { return obj instanceof Number; } @@ -16,6 +14,5 @@ function testcase() { obj.length = 2; obj[0] = 11; obj[1] = 12; - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); + +assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js index 9cc9e35843..3f69d45217 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.21-1-7 description: Array.prototype.reduce applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return obj instanceof String; } - return Array.prototype.reduce.call("abc", callbackfn, 1); - } -runTestCase(testcase); +assert(Array.prototype.reduce.call("abc", callbackfn, 1), 'Array.prototype.reduce.call("abc", callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js index aa6377c36e..714bfbb4de 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.21-1-8 description: Array.prototype.reduce applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return obj instanceof String; } var obj = new String("abc"); - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js index 9c8cf1dfdb..e6ccb13a7c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.21-1-9 description: Array.prototype.reduce applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { return obj instanceof Function; } @@ -18,6 +16,4 @@ function testcase() { obj[0] = 11; obj[1] = 9; - return Array.prototype.reduce.call(obj, callbackfn, 1); - } -runTestCase(testcase); +assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js index c0d3668f66..3e1de73b4e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js @@ -6,25 +6,17 @@ es5id: 15.4.4.21-10-1 description: > Array.prototype.reduce doesn't mutate the Array on which it is called on -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return 1; } var srcArr = [1,2,3,4,5]; srcArr.reduce(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/reduce/15.4.4.21-10-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js index 81eca4210a..8cdc8eebba 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js @@ -6,20 +6,12 @@ es5id: 15.4.4.21-10-2 description: > Array.prototype.reduce reduces the array in ascending order of indices -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return prevVal + curVal; } var srcArr = ['1','2','3','4','5']; - if(srcArr.reduce(callbackfn) === '12345') - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(srcArr.reduce(callbackfn), '12345', 'srcArr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js index 87784f561d..ac6b33700d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.21-10-3 description: Array.prototype.reduce - subclassed array of length 1 -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = [1]; function foo() {} var f = new foo(); function cb(){} - if(f.reduce(cb) === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduce(cb), 1, 'f.reduce(cb)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js index 6b387e091b..eb3928eca5 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.21-10-4 description: Array.prototype.reduce - subclassed array with length more than 1 -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3, 4); function foo() {} var f = new foo(); function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduce(cb) === 10) - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduce(cb), 10, 'f.reduce(cb)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js index 2cbe4bb8de..a406a1ed83 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js @@ -6,20 +6,12 @@ es5id: 15.4.4.21-10-5 description: > Array.prototype.reduce reduces the array in ascending order of indices(initialvalue present) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return prevVal + curVal; } var srcArr = ['1','2','3','4','5']; - if(srcArr.reduce(callbackfn,'0') === '012345') - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(srcArr.reduce(callbackfn,'0'), '012345', 'srcArr.reduce(callbackfn,"0")'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js index e53b35ca06..1678a86314 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js @@ -6,16 +6,12 @@ es5id: 15.4.4.21-10-6 description: > Array.prototype.reduce - subclassed array when initialvalue provided -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = [1,2,3,4]; function foo() {} var f = new foo(); function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduce(cb,-1) === 9) - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduce(cb,-1), 9, 'f.reduce(cb,-1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js index dcbe93842c..bb61651893 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js @@ -6,16 +6,12 @@ es5id: 15.4.4.21-10-7 description: > Array.prototype.reduce - subclassed array with length 1 and initialvalue provided -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = [1]; function foo() {} var f = new foo(); function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduce(cb,-1) === 0) - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduce(cb,-1), 0, 'f.reduce(cb,-1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js index 86aa67a1b9..754e312902 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-10-8 description: Array.prototype.reduce doesn't visit expandos -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,10 +17,4 @@ function testcase() { srcArr[true] = 11; srcArr.reduce(callbackfn); - if(callCnt == 4) - { - return true; - } - - } -runTestCase(testcase); +assert.sameValue(callCnt, 4, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js index 88296c03e4..7653134cb5 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-1 description: > Array.prototype.reduce - 'length' is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -22,6 +19,4 @@ function testcase() { length: 2 }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js index f9d57dd589..ab09f8ea17 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-10 description: > Array.prototype.reduce applied to Array-like object, 'length' is an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -32,6 +29,4 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js index c5aaaa67a6..40657d6c1b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-11 description: > Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -25,6 +22,5 @@ function testcase() { configurable: true }); - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js index 919647eda7..7697a8bcdb 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-13 description: > Array.prototype.reduce applied to Array-like object that 'length' is inherited accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -30,6 +27,5 @@ function testcase() { child[0] = 11; child[1] = 12; - return Array.prototype.reduce.call(child, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), 1, 'Array.prototype.reduce.call(child, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js index 616d481ec4..c82e171030 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-14 description: > Array.prototype.reduce applied to the Array-like object that 'length' property doesn't exist -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,7 +16,5 @@ function testcase() { var obj = { 0: 11, 1: 12 }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js index f0b58b0657..841c3266ec 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-17 description: > Array.prototype.reduce applied to the Arguments object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -20,6 +17,4 @@ function testcase() { return Array.prototype.reduce.call(arguments, callbackfn, 1); }; - return func(12, 11) === true; - } -runTestCase(testcase); +assert.sameValue(func(12, 11), true, 'func(12, 11)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js index 39c7fb90f9..9f72d44be3 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js @@ -6,17 +6,12 @@ es5id: 15.4.4.21-2-18 description: > Array.prototype.reduce applied to String object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 3); } var str = new String("012"); - return Array.prototype.reduce.call(str, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(str, callbackfn, 1), true, 'Array.prototype.reduce.call(str, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js index b5a6fc1041..2affbf2667 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-19 description: > Array.prototype.reduce applied to Function object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -22,6 +19,4 @@ function testcase() { fun[1] = 11; fun[2] = 9; - return Array.prototype.reduce.call(fun, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(fun, callbackfn, 1), true, 'Array.prototype.reduce.call(fun, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js index d5b04de32a..dfd1d93fea 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.21-2-2 description: Array.prototype.reduce - 'length' is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } - return [12, 11].reduce(callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue([12, 11].reduce(callbackfn, 1), true, '[12, 11].reduce(callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js index 6a3a47cdd3..fb9124117c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-3 description: > Array.prototype.reduce - 'length' is an own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -26,6 +23,4 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js index c9cd2af88b..7d5b5c4b95 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-5 description: > Array.prototype.reduce applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -36,6 +33,4 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js index a78487cff7..03acf1257c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-6 description: > Array.prototype.reduce applied to Array-like object, 'length' is an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -25,6 +22,4 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js index adbabf8ce1..041084fc9a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-7 description: > Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -28,6 +25,4 @@ function testcase() { obj[1] = 11; obj[2] = 9; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js index 099169a679..fc1b7ddccc 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-8 description: > Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -33,6 +30,4 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js index 3573898f33..bb13c5fdcc 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (obj.length === 2); } @@ -41,6 +38,4 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduce.call(child, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js index 65889e7305..37934077df 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-3-1 description: Array.prototype.reduce - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 0, 1: 1, length: undefined }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js index 8343d81ee9..a3f6cea74a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-10 description: > Array.prototype.reduce - value of 'length' is number primitive (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 9, length: NaN }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js index d4ad07c5f7..31c311af83 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js @@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-11 description: > Array.prototype.reduce - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } var obj = { 1: 11, 2: 9, length: "2" }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js index 2365eb653a..1707e5d421 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js @@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-12 description: > Array.prototype.reduce - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } var obj = { 1: 11, 2: 9, length: "-4294967294" }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js index 8a8e950a3b..cc310f68ef 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js @@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-13 description: > Array.prototype.reduce - 'length' is a string containing a decimal number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } var obj = { 1: 11, 2: 9, length: "2.5" }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js index 424041eca3..2780fc4eeb 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-3-14 description: Array.prototype.reduce - 'length' is a string containing -Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed2 = false; function callbackfn2(prevVal, curVal, idx, obj) { @@ -18,7 +15,5 @@ function testcase() { var obj2 = { 0: 9, length: "-Infinity" }; - return Array.prototype.reduce.call(obj2, callbackfn2, 1) === 1 - && !accessed2; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj2, callbackfn2, 1), 1, 'Array.prototype.reduce.call(obj2, callbackfn2, 1)'); +assert.sameValue(accessed2, false, 'accessed2'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js index 7def35b7b6..afc324344d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js @@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-15 description: > Array.prototype.reduce - 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } var obj = { 1: 11, 2: 9, length: "2E0" }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js index 23804aa91c..9bbc9eeaa5 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js @@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-16 description: > Array.prototype.reduce - 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } var obj = { 1: 11, 2: 9, length: "0x0002" }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js index 921445a8b1..690bbf7e14 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js @@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-17 description: > Array.prototype.reduce - 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } var obj = { 1: 11, 2: 9, length: "0002.00" }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js index 845c3e77f3..a9080d0593 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-18 description: > Array.prototype.reduce - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: "asdf!_" }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js index 5943822b42..d585f3422d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-19 description: > Array.prototype.reduce - value of 'length' is an Object which has an own toString method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } @@ -25,6 +22,4 @@ function testcase() { } }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js index e4cd999a37..fd6781f5a5 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js @@ -6,18 +6,12 @@ es5id: 15.4.4.21-3-2 description: > Array.prototype.reduce - value of 'length' is a boolean (value is true) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 0); } var obj = { 0: 11, 1: 9, length: true }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js index 1db54db837..3bbdb55146 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-20 description: > Array.prototype.reduce - value of 'length' is an object which has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } @@ -25,6 +22,4 @@ function testcase() { } }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js index 641f227acc..6df7cf31e7 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - var valueOfOccured = false; var toStringOccured = false; @@ -34,6 +31,6 @@ function testcase() { } }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfOccured && toStringOccured; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert(valueOfOccured, 'valueOfOccured !== true'); +assert(toStringOccured, 'toStringOccured !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js index 3db766290f..5231d12ffa 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-23 description: > Array.prototype.reduce uses inherited valueOf method - 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - var valueOfAccessed = false; var toStringAccessed = false; @@ -41,6 +38,6 @@ function testcase() { length: child }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js index c08fc1a659..ceaeabd196 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js @@ -6,10 +6,8 @@ es5id: 15.4.4.21-3-24 description: > Array.prototype.reduce - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } @@ -20,6 +18,4 @@ function testcase() { length: 2.685 }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js index 08eb40fa76..4728d9f4f4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-25 description: > Array.prototype.reduce - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } @@ -21,6 +18,4 @@ function testcase() { length: -4294967294.5 }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js index 50b23de4b8..f988b1dc8d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-3-3 description: Array.prototype.reduce - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 1, 1: 1, length: 0 }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js index 9806b73d4b..b6a0e3ba25 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-4 description: > Array.prototype.reduce - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: +0 }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js index f611533a11..dd3dc6159c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-5 description: > Array.prototype.reduce - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: -0 }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js index 200e9cf60c..8a307a43d1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js @@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-6 description: > Array.prototype.reduce - value of 'length' is a number (value is positive) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } var obj = { 1: 11, 2: 9, length: 2 }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === true; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js index 9532748865..9499dd414d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js @@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-7 description: > Array.prototype.reduce - value of 'length' is a number (value is negative) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return (curVal === 11 && idx === 1); } var obj = { 1: 11, 2: 9, length: -4294967294 }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js index 8943a19298..122c00077f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-9 description: > Array.prototype.reduce - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: -Infinity }; - return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js index 68b217dec7..5d5da70f65 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js @@ -4,17 +4,13 @@ /*--- es5id: 15.4.4.21-4-12 description: Array.prototype.reduce - 'callbackfn' is a function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; return curVal > 10; } - return [11, 9].reduce(callbackfn, 1) === false && accessed; - } -runTestCase(testcase); +assert.sameValue([11, 9].reduce(callbackfn, 1), false, '[11, 9].reduce(callbackfn, 1)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js index 49eb6e0d36..294a20c492 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js @@ -6,16 +6,12 @@ es5id: 15.4.4.21-5-9 description: > Array.prototype.reduce - 'initialValue' is returned if 'len' is 0 and 'initialValue' is present -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; } - return [].reduce(callbackfn, 3) === 3 && !accessed; - } -runTestCase(testcase); +assert.sameValue([].reduce(callbackfn, 3), 3, '[].reduce(callbackfn, 3)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js index 60a3e99770..58799e4c0f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-2 description: > Array.prototype.reduce - modifications to length don't change number of iterations in step 9 -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return idx; } @@ -25,6 +22,4 @@ function testcase() { configurable: true }); - return Array.prototype.reduce.call(obj, callbackfn) === 3; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn), 3, 'Array.prototype.reduce.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js index d9ecb6e2e4..a7d8312cbc 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-8-b-3 description: Array.prototype.reduce - loop is broken once 'kPresent' is true -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; var testResult = false; var firstCalled = 0; @@ -40,6 +37,7 @@ function testcase() { }); arr.reduce(callbackfn); - return testResult && firstCalled === 1 && secondCalled === 1; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert.sameValue(firstCalled, 1, 'firstCalled'); +assert.sameValue(secondCalled, 1, 'secondCalled'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js index afa7bdf8e1..2015994b52 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-1 description: > Array.prototype.reduce - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js index 6529df29b4..afd039d95c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js @@ -6,10 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-10 description: > Array.prototype.reduce - when element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -28,6 +26,5 @@ function testcase() { }); arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js index d3a2d8e523..749849c5ce 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js index 267ba2a338..a1d8b0ae54 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -42,6 +40,5 @@ function testcase() { }); Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js index 4bf79ff7bd..4e88911dc7 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-15 description: > Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -34,6 +31,5 @@ function testcase() { child.length = 3; Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js index fc535d6ad8..df24619032 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-17 description: > Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,6 +23,5 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js index 836b0f764f..56d7265b80 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-18 description: > Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,6 +23,5 @@ function testcase() { }); arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js index 248d8441b0..95847b6205 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-2 description: > Array.prototype.reduce - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -20,6 +17,5 @@ function testcase() { var arr = [0, 1, 2]; arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js index 9bc6297980..a819487734 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-21 description: > Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -32,6 +29,5 @@ function testcase() { child.length = 3; Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js index f806300bb2..ffc348e3b1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js index 913112c7e5..77cf2e2059 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 2) { @@ -25,6 +22,5 @@ function testcase() { }; func(0, 1, 2); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js index 75cfe2b640..79cf151db4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 3) { @@ -26,6 +23,5 @@ function testcase() { }; func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js index 94325f7c81..451cf864fb 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-28 description: > Array.prototype.reduce - applied to String object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -20,7 +17,5 @@ function testcase() { var str = new String("012"); Array.prototype.reduce.call(str, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js index 7592901dca..ead6d3bbcb 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-29 description: > Array.prototype.reduce - applied to Function object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -27,7 +24,5 @@ function testcase() { obj[3] = 3; Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js index 1e98797a9a..c110f39fef 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -29,7 +26,5 @@ function testcase() { child.length = 3; Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js index 3c611a8d09..5b44c264eb 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-30 description: > Array.prototype.reduce - element changed by getter on current iterations is observed in subsequent iterations on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -41,6 +38,5 @@ function testcase() { }); arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js index 2f4076f1b8..84ebb33406 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - element changed by getter on current iterations is observed in subsequent iterations on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -42,7 +39,5 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js index d8db9e89aa..d9f5cd35dd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -40,6 +37,5 @@ function testcase() { child[1] = "1"; Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js index e72682d8c2..6abc1c045b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-7 description: > Array.prototype.reduce - element to be retrieved is inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,6 +23,5 @@ function testcase() { child.length = 3; Array.prototype.reduce.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js index a7cb749e30..2226c04b2c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-9 description: > Array.prototype.reduce - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -27,6 +24,5 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js index 8b7b014c15..97a2f04fa0 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js @@ -6,10 +6,8 @@ es5id: 15.4.4.21-9-1 description: > Array.prototype.reduce doesn't consider new elements added to array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { arr[5] = 6; arr[2] = 3; @@ -17,6 +15,5 @@ function testcase() { } var arr = [1, 2, , 4, '5']; - return arr.reduce(callbackfn) === "105"; - } -runTestCase(testcase); + +assert.sameValue(arr.reduce(callbackfn), "105", 'arr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js index 9746e1cbf1..f5a45d6607 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-10 description: > Array.prototype.reduce called with an initial value doesn't consider new elements added to array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { arr[5] = 6; arr[2] = 3; @@ -18,6 +15,5 @@ function testcase() { } var arr = [1,2,,4,'5']; - return arr.reduce(callbackfn, "") === "12345"; - } -runTestCase(testcase); + +assert.sameValue(arr.reduce(callbackfn, ""), "12345", 'arr.reduce(callbackfn, "")'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js index 00a8baf1d4..0999bcdc82 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-2 description: > Array.prototype.reduce considers new value of elements in array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { arr[3] = -2; @@ -19,8 +16,5 @@ function testcase() { } var arr = [1,2,3,4,5]; - if(arr.reduce(callbackfn) === 3) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.reduce(callbackfn), 3, 'arr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js index e901425984..b183adfbd0 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-4 description: > Array.prototype.reduce doesn't visit deleted elements when Array.length is decreased -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { arr.length = 2; @@ -18,8 +15,5 @@ function testcase() { } var arr = [1,2,3,4,5]; - if(arr.reduce(callbackfn) === 3 ) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.reduce(callbackfn), 3, 'arr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js index 8676b3e380..c6e96e9a71 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-5 description: > Array.prototype.reduce - callbackfn not called for array with one element -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,7 +16,6 @@ function testcase() { } var arr = [1]; - if(arr.reduce(callbackfn) === 1 && callCnt === 0 ) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduce(callbackfn), 1, 'arr.reduce(callbackfn)'); +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js index 07285709e2..9f6baab99d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.21-9-7 description: > Array.prototype.reduce stops calling callbackfn once the array is deleted during the call -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { delete o.arr; return prevVal + curVal; @@ -17,6 +15,6 @@ function testcase() { var o = new Object(); o.arr = ['1', 2, 3, 4, 5]; - return o.arr.reduce(callbackfn) === "12345" && !o.hasOwnProperty("arr"); - } -runTestCase(testcase); + +assert.sameValue(o.arr.reduce(callbackfn), "12345", 'o.arr.reduce(callbackfn)'); +assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js index d2b3969801..66dd77475c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-8 description: Array.prototype.reduce - no observable effects occur if 'len' is 0 -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var callbackAccessed = false; function callbackfn() { @@ -26,6 +23,6 @@ function testcase() { }); Array.prototype.reduce.call(obj, function () { }, "initialValue"); - return !accessed && !callbackAccessed; - } -runTestCase(testcase); + +assert.sameValue(accessed, false, 'accessed'); +assert.sameValue(callbackAccessed, false, 'callbackAccessed'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js index bd97d824f3..ccf92a2d63 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.21-9-9 description: > Array.prototype.reduce - modifications to length don't change number of iterations in step 9 -includes: [runTestCase.js] ---*/ -function testcase() { var called = 0; function callbackfn(accum, val, idx, obj) { called++; @@ -27,6 +25,5 @@ function testcase() { var newAccum = arr.reduce(callbackfn, "initialValue"); - return newAccum === "initialValue01" && called === 2; - } -runTestCase(testcase); +assert.sameValue(newAccum, "initialValue01", 'newAccum'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js index 5b50b02265..4a79904982 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js @@ -6,19 +6,12 @@ es5id: 15.4.4.21-9-b-1 description: > Array.prototype.reduce returns initialvalue when Array is empty and initialValue is present -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { } var arr = new Array(10); - if(arr.reduce(callbackfn,5) === 5) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.reduce(callbackfn,5), 5, 'arr.reduce(callbackfn,5)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js index 7eb49ee790..3ec5f11618 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-14 description: > Array.prototype.reduce - decreasing length of array in step 8 causes deleted index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { arr.reduce(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js index 9737b81204..880948afe4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - decreasing length of array in step 8 does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(accum, val, idx, obj) { @@ -39,6 +36,4 @@ function testcase() { arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js index e86b5b32bf..d113edf659 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-17 description: > Array.prototype.reduce - properties added into own object are visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(accum, val, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js index e1c0178ed5..fdd1232bef 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-18 description: > Array.prototype.reduce - properties added into own object are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(accum, val, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); arr.reduce(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js index fb21cd6686..76ec6be5a1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-2 description: > Array.prototype.reduce - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(accum, val, idx, obj) { @@ -31,6 +28,4 @@ function testcase() { Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js index 1df76b4a82..9f622a0bca 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-21 description: > Array.prototype.reduce - deleting own property causes deleted index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js index dd7b9f67bb..d276ff1f45 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-22 description: > Array.prototype.reduce - deleting own property causes deleted index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); arr.reduce(callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js index 3f5ff89337..fa0595364a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-27 description: > Array.prototype.reduce - decreasing length of array causes deleted index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { arr.reduce(callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js index 83ef0cbc82..4a1d058755 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - decreasing length of array does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(accum, val, idx, obj) { @@ -39,6 +36,4 @@ function testcase() { arr.reduce(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js index 7d36a853a8..e25a0c8bcf 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-3 description: > Array.prototype.reduce - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { Array.prototype.reduce.call(obj, callbackfn, "initialValue"); - return accessed && testResult; - } -runTestCase(testcase); +assert(accessed, 'accessed !== true'); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js index 21d48f2cba..eb1a8e37c1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-4 description: > Array.prototype.reduce - properties added into own object in step 8 are visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(accum, val, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js index 71e49118e6..b045c3346f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-5 description: > Array.prototype.reduce - properties added into own object in step 8 are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(accum, val, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); arr.reduce(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js index 5ff818e4f4..c9ae451a90 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-8 description: > Array.prototype.reduce - deleting own property in step 8 causes deleted index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js index fd8d2ab0ef..38291cd271 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-9 description: > Array.prototype.reduce - deleting own property in step 8 causes deleted index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -32,6 +29,6 @@ function testcase() { }); arr.reduce(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js index aa2bfbfb36..2c5673ea99 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-1 description: > Array.prototype.reduce - callbackfn not called for indexes never been assigned values -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,7 +17,6 @@ function testcase() { var arr = new Array(10); arr[0] = arr[1] = undefined; //explicitly assigning a value - if( arr.reduce(callbackfn) === undefined && callCnt === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduce(callbackfn), undefined, 'arr.reduce(callbackfn)'); +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js index edbce72d25..c5d969c15d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-1 description: > Array.prototype.reduce - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -21,6 +18,5 @@ function testcase() { var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js index f1d1e3436d..5abbe780af 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-10 description: > Array.prototype.reduce - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -29,6 +26,5 @@ function testcase() { }); arr.reduce(callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js index 875342dd9b..54332b569c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -36,6 +33,5 @@ function testcase() { }); Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js index befe7caf4a..2faa0cca6f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -43,6 +40,5 @@ function testcase() { }); Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js index 01d48876ac..54e70886e3 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-15 description: > Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { child.length = 3; Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js index b33016a898..aaf664665e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-17 description: > Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,5 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js index 525faa40da..a4f82d024c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-18 description: > Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,7 +24,5 @@ function testcase() { }); arr.reduce(callbackfn, initialValue); - return testResult; - - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js index b37f46f132..5e6915028c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-2 description: > Array.prototype.reduce - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -21,6 +18,5 @@ function testcase() { var arr = [0, 1]; arr.reduce(callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js index db05c388b1..350e6c04e8 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-21 description: > Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -33,6 +30,5 @@ function testcase() { child.length = 3; Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js index 0cbb4cd844..6ae39b9677 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -25,6 +22,5 @@ function testcase() { }; func(0, 1); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js index 82999096b3..fa9b3d46c7 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -25,6 +22,5 @@ function testcase() { }; func(0, 1, 2); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js index c661636771..bd13966d9e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -25,6 +22,5 @@ function testcase() { }; func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js index 0795014a51..59459ffa6f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-28 description: > Array.prototype.reduce - applied to String object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -22,7 +19,5 @@ function testcase() { var str = new String("012"); Array.prototype.reduce.call(str, callbackfn, initialValue); - return testResult; - - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js index c0d326e4fc..eb4d19cfe9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-29 description: > Array.prototype.reduce - applied to Function object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -28,6 +25,5 @@ function testcase() { obj[3] = 3; Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js index 9ad289384b..44f136d10b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -30,7 +27,5 @@ function testcase() { child.length = 3; Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js index a7d94e4f3e..da35414d3f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-30 description: > Array.prototype.reduce - element changed by getter on previous iterations is observed on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -42,6 +39,5 @@ function testcase() { }); arr.reduce(callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js index 1bcce7f114..852b4289e9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-31 description: > Array.prototype.reduce - element changed by getter on previous iterations is observed on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -42,7 +39,5 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js index f8e08c1a97..cacb0e36b6 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -43,6 +40,5 @@ function testcase() { child[1] = "1"; Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js index 4e0dbb2999..90e6a56774 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-7 description: > Array.prototype.reduce - element to be retrieved is inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,5 @@ function testcase() { child.length = 3; Array.prototype.reduce.call(child, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js index 86c84f0cae..a7f92f8b69 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-9 description: > Array.prototype.reduce - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -28,7 +25,5 @@ function testcase() { }); Array.prototype.reduce.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js index 3a96b3f729..18fe4e63c0 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-1 description: > Array.prototype.reduce - callbackfn called with correct parameters (initialvalue not passed) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal) @@ -20,7 +17,5 @@ function testcase() { } var arr = [0,1,true,null,new Object(),"five"]; - if( arr.reduce(callbackfn) === "five") - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduce(callbackfn), "five", 'arr.reduce(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js index 68646c07cf..de1864bc90 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js @@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-10 description: > Array.prototype.reduce - callbackfn is called with 1 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(prevVal) { result = (prevVal === 1); } [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js index 44070bdbe1..33fb22ec30 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js @@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-11 description: > Array.prototype.reduce - callbackfn is called with 2 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(prevVal, curVal) { result = (curVal > 10 && 1 === prevVal); } [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js index 42407c4e44..26b296baec 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js @@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-12 description: > Array.prototype.reduce - callbackfn is called with 3 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(prevVal, curVal, idx) { result = (prevVal === 1 && arguments[3][idx] === curVal); } [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js index ad0e086ce3..6f148ee490 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js @@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-13 description: > Array.prototype.reduce - callbackfn is called with 4 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(prevVal, curVal, idx, obj) { result = (prevVal === 1 && obj[idx] === curVal); } [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js index 81c879421c..f6ac6ab952 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js @@ -4,17 +4,13 @@ /*--- es5id: 15.4.4.21-9-c-ii-14 description: Array.prototype.reduce - callbackfn that uses arguments -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn() { result = (arguments[0] === 1 && arguments[3][arguments[2]] === arguments[1]); } [11].reduce(callbackfn, 1); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js index 7bad0ecfe3..51516da72e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-16 description: Array.prototype.reduce - non-indexed properties are not called -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var result1 = true; var result2 = true; @@ -27,6 +24,7 @@ function testcase() { var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; Array.prototype.reduce.call(obj, callbackfn, 1); - return result1 && result2 && accessed; - } -runTestCase(testcase); + +assert(result1, 'result1 !== true'); +assert(result2, 'result2 !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js index 0ec567ef89..9d65313597 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-17 description: > Array.prototype.reduce - 'accumulator' used for current iteration is the result of previous iteration on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var result = true; var accessed = false; var preIteration = 1; @@ -24,6 +21,6 @@ function testcase() { } [11, 12, 13].reduce(callbackfn, 1); - return result && accessed; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js index 01ae0dfd2d..a3f9f8fe7b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - value of 'accumulator' used for first iteration is the value of 'initialValue' when it is present on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -22,6 +19,5 @@ function testcase() { var obj = { 0: 11, 1: 9, length: 2 }; Array.prototype.reduce.call(obj, callbackfn, 1); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js index 52aaa89ea2..766779d1fc 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduce - value of 'accumulator' used for first iteration is the value of least index property which is not undefined when 'initialValue' is not present on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; var result = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -22,6 +19,6 @@ function testcase() { } [11, 9].reduce(callbackfn); - return result && called === 1; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert.sameValue(called, 1, 'called'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js index 7aa907f389..15ad8ace1d 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-2 description: > Array.prototype.reduce - callbackfn called with correct parameters (initialvalue passed) -includes: [runTestCase.js] ---*/ -function testcase() { - var bParCorrect = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -24,7 +21,5 @@ function testcase() { var arr = [0,1,true,null,new Object(),"five"]; var initialValue = 5.5; - if( arr.reduce(callbackfn,initialValue) === "five") - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduce(callbackfn,initialValue), "five", 'arr.reduce(callbackfn,initialValue)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js index 1af81d84d0..27e59f8030 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-20 description: Array.prototype.reduce - undefined can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, undefined) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, undefined), true, 'Array.prototype.reduce.call(obj, callbackfn, undefined)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js index 98bcb4acd9..8e061807bd 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-21 description: Array.prototype.reduce - null can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, null) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, null), true, 'Array.prototype.reduce.call(obj, callbackfn, null)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js index 8eff43af54..17528b9bb5 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-22 description: > Array.prototype.reduce - boolean primitive can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, false) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, false), true, 'Array.prototype.reduce.call(obj, callbackfn, false)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js index c06bc3aca5..9ed6701d1f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-23 description: > Array.prototype.reduce - number primitive can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, 12) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 12), true, 'Array.prototype.reduce.call(obj, callbackfn, 12)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js index 3ca3a438f2..d4068840c2 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-24 description: > Array.prototype.reduce - string primitive can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, "hello_") === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, "hello_"), true, 'Array.prototype.reduce.call(obj, callbackfn, "hello_")'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js index 35aa572230..34c73fb085 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-25 description: Array.prototype.reduce - Function object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var objFunction = function () { }; var accessed = false; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, objFunction) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objFunction), true, 'Array.prototype.reduce.call(obj, callbackfn, objFunction)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js index 409cae6225..326e7a081a 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-26 description: Array.prototype.reduce - Array object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var objArray = new Array(10); var accessed = false; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, objArray) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objArray), true, 'Array.prototype.reduce.call(obj, callbackfn, objArray)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js index 7bd5cec231..727c121855 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-27 description: Array.prototype.reduce - String object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var objString = new String(); var accessed = false; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, objString) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objString), true, 'Array.prototype.reduce.call(obj, callbackfn, objString)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js index 230308bf63..03006716d1 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-28 description: Array.prototype.reduce - Boolean object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var objBoolean = new Boolean(); var accessed = false; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, objBoolean) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objBoolean), true, 'Array.prototype.reduce.call(obj, callbackfn, objBoolean)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js index cff38a8dba..39f1637561 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-29 description: Array.prototype.reduce - Number object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var objNumber = new Number(); var accessed = false; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, objNumber) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objNumber), true, 'Array.prototype.reduce.call(obj, callbackfn, objNumber)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js index 239322be0f..3074cd1e60 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-3 description: Array.prototype.reduce - callbackfn takes 4 arguments -includes: [runTestCase.js] ---*/ -function testcase() { - var bCalled = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,7 +16,6 @@ function testcase() { return false; } var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.reduce(callbackfn,true) === true && bCalled === true) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduce(callbackfn,true), true, 'arr.reduce(callbackfn,true)'); +assert.sameValue(bCalled, true, 'bCalled'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js index 383aa57168..d810b428db 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-30 description: Array.prototype.reduce - the Math object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, Math) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, Math), true, 'Array.prototype.reduce.call(obj, callbackfn, Math)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js index 9f7904ecfd..c6cd280b30 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-31 description: Array.prototype.reduce - Date object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var objDate = new Date(); var accessed = false; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, objDate) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objDate), true, 'Array.prototype.reduce.call(obj, callbackfn, objDate)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js index 025e0419be..adb6a57ab3 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-32 description: Array.prototype.reduce - RegExp object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var objRegExp = new RegExp(); var accessed = false; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, objRegExp) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objRegExp), true, 'Array.prototype.reduce.call(obj, callbackfn, objRegExp)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js index 0c973e9200..bc7dc899d9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-33 description: Array.prototype.reduce - the JSON can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, JSON) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, JSON), true, 'Array.prototype.reduce.call(obj, callbackfn, JSON)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js index 1e81b884f0..9a9c1ea528 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.21-9-c-ii-34 description: Array.prototype.reduce - Error object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var objError = new RangeError(); var accessed = false; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, objError) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objError), true, 'Array.prototype.reduce.call(obj, callbackfn, objError)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js index 00dac48c30..dbd0e61063 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-35 description: > Array.prototype.reduce - the Arguments object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var arg; @@ -25,6 +22,5 @@ function testcase() { arg = arguments; }(10, 11, 12, 13)); - return Array.prototype.reduce.call(obj, callbackfn, arg) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, arg), true, 'Array.prototype.reduce.call(obj, callbackfn, arg)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js index e49546d60d..b2a7881870 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js @@ -6,13 +6,9 @@ es5id: 15.4.4.21-9-c-ii-37 description: > Array.prototype.reduce - the global object can be used as accumulator -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -21,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject()) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject()), true, 'Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject())'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js index 8fc526b305..468d72a27e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduce - undefined passed as thisValue to strict callbackfn flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var innerThisCorrect = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +17,5 @@ function testcase() { return true; } [0].reduce(callbackfn,true); - return innerThisCorrect; - } -runTestCase(testcase); + +assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js index e8a1fd2c08..a3da080eb9 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-4 description: > Array.prototype.reduce - k values are passed in acending numeric order on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2]; var lastIdx = 0; var result = true; @@ -26,6 +23,6 @@ function testcase() { } arr.reduce(callbackfn, 11); - return result && accessed; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js index ebdb2a0133..d0efec527b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-5 description: > Array.prototype.reduce - k values are accessed during each iteration and not prior to starting the loop on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var result = true; var kIndex = []; var called = 0; @@ -32,6 +29,5 @@ function testcase() { [11, 12, 13, 14].reduce(callbackfn, 1); - return result && called === 4; - } -runTestCase(testcase); +assert(result, 'result !== true'); +assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js index cb50d526c8..1c3956cca4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-8 description: > Array.prototype.reduce - element changed by callbackfn on previous iterations is observed -includes: [runTestCase.js] ---*/ -function testcase() { - var result = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -25,6 +22,5 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 2 }; Array.prototype.reduce.call(obj, callbackfn, 1); - return result; - } -runTestCase(testcase); + +assert(result, 'result !== true'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js index 84ad5fcc2a..58824ccf57 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js @@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-9 description: > Array.prototype.reduce - callbackfn is called with 0 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn() { called++; } [11, 12].reduce(callbackfn, 1); - return 2 === called; - } -runTestCase(testcase); + +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-1.js index f914b6a16e..1613735e85 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.22-0-1 description: Array.prototype.reduceRight must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.reduceRight; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-2.js index 5b95666576..21322d512d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.22-0-2 description: Array.prototype.reduceRight.length must be 1 -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.reduceRight.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.length, 1, 'Array.prototype.reduceRight.length'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js index f768d03c49..3d6a69d735 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-11.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-11 description: Array.prototype.reduceRight applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Date(); obj.length = 1; obj[0] = 1; @@ -19,6 +16,5 @@ function testcase() { return obj instanceof Date; } - return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 1), 'Array.prototype.reduceRight.call(obj, callbackfn, 1) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js index 5b2d15b994..531dfb8597 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-12.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-12 description: Array.prototype.reduceRight applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new RegExp(); obj.length = 1; obj[0] = 1; @@ -19,6 +16,5 @@ function testcase() { return o instanceof RegExp; } - return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 1), 'Array.prototype.reduceRight.call(obj, callbackfn, 1) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js index 1e3ef17dea..1c65e3fa60 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-14 description: Array.prototype.reduceRight applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Error(); obj.length = 1; obj[0] = 1; @@ -19,6 +16,5 @@ function testcase() { return o instanceof Error; } - return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 1), 'Array.prototype.reduceRight.call(obj, callbackfn, 1) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js index c0c1c36552..bfe6aa0dab 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-15.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-15 description: Array.prototype.reduceRight applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { return arguments; }("a", "b")); - return Array.prototype.reduceRight.call(obj, callbackfn, "a") && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, "a"), 'Array.prototype.reduceRight.call(obj, callbackfn, "a") !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js index 2403400861..1a639b1e20 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-4 description: Array.prototype.reduceRight applied to Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Boolean(true); obj.length = 2; obj[0] = 11; @@ -20,6 +17,5 @@ function testcase() { return obj instanceof Boolean; } - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js index d5334eb3a9..91c02f09ca 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-6.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-6 description: Array.prototype.reduceRight applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new Number(-128); obj.length = 2; obj[0] = 11; @@ -20,6 +17,5 @@ function testcase() { return o instanceof Number; } - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js index 417e0e8a3d..d23acbedc2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-7.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-7 description: Array.prototype.reduceRight applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -16,6 +13,5 @@ function testcase() { return obj instanceof String; } - return Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h") && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h"), 'Array.prototype.reduceRight.call("hello\nworld\\!", callbackfn, "h") !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js index 6fa8455730..1650a9de10 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-8.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-8 description: Array.prototype.reduceRight applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = new String("hello\nworld\\!"); var accessed = false; @@ -17,6 +14,5 @@ function testcase() { return o instanceof String; } - return Array.prototype.reduceRight.call(obj, callbackfn, "h") && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, "h"), 'Array.prototype.reduceRight.call(obj, callbackfn, "h") !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js index 61ff346e10..79784772b5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-1-9.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-1-9 description: Array.prototype.reduceRight applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = function (a, b) { return a + b; }; @@ -21,6 +18,5 @@ function testcase() { return o instanceof Function; } - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js index 475c44bc71..d458395b04 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-1.js @@ -6,25 +6,17 @@ es5id: 15.4.4.22-10-1 description: > Array.prototype.reduceRight doesn't mutate the Array on which it is called on -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return 1; } var srcArr = [1,2,3,4,5]; srcArr.reduceRight(callbackfn); - if(srcArr[0] === 1 && - srcArr[1] === 2 && - srcArr[2] === 3 && - srcArr[3] === 4 && - srcArr[4] === 5) - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(srcArr[0], 1, 'srcArr[0]'); +assert.sameValue(srcArr[1], 2, 'srcArr[1]'); +assert.sameValue(srcArr[2], 3, 'srcArr[2]'); +assert.sameValue(srcArr[3], 4, 'srcArr[3]'); +assert.sameValue(srcArr[4], 5, 'srcArr[4]'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js index b8a31890f1..024efedac2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-2.js @@ -6,20 +6,12 @@ es5id: 15.4.4.22-10-2 description: > Array.prototype.reduceRight reduces array in descending order of indices -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return prevVal + curVal; } var srcArr = ['1','2','3','4','5']; - if(srcArr.reduceRight(callbackfn) === '54321') - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(srcArr.reduceRight(callbackfn), '54321', 'srcArr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js index a0b39bbdc3..906e06b920 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-3.js @@ -4,16 +4,12 @@ /*--- es5id: 15.4.4.22-10-3 description: Array.prototype.reduceRight - subclassed array with length 1 -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = [1]; function foo() {} var f = new foo(); function cb(){} - if(f.reduceRight(cb) === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduceRight(cb), 1, 'f.reduceRight(cb)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js index 0ac2a1f0b6..23d5cd9b0e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-4.js @@ -6,16 +6,12 @@ es5id: 15.4.4.22-10-4 description: > Array.prototype.reduceRight - subclassed array with length more than 1 -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(0, 1, 2, 3); function foo() {} var f = new foo(); function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduceRight(cb) === 6) - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduceRight(cb), 6, 'f.reduceRight(cb)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js index 1e573abce8..d6368c59d5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-5.js @@ -6,20 +6,12 @@ es5id: 15.4.4.22-10-5 description: > Array.prototype.reduceRight reduces array in descending order of indices(initialvalue present) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { return prevVal + curVal; } var srcArr = ['1','2','3','4','5']; - if(srcArr.reduceRight(callbackfn,'6') === '654321') - { - return true; - } - } -runTestCase(testcase); +assert.sameValue(srcArr.reduceRight(callbackfn,'6'), '654321', 'srcArr.reduceRight(callbackfn,"6")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js index cbac727f45..6d1c112379 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-6.js @@ -6,16 +6,12 @@ es5id: 15.4.4.22-10-6 description: > Array.prototype.reduceRight - subclassed array when initialvalue provided -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(0, 1, 2, 3); function foo() {} var f = new foo(); function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduceRight(cb,"4") === "43210") - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduceRight(cb,"4"), "43210", 'f.reduceRight(cb,"4")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js index eee28a289d..68fc333195 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-7.js @@ -6,16 +6,12 @@ es5id: 15.4.4.22-10-7 description: > Array.prototype.reduceRight - subclassed array when length to 1 and initialvalue provided -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = [1]; function foo() {} var f = new foo(); function cb(prevVal, curVal, idx, obj){return prevVal + curVal;} - if(f.reduceRight(cb,"4") === "41") - return true; - } -runTestCase(testcase); + +assert.sameValue(f.reduceRight(cb,"4"), "41", 'f.reduceRight(cb,"4")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js index 5730cf9505..7abfbb823b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-10-8.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-10-8 description: Array.prototype.reduceRight doesn't visit expandos -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,10 +17,4 @@ function testcase() { srcArr.reduceRight(callbackfn); - if(callCnt == 4) - { - return true; - } - - } -runTestCase(testcase); +assert.sameValue(callCnt, 4, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js index 052f795dcb..cb5037697d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-1 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var obj = { 0: 12, @@ -24,6 +21,5 @@ function testcase() { return obj.length === 2; } - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js index fe847a1ec3..75c3c1b79c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-10 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var Con = function () { }; @@ -37,6 +34,5 @@ function testcase() { child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn, 11), 'Array.prototype.reduceRight.call(child, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js index b6eed8c81b..73e619df97 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-11 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,5 @@ function testcase() { configurable: true }); - return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 111), 111, 'Array.prototype.reduceRight.call(obj, callbackfn, 111)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js index 198db20e9d..ccd5f56f73 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-13 description: > Array.prototype.reduceRight applied to the Array-like object that 'length' is inherited accessor property without a get function -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -31,6 +28,5 @@ function testcase() { child[0] = 11; child[1] = 12; - return Array.prototype.reduceRight.call(child, callbackfn, 111) === 111 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(child, callbackfn, 111), 111, 'Array.prototype.reduceRight.call(child, callbackfn, 111)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js index 764950ced9..b07a6de91c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-14 description: > Array.prototype.reduceRight applied to the Array-like object that 'length' property doesn't exist -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, 1: 12 }; var accessed = false; @@ -19,6 +16,5 @@ function testcase() { return curVal > 10; } - return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 111), 111, 'Array.prototype.reduceRight.call(obj, callbackfn, 111)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js index 79f11b3949..a3e0221c94 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-17 description: > Array.prototype.reduceRight applied to the Arguments object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var arg; var accessed = false; @@ -24,6 +21,5 @@ function testcase() { return Array.prototype.reduceRight.call(arguments, callbackfn, 11); }; - return func(12, 11) && accessed; - } -runTestCase(testcase); +assert(func(12, 11), 'func(12, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js index 14803ecd3a..5df51113a8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-19 description: > Array.prototype.reduceRight applied to Function object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var fun = function (a, b) { return a + b; @@ -24,6 +21,5 @@ function testcase() { return obj.length === 2; } - return Array.prototype.reduceRight.call(fun, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(fun, callbackfn, 11), 'Array.prototype.reduceRight.call(fun, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js index 2dbfe579e6..210099b9e6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-2 description: > Array.prototype.reduceRight - 'length' is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return obj.length === 2; } - return [12, 11].reduceRight(callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert([12, 11].reduceRight(callbackfn, 11), '[12, 11].reduceRight(callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js index 717fe7466c..8db6d7d97f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-3 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = true; function callbackfn(prevVal, curVal, idx, obj) { @@ -29,6 +26,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn), 'Array.prototype.reduceRight.call(child, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js index 10c05bdd2f..4a5c6a06f8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -39,6 +36,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn), 'Array.prototype.reduceRight.call(child, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js index 8a12b9cb3b..bfd55e5b0b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-6 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var proto = { length: 2 }; var Con = function () { }; @@ -26,6 +23,5 @@ function testcase() { return obj.length === 2; } - return Array.prototype.reduceRight.call(child, callbackfn1, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn1, 11), 'Array.prototype.reduceRight.call(child, callbackfn1, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js index e0ee6f7642..92fb53708d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-2-7 description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = true; var obj = {}; obj[0] = 12; @@ -29,6 +26,5 @@ function testcase() { configurable: true }); - return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(obj, callbackfn, 11), 'Array.prototype.reduceRight.call(obj, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js index 962edb7cda..3b27ced48e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-8.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -37,6 +34,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn, 11), 'Array.prototype.reduceRight.call(child, callbackfn, 11) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js index f5c121525f..d76e880b48 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-2-9.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn1(prevVal, curVal, idx, obj) { @@ -41,6 +38,5 @@ function testcase() { child[1] = 11; child[2] = 9; - return Array.prototype.reduceRight.call(child, callbackfn1, 111) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.reduceRight.call(child, callbackfn1, 111), 'Array.prototype.reduceRight.call(child, callbackfn1, 111) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js index 76f1b67675..6b77d18661 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-3-1 description: Array.prototype.reduceRight - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 9, length: undefined }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js index 0e5d728991..26880df418 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-10 description: > Array.prototype.reduceRight - value of 'length' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: NaN }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js index aaaf3ff6bf..d51815e91d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-11 description: > Array.prototype.reduceRight - value of 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "2" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js index 7ef635a545..4db2dbc3b0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-12 description: > Array.prototype.reduceRight - value of 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 11, 1: 12, 2: 9, length: "-4294967294" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && !testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert.sameValue(testResult2, false, 'testResult2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js index 220c7cf4bc..ef58e583ce 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-13 description: > Array.prototype.reduceRight - value of 'length' is a string containing a decimal number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "2.5" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js index d96fa4f74a..d02dc0c293 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-14 description: > Array.prototype.reduceRight - value of 'length' is a string containing -Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed2 = false; function callbackfn2(prevVal, curVal, idx, obj) { @@ -19,7 +16,5 @@ function testcase() { var obj2 = { 0: 9, length: "-Infinity" }; - return Array.prototype.reduceRight.call(obj2, callbackfn2, 2) === 2 && - !accessed2; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj2, callbackfn2, 2), 2, 'Array.prototype.reduceRight.call(obj2, callbackfn2, 2)'); +assert.sameValue(accessed2, false, 'accessed2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js index f00c19fad1..42031b3830 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-15 description: > Array.prototype.reduceRight - value of 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "2E0" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js index 535a258a33..90a64372f7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-16 description: > Array.prototype.reduceRight - value of 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "0x0002" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js index fc3e7a6a6a..1274b3e05f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-17 description: > Array.prototype.reduceRight - value of 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: "0002.00" }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js index 815efbfa35..5830006354 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-18 description: > Array.prototype.reduceRight - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, 1: 8, length: "two" }; - return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 11), 11, 'Array.prototype.reduceRight.call(obj, callbackfn, 11)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js index 4b60d8a60f..26e76ad646 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-19.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-19 description: > Array.prototype.reduceRight - value of 'length' is an object which has an own toString method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -44,6 +41,7 @@ function testcase() { // resulting string to a number. Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && toStringAccessed; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); +assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js index e4edc8df68..a7bbc28ad3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-2 description: > Array.prototype.reduceRight applied to an Array-like object, 'length' is 0 (length overridden to false(type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(preVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: false }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js index 8dbef1c07a..3ef3882a72 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-20 description: > Array.prototype.reduceRight - value of 'length' is an Object which has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -39,6 +36,7 @@ function testcase() { }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && valueOfAccessed; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js index 8f28247bcb..279afa06dd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-21.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -45,6 +42,8 @@ function testcase() { }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js index 8d5a1dcb3c..29afac626d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-23.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; var valueOfAccessed = false; @@ -51,6 +48,8 @@ function testcase() { }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2 && valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js index 63c6dc7cc4..3c1b823c19 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-24 description: > Array.prototype.reduceRight - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js index 3cfce6379c..7622c9d2c8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-25.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-25 description: > Array.prototype.reduceRight - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -32,6 +29,6 @@ function testcase() { }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && !testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert.sameValue(testResult2, false, 'testResult2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js index 142a862c74..4a17ebd34e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-3 description: > Array.prototype.reduceRight - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: 0 }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js index 030d8a606a..d0b2df74e9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-4 description: > Array.prototype.reduceRight - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: +0 }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js index aa338f40a3..1b3fe25fb5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-5 description: > Array.prototype.reduceRight - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(preVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: -0 }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js index b1c732cd07..318bfcda3a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-6 description: > Array.prototype.reduceRight - value of 'length' is a number (value is positive) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 1: 11, 2: 9, length: 2 }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert(testResult2, 'testResult2 !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js index 204c9660f7..56efb02617 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-7 description: > Array.prototype.reduceRight - value of 'length' is a number (value is negative) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult1 = true; var testResult2 = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -27,6 +24,6 @@ function testcase() { var obj = { 1: 11, 2: 9, length: -4294967294 }; Array.prototype.reduceRight.call(obj, callbackfn, 1); - return testResult1 && !testResult2; - } -runTestCase(testcase); + +assert(testResult1, 'testResult1 !== true'); +assert.sameValue(testResult2, false, 'testResult2'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js index 4dc2197b5f..1134e4396d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-3-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-3-9 description: > Array.prototype.reduceRight - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 9, length: -Infinity }; - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), 1, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js index b517a8a773..19fc59d5e7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-4-12.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.22-4-12 description: Array.prototype.reduceRight - 'callbackfn' is a function -includes: [runTestCase.js] ---*/ -function testcase() { - var initialValue = 0; function callbackfn(accum, val, idx, obj) { accum += val; return accum; } - return 20 === [11, 9].reduceRight(callbackfn, initialValue); - } -runTestCase(testcase); +assert.sameValue([11, 9].reduceRight(callbackfn, initialValue), 20, '[11, 9].reduceRight(callbackfn, initialValue)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js index f891552882..2b2f6782cc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-8-b-2 description: > Array.prototype.reduceRight - modifications to length don't change number of iterations in step 9 -includes: [runTestCase.js] ---*/ -function testcase() { var called = 0; function callbackfn(prevVal, curVal, idx, obj) { called++; @@ -27,6 +25,5 @@ function testcase() { var preVal = arr.reduceRight(callbackfn); - return preVal === 11 && called === 2; - } -runTestCase(testcase); +assert.sameValue(preVal, 11, 'preVal'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js index 8ca284eca1..27917b2189 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-3 description: > Array.prototype.reduceRight - while loop is breaken once 'kPresent' is true -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; var testResult = false; var firstCalled = 0; @@ -43,6 +40,6 @@ function testcase() { arr.reduceRight(callbackfn); - return testResult && firstCalled === 1 && secondCalled === 1; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert.sameValue(firstCalled, 1, 'firstCalled'); +assert.sameValue(secondCalled, 1, 'secondCalled'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js index b1e9f1eb67..e1481c6389 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-ii-1 description: > Array.prototype.reduceRight - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = {}; function callbackfn(prevVal, curVal, idx, obj) { } @@ -23,6 +20,4 @@ function testcase() { configurable: true }); - return Array.prototype.reduceRight.call(obj, callbackfn) === "accumulator"; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn), "accumulator", 'Array.prototype.reduceRight.call(obj, callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js index ecfcefef93..3f62c08179 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-1 description: > Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -21,6 +18,5 @@ function testcase() { var obj = { 0: 0, 1: 1, length: 2 }; Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js index d93f4bc612..5a7966fb00 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-10.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-10 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 2) { @@ -27,6 +25,5 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js index 88bd387c4d..92443108d1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js index d07dce72a3..4fbbe43431 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-13.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -42,6 +39,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js index 1acfd62d6c..41c5bfd933 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-15 description: > Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -34,6 +31,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js index 17f4934078..9caa8138d8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-17 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,6 +23,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js index 24b897f6a4..a1812f67b6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-18 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,7 +23,5 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js index 736575450a..343b2ebc4b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-2 description: > Array.prototype.reduceRight - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -21,6 +18,5 @@ function testcase() { var arr = [0, 1, 2]; arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js index 315b62b471..0e30a4fc88 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-21 description: > Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -32,7 +29,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js index b6b05d57c3..02301c4f29 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js index 23f2f3c5a5..e9cd815639 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1, 2); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js index 6d66107441..b6d6dea677 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 2) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js index 581113bbb2..273109839e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-28 description: > Array.prototype.reduceRight applied to String object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -21,7 +18,5 @@ function testcase() { var str = new String("012"); Array.prototype.reduceRight.call(str, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js index 27daefa67f..57e342b465 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-29 description: > Array.prototype.reduceRight applied to Function object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -27,7 +24,5 @@ function testcase() { obj[2] = 2; Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js index 935260a5b6..45bb7057c5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-3.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -29,7 +26,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js index d6b13e9193..3b9ebd101f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-30.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-30 description: > Array.prototype.reduceRight - element changed by getter on current iteration is observed in subsequent iterations on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -40,6 +38,5 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js index 8cf6b99579..ddc4f8150e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-31.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-31 description: > Array.prototype.reduceRight - element changed by getter on current iteration is observed subsequetly on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -40,6 +38,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js index 17bcc4d6fc..9f199971b6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -41,6 +38,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js index dcf654c1a7..17342b7ef6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-7 description: > Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -25,6 +22,5 @@ function testcase() { var child = new Con(); Array.prototype.reduceRight.call(child, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js index ad91ba7eaa..410109c09d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-iii-1-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-iii-1-9 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -27,7 +24,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js index 82a10b124c..eaa7fb6944 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-1.js @@ -8,10 +8,8 @@ description: > index is larger than array original length added to array after it is called, consider new elements which index is smaller than array length -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { arr[5] = 6; arr[2] = 3; @@ -19,6 +17,5 @@ function testcase() { } var arr = ['1', 2, , 4, '5']; - return arr.reduceRight(callbackfn) === "54321"; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), "54321", 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js index 88de693296..f45416de0a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-2 description: > Array.prototype.reduceRight considers new value of elements in array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { arr[3] = -2; @@ -19,8 +16,5 @@ function testcase() { } var arr = [1,2,3,4,5]; - if(arr.reduceRight(callbackfn) === 13) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), 13, 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js index 7e4f033ad2..232d471c72 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-4 description: > Array.prototype.reduceRight doesn't consider unvisited deleted elements when Array.length is decreased -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { arr.length = 2; @@ -18,8 +15,5 @@ function testcase() { } var arr = [1,2,3,4,5]; - if(arr.reduceRight(callbackfn) === 12 ) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), 12, 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js index 1dd88b4c41..3675b30e3e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-5 description: > Array.prototype.reduceRight - callbackfn not called for array with one element -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,7 +16,6 @@ function testcase() { } var arr = [1]; - if(arr.reduceRight(callbackfn) === 1 && callCnt === 0 ) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), 1, 'arr.reduceRight(callbackfn)'); +assert.sameValue(callCnt, 0, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js index a7f6135c4a..470db318fd 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-9-7 description: > Array.prototype.reduceRight not affect call when the array is deleted during the call -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(prevVal, curVal, idx, obj) { delete o.arr; return prevVal + curVal; @@ -17,6 +15,6 @@ function testcase() { var o = new Object(); o.arr = ['1', 2, 3, 4, 5]; - return o.arr.reduceRight(callbackfn) === "141" && !o.hasOwnProperty("arr"); - } -runTestCase(testcase); + +assert.sameValue(o.arr.reduceRight(callbackfn), "141", 'o.arr.reduceRight(callbackfn)'); +assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js index 3cc2181848..8bc875112c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-8 description: > Array.prototype.reduceRight - no observable effects occur if 'len' is 0 -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn() { accessed = true; @@ -27,6 +24,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, function () { }, "initialValue"); - return !accessed; - } -runTestCase(testcase); + +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js index ad3fa72ae9..df3e4ba84d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-9-9 description: > Array.prototype.reduceRight - modifications to length will change number of iterations -includes: [runTestCase.js] ---*/ -function testcase() { var called = 0; function callbackfn(preVal, val, idx, obj) { called++; @@ -25,6 +23,4 @@ function testcase() { arr.reduceRight(callbackfn, "initialValue"); - return called === 3; - } -runTestCase(testcase); +assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js index 3879bbd99a..992aa21bae 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-1.js @@ -6,18 +6,13 @@ es5id: 15.4.4.22-9-b-1 description: > Array.prototype.reduceRight returns initialvalue when Array is empty and initialValue is not present -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { } var arr = new Array(10); - if(arr.reduceRight(callbackfn,5) === 5) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn,5), 5, 'arr.reduceRight(callbackfn,5)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js index cdfe5e12f4..be41b73382 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-14 description: > Array.prototype.reduceRight - decreasing length of array in step 8 causes deleted index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { arr.reduceRight(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js index a2f3a8c647..091eb3661e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-16.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - decreasing length of array in step 8 does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -39,6 +36,4 @@ function testcase() { arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js index a2ca32f32b..96fff8c1f4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-17 description: > Array.prototype.reduceRight - properties added into own object are visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js index 4ab07d3c6d..1dd28c06f9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-18 description: > Array.prototype.reduceRight - properties added into own object are visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js index 716e50d75e..67b5ecf3ba 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-2 description: > Array.prototype.reduceRight - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -31,6 +28,4 @@ function testcase() { Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js index 77a29148b2..3fb93ba783 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-21 description: > Array.prototype.reduceRight - deleting own property causes deleted index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js index 5957f5538d..d46554ee2c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-22 description: > Array.prototype.reduceRight - deleting own property causes deleted index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js index 53ccc551bd..d31df75af4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-27.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-27 description: > Array.prototype.reduceRight - decreasing length of array causes deleted index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { arr.reduceRight(callbackfn, "initialValue"); - return testResult && accessed; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js index d3c94f0027..05f5fa817d 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-29.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - decreasing length of array does not delete non-configurable properties flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -39,6 +36,4 @@ function testcase() { arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js index 4d33577284..63fdfed8a2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-3 description: > Array.prototype.reduceRight - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -33,6 +30,5 @@ function testcase() { Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return accessed && testResult; - } -runTestCase(testcase); +assert(accessed, 'accessed !== true'); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js index 986b88087c..3388f8df67 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-4 description: > Array.prototype.reduceRight - properties added into own object in step 8 can be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(preVal, curVal, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js index ee279141b3..4efb966402 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-5 description: > Array.prototype.reduceRight - properties added into own object in step 8 can be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(preVal, curVal, idx, obj) { @@ -35,6 +32,5 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js index d797f922f9..eee9c4bb02 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-8.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - deleting own property in step 8 causes deleted index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -40,6 +37,6 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js index 68109d4142..6735bc22e7 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-b-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-b-9 description: > Array.prototype.reduceRight - deleting own property in step 8 causes deleted index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var testResult = true; @@ -39,6 +36,6 @@ function testcase() { }); arr.reduceRight(callbackfn); - return testResult && accessed; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js index bcf5d05845..d9a79fecba 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-1 description: > Array.prototype.reduceRight - callbackfn not called for indexes never been assigned values -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,7 +17,6 @@ function testcase() { var arr = new Array(10); arr[0] = arr[1] = undefined; //explicitly assigning a value - if( arr.reduceRight(callbackfn) === undefined && callCnt === 1) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), undefined, 'arr.reduceRight(callbackfn)'); +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js index 65588b49a4..bb0198b254 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-1 description: > Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 0, 1: 1, 2: 2, length: 2 }; Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js index a7955ab896..9cda207713 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-10 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -28,6 +25,5 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js index d73974d804..893586207a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -35,6 +32,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js index 7226702566..67fce87691 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-13.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -42,6 +39,5 @@ function testcase() { }); Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js index 5a8d7d2cdb..52c6a0e5c1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-15 description: > Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -34,6 +31,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js index ab3e804680..d7729f5452 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-17 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,6 +23,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js index 5abc6ddb42..8817803b70 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-18 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,7 +23,5 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult; - - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js index a93f683d7d..199238300e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-2 description: > Array.prototype.reduceRight - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -20,6 +17,5 @@ function testcase() { var arr = [0, 1, 2]; arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js index add4fb71e6..19bdc79e88 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-21 description: > Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -32,8 +29,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js index 9ae20dd8a4..84ff5ae5e1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js index ba1307f396..865581ff96 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 2) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1, 2); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js index 55937d3b93..51beff0047 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 3) { @@ -24,6 +21,5 @@ function testcase() { }; func(0, 1, 2, 3); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js index c082b853cb..9a4b836233 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-28 description: > Array.prototype.reduceRight applied to String object, which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -20,7 +17,5 @@ function testcase() { var str = new String("012"); Array.prototype.reduceRight.call(str, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js index cc0154be82..3d7644227f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-29 description: > Array.prototype.reduceRight applied to Function object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var initialValue = 0; function callbackfn(prevVal, curVal, idx, obj) { @@ -28,6 +25,5 @@ function testcase() { obj[3] = 3; Array.prototype.reduceRight.call(obj, callbackfn, initialValue); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js index 50f3852642..8d23d06ad3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-3.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -29,7 +26,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js index 0e506efe4a..daafd5efbe 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-30.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-30 description: > Array.prototype.reduceRight - element changed by getter on previous iterations is observed on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -41,6 +38,5 @@ function testcase() { }); arr.reduceRight(callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js index 77d15615d1..6c43d5a655 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-31.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-31 description: > Array.prototype.reduceRight - element changed by getter on previous iterations is observed on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -41,7 +38,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js index 84991dc580..4eac8d609f 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 0) { @@ -40,6 +37,5 @@ function testcase() { child[1] = "1"; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js index 56e134c9b7..4a2962f614 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-7 description: > Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -26,6 +23,5 @@ function testcase() { child.length = 3; Array.prototype.reduceRight.call(child, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); + +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js index 9ba7519297..fd41b95a26 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-i-9 description: > Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { if (idx === 1) { @@ -27,7 +24,5 @@ function testcase() { }); Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js index c8f33da1ab..4e00f79f19 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-1 description: > Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue not passed) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(prevVal, curVal, idx, obj) { if(idx+1 < obj.length && obj[idx] === curVal && obj[idx+1] === prevVal) @@ -20,7 +17,5 @@ function testcase() { } var arr = [0,1,true,null,new Object(),"five"]; - if( arr.reduceRight(callbackfn) === 0) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn), 0, 'arr.reduceRight(callbackfn)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js index 4e05b457bf..2edd35e221 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-10 description: > Array.prototype.reduceRight - callbackfn is called with 1 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(prevVal) { @@ -18,6 +15,5 @@ function testcase() { return prevVal; } - return [11, 12].reduceRight(callbackfn, 100) === 100 && 2 === called; - } -runTestCase(testcase); +assert.sameValue([11, 12].reduceRight(callbackfn, 100), 100, '[11, 12].reduceRight(callbackfn, 100)'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js index 412717055e..c73421a5f0 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-11 description: > Array.prototype.reduceRight - callbackfn is called with 2 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal) { @@ -20,6 +17,5 @@ function testcase() { return curVal > 10; } - return [11].reduceRight(callbackfn, 100) === true && testResult; - } -runTestCase(testcase); +assert.sameValue([11].reduceRight(callbackfn, 100), true, '[11].reduceRight(callbackfn, 100)'); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js index e73aff9ac0..6f79a51ad3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-12 description: > Array.prototype.reduceRight - callbackfn is called with 3 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; var arr = [11, 12, 13]; var initVal = 6.99; @@ -22,6 +19,5 @@ function testcase() { return curVal > 10 && arguments[3][idx] === curVal; } - return arr.reduceRight(callbackfn, initVal) === true && testResult; - } -runTestCase(testcase); +assert.sameValue(arr.reduceRight(callbackfn, initVal), true, 'arr.reduceRight(callbackfn, initVal)'); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js index 4ff0a054b6..e667c25a72 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-13 description: > Array.prototype.reduceRight - callbackfn is called with 4 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [11, 12, 13]; var initVal = 6.99; var testResult = false; @@ -22,6 +19,5 @@ function testcase() { return curVal > 10 && obj[idx] === curVal; } - return arr.reduceRight(callbackfn, initVal) === true && testResult; - } -runTestCase(testcase); +assert.sameValue(arr.reduceRight(callbackfn, initVal), true, 'arr.reduceRight(callbackfn, initVal)'); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js index 4aa8692f7c..97fc6ed617 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-14.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.22-9-c-ii-14 description: Array.prototype.reduceRight - callbackfn uses arguments -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return arguments[0] === 100 && arguments[3][arguments[2]] === arguments[1]; } - return [11].reduceRight(callbackfn, 100) === true; - } -runTestCase(testcase); +assert.sameValue([11].reduceRight(callbackfn, 100), true, '[11].reduceRight(callbackfn, 100)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js index 8b65dd94b8..1f549796b3 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-16.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-16 description: > Array.prototype.reduceRight - non-indexed properties are not called on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var testResult = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -21,6 +18,5 @@ function testcase() { var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 }; Array.prototype.reduceRight.call(obj, callbackfn, "initialValue"); - return !testResult; - } -runTestCase(testcase); + +assert.sameValue(testResult, false, 'testResult'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js index ca51f94137..9c476f63e8 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-17 description: > Array.prototype.reduceRight - 'accumulator' used for current iteration is the result of previous iteration on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [11, 12, 13]; var testResult = true; var initVal = 6.99; @@ -26,6 +23,4 @@ function testcase() { arr.reduceRight(callbackfn, initVal); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js index 9821125609..ead8d933cc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-18.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - 'accumulator' used for first iteration is the value of 'initialValue' when it is present on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [11, 12]; var testResult = false; var initVal = 6.99; @@ -25,6 +22,4 @@ function testcase() { arr.reduceRight(callbackfn, initVal); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js index 79ede14ee7..3fa2509245 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-19.js @@ -7,11 +7,8 @@ description: > Array.prototype.reduceRight - value of 'accumulator' used for first iteration is the value of max index property which is not undefined when 'initialValue' is not present on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [11, 12, 13]; var testResult = false; @@ -23,6 +20,4 @@ function testcase() { } arr.reduceRight(callbackfn); - return testResult; - } -runTestCase(testcase); +assert(testResult, 'testResult !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js index 49017251a1..b794ced025 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-9-c-ii-2 description: > Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue passed) -includes: [runTestCase.js] ---*/ -function testcase() { var bParCorrect = false; var arr = [0, 1, true, null, new Object(), "five"]; var initialValue = 5.5; @@ -22,6 +20,5 @@ function testcase() { else return false; } - return arr.reduceRight(callbackfn, initialValue) === 0; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn, initialValue), 0, 'arr.reduceRight(callbackfn, initialValue)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js index e3e1c76027..d0b5284e45 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-20.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-9-c-ii-20 description: Array.prototype.reduceRight - undefined can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, undefined) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, undefined), true, 'Array.prototype.reduceRight.call(obj, callbackfn, undefined)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js index c15d607ef1..e1b4834265 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-21.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-9-c-ii-21 description: Array.prototype.reduceRight - null can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, null) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, null), true, 'Array.prototype.reduceRight.call(obj, callbackfn, null)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js index 3f164b0200..f3455c6c63 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-22 description: > Array.prototype.reduceRight - boolean primitive can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, false) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, false), true, 'Array.prototype.reduceRight.call(obj, callbackfn, false)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js index 6819cd576c..d083889704 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-23.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-23 description: > Array.prototype.reduceRight - number primitive can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, 12) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 12), true, 'Array.prototype.reduceRight.call(obj, callbackfn, 12)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js index 3a4bc24841..004bd3036a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-24.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-24 description: > Array.prototype.reduceRight - string primitive can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, "hello_") === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, "hello_"), true, 'Array.prototype.reduceRight.call(obj, callbackfn, "hello_")'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js index 6d66283abc..e05a52ac23 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-25.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-25 description: > Array.prototype.reduceRight - Function Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objFunction = function () { }; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objFunction) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objFunction), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objFunction)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js index 3b655e8de7..e698c3e1d9 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-26.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-26 description: > Array.prototype.reduceRight - Array Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objArray = []; function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objArray) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objArray), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objArray)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js index 6c79e74354..1360396fed 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-27.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-27 description: > Array.prototype.reduceRight - String Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objString = new String(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objString) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objString), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objString)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js index cea9bfd3cd..7ea32fc865 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-28 description: > Array.prototype.reduceRight - Boolean Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objBoolean = new Boolean(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objBoolean) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objBoolean), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objBoolean)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js index f8474cdd09..d1c4a4f62c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-29 description: > Array.prototype.reduceRight - Number Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objNumber = new Number(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objNumber) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objNumber), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objNumber)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js index aa6dc8135c..02547b474b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-3.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-9-c-ii-3 description: Array.prototype.reduceRight - callbackfn takes 4 arguments -includes: [runTestCase.js] ---*/ -function testcase() { - var bCalled = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,7 +16,6 @@ function testcase() { return false; } var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.reduceRight(callbackfn,true) === true && bCalled === true) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.reduceRight(callbackfn,true), true, 'arr.reduceRight(callbackfn,true)'); +assert.sameValue(bCalled, true, 'bCalled'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js index abe7bec838..be1537a764 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-30.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-30 description: > Array.prototype.reduceRight - the Math Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -19,6 +16,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, Math) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, Math), true, 'Array.prototype.reduceRight.call(obj, callbackfn, Math)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js index 8e994aaeb9..e23fb04374 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-31.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-31 description: > Array.prototype.reduceRight - Date Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objDate = new Date(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objDate) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objDate), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objDate)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js index ad127bf8a3..f37b1de713 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-32.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-32 description: > Array.prototype.reduceRight - RegExp Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objRegExp = new RegExp(); function callbackfn(prevVal, curVal, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objRegExp) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objRegExp), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objRegExp)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js index 7315186644..43a59ec997 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-33.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.22-9-c-ii-33 description: Array.prototype.reduceRight - the JSON can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -17,6 +14,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, JSON) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, JSON), true, 'Array.prototype.reduceRight.call(obj, callbackfn, JSON)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js index 93e5d7551f..4d3d9fa0e5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-34.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-34 description: > Array.prototype.reduceRight - Error Object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var objError = new RangeError(); function callbackfn(prevVal, curVal, idx, obj) { @@ -21,6 +18,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, objError) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, objError), true, 'Array.prototype.reduceRight.call(obj, callbackfn, objError)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js index 4103b09c6f..1c58b3f921 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-35.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-35 description: > Array.prototype.reduceRight - the Arguments object can be used as accumulator -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var arg; @@ -25,6 +22,5 @@ function testcase() { arg = arguments; }(10, 11, 12, 13)); - return Array.prototype.reduceRight.call(obj, callbackfn, arg) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, arg), true, 'Array.prototype.reduceRight.call(obj, callbackfn, arg)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js index a13cf668d7..6eecc246ba 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-37.js @@ -6,13 +6,9 @@ es5id: 15.4.4.22-9-c-ii-37 description: > Array.prototype.reduceRight - the global object can be used as accumulator -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(prevVal, curVal, idx, obj) { accessed = true; @@ -21,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 1 }; - return Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject()) === true && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject()), true, 'Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject())'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js index b446ff6ed3..93c4a012c5 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4-s.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduceRight - undefined passed as thisValue to strict callbackfn flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { var innerThisCorrect = false; function callbackfn(prevVal, curVal, idx, obj) { @@ -19,6 +17,5 @@ function testcase() { return true; } [0].reduceRight(callbackfn,true); - return innerThisCorrect; - } -runTestCase(testcase); + +assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js index 852f6336c7..3057e56890 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-4 description: > Array.prototype.reduceRight - k values are passed in acending numeric order -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3, 4, 5]; var lastIdx = arr.length - 1; var accessed = false; @@ -25,6 +22,6 @@ function testcase() { } } arr.reduceRight(callbackfn, 1); - return result && accessed; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js index 426b0e01c7..226eb812a1 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.22-9-c-ii-5 description: > Array.prototype.reduceRight - k values are accessed during each iteration and not prior to starting the loop on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var arr = [11, 12, 13, 14]; var kIndex = []; var result = true; @@ -31,6 +29,6 @@ function testcase() { } arr.reduceRight(callbackfn, 1); - return result && called === 4; - } -runTestCase(testcase); + +assert(result, 'result !== true'); +assert.sameValue(called, 4, 'called'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js index c8bf8bd198..0518afbc4c 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-8 description: > Array.prototype.reduceRight - element changed by callbackfn on previous iterations is observed -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; var obj = { 0: 11, 1: 12, length: 2 }; function callbackfn(prevVal, curVal, idx, obj) { @@ -21,6 +18,5 @@ function testcase() { return curVal > 10; } - return Array.prototype.reduceRight.call(obj, callbackfn, 1) === false && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduceRight.call(obj, callbackfn, 1), false, 'Array.prototype.reduceRight.call(obj, callbackfn, 1)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js index 7b3baa65f8..f0d0a11ca4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-9-c-ii-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-9-c-ii-9 description: > Array.prototype.reduceRight - callbackfn is called with 0 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn() { @@ -18,6 +15,5 @@ function testcase() { return true; } - return [11, 12].reduceRight(callbackfn, 11) === true && 2 === called; - } -runTestCase(testcase); +assert.sameValue([11, 12].reduceRight(callbackfn, 11), true, '[11, 12].reduceRight(callbackfn, 11)'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-0-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-0-1.js index 5bc4c44c43..5631376e0f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-0-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-0-1.js @@ -4,13 +4,8 @@ /*--- es5id: 15.4.4.17-0-1 description: Array.prototype.some must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { var f = Array.prototype.some; - if (typeof(f) === "function") { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(typeof(f), "function", 'typeof(f)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-0-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-0-2.js index 3390ade0e1..6d60a2dc4f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-0-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-0-2.js @@ -4,12 +4,6 @@ /*--- es5id: 15.4.4.17-0-2 description: Array.prototype.some.length must be 1 -includes: [runTestCase.js] ---*/ -function testcase() { - if (Array.prototype.some.length === 1) { - return true; - } - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.length, 1, 'Array.prototype.some.length'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-11.js index 19db289e2e..1b2ff04daf 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-11.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-1-11 description: Array.prototype.some applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Date; } @@ -17,6 +15,4 @@ function testcase() { obj[0] = 11; obj[1] = 9; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-12.js index fca4eab7f2..1519bbe50e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-12.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-1-12 description: Array.prototype.some applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof RegExp; } @@ -17,6 +15,4 @@ function testcase() { obj[0] = 11; obj[1] = 9; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-14.js index 101bcbf293..fcaf21b31e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-14.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-1-14 description: Array.prototype.some applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Error; } @@ -16,6 +14,4 @@ function testcase() { obj.length = 1; obj[0] = 1; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-15.js index 1271a0e069..80ac3077eb 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-15.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-1-15 description: Array.prototype.some applied to the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return '[object Arguments]' === Object.prototype.toString.call(obj); } @@ -16,6 +14,4 @@ function testcase() { return arguments; }("a", "b")); - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-4.js index 90860cffd9..dfae54fdd8 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-4.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-1-4 description: Array.prototype.some applied to Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Boolean; } @@ -17,6 +15,4 @@ function testcase() { obj[0] = 11; obj[1] = 9; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-6.js index 1f5488cb63..d2dff83bc4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-1-6 description: Array.prototype.some applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Number; } @@ -17,6 +15,4 @@ function testcase() { obj[0] = 11; obj[1] = 9; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-7.js index 69e72f163e..4160b0f100 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-7.js @@ -4,14 +4,10 @@ /*--- es5id: 15.4.4.17-1-7 description: Array.prototype.some applied to applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof String; } - return Array.prototype.some.call("hello\nw_orld\\!", callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call("hello\nw_orld\\!", callbackfn), 'Array.prototype.some.call("hello\nw_orld\\!", callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-8.js index ac5b875a21..b21980e99f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-8.js @@ -4,15 +4,12 @@ /*--- es5id: 15.4.4.17-1-8 description: Array.prototype.some applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof String; } var obj = new String("hello\nw_orld\\!"); - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); + +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-1-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-1-9.js index 68810cb5e0..ec4681eae3 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-1-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-1-9.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-1-9 description: Array.prototype.some applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { return obj instanceof Function; } @@ -17,6 +15,5 @@ function testcase() { }; obj[0] = 11; obj[1] = 9; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); + +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-1.js index 95e22540d6..c9d1b4d94c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-2-1 description: > Array.prototype.some - 'length' is own data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn1(val, idx, obj) { return val > 10; } @@ -26,7 +23,5 @@ function testcase() { length: 2 }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-10.js index 72770693b7..c0e5373b0c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-10.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-2-10 description: > Array.prototype.some - 'length' is an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -35,7 +33,5 @@ function testcase() { child[1] = 11; child[2] = 12; - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-11.js index 34fdd974cc..834e85fdb6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-2-11 description: > Array.prototype.some - 'length' is an own accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -27,6 +24,5 @@ function testcase() { configurable: true }); - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-13.js index b5e58eecf7..50b9af52af 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-2-13 description: > Array.prototype.some - 'length' is inherited accessor property without a get function on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -31,6 +28,5 @@ function testcase() { child[0] = 11; child[1] = 12; - return !Array.prototype.some.call(child, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(child, callbackfn), false, 'Array.prototype.some.call(child, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-14.js index 0aa12ddc12..9baa1b181f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-14.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-2-14 description: > Array.prototype.some - 'length' property doesn't exist on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, 1: 12 }; - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-17.js index f01c633de0..81a2d8a366 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-17.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-2-17 description: > Array.prototype.some applied to the Arguments object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -24,6 +22,4 @@ function testcase() { !Array.prototype.some.call(arguments, callbackfn2); }; - return func(9, 11); - } -runTestCase(testcase); +assert(func(9, 11), 'func(9, 11) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-19.js index 5bb6771837..0f6dcebf5c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-19.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-2-19 description: > Array.prototype.some applied to Function object which implements its own property get method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -25,7 +23,5 @@ function testcase() { fun[1] = 11; fun[2] = 12; - return Array.prototype.some.call(fun, callbackfn1) && - !Array.prototype.some.call(fun, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(fun, callbackfn1), 'Array.prototype.some.call(fun, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(fun, callbackfn2), false, 'Array.prototype.some.call(fun, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-3.js index 5264bdebf1..aeabcc364e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-2-3 description: > Array.prototype.some - 'length' is an own data property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -29,7 +27,5 @@ function testcase() { child[1] = 11; child[2] = 12; - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-5.js index f96b72e901..d7f7c7a828 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-2-5 description: > Array.prototype.some - 'length' is an own data property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -40,7 +38,5 @@ function testcase() { child[1] = 11; child[2] = 12; - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-6.js index c8068c37f2..3673c6733a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-2-6 description: > Array.prototype.some - 'length' is an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -28,7 +26,5 @@ function testcase() { child[1] = 11; child[2] = 12; - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-7.js index 11f6cbaf2d..2306c70eb2 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-2-7 description: > Array.prototype.some - 'length' is an own accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -31,7 +29,5 @@ function testcase() { obj[1] = 11; obj[2] = 12; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-8.js index 8a41eb7897..3ae57edd41 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-2-8 description: > Array.prototype.some - 'length' is an own accessor property that overrides an inherited data property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -36,7 +34,5 @@ function testcase() { child[1] = 11; child[2] = 12; - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-2-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-2-9.js index 2c510e8cca..d8a3c51bc6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-2-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-2-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-2-9 description: > Array.prototype.some - 'length' is an own accessor property that overrides an inherited accessor property on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -43,7 +41,5 @@ function testcase() { child[1] = 11; child[2] = 12; - return Array.prototype.some.call(child, callbackfn1) && - !Array.prototype.some.call(child, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn1), 'Array.prototype.some.call(child, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(child, callbackfn2), false, 'Array.prototype.some.call(child, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-1.js index aff4797743..148b919e70 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-3-1 description: Array.prototype.some - value of 'length' is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: undefined }; - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-10.js index f327b12b26..7cb0234b4f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-10.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-3-10 description: Array.prototype.some - value of 'length' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: NaN }; - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-11.js index 71bcca315a..040840143c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-11.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-11 description: > Array.prototype.some - 'length' is a string containing a positive number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 9, 1: 11, 2: 12, length: "2" }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-12.js index f90237c9e9..1d7558877e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-12.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-12 description: > Array.prototype.some - 'length' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 9, 1: 11, 2: 12, length: "-4294967294" }; - return !Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn1), false, 'Array.prototype.some.call(obj, callbackfn1)'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-13.js index 9501598b3a..962c26fc8c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-13.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-13 description: > Array.prototype.some - 'length' is a string containing a decimal number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 9, 1: 11, 2: 12, length: "2.5" }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-14.js index 17f0188906..14e8593f2a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-14.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-3-14 description: Array.prototype.some - 'length' is a string containing +/-Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,8 +17,7 @@ function testcase() { var objTwo = { 0: 11, length: "+Infinity" }; var objThree = { 0: 11, length: "-Infinity" }; - return Array.prototype.some.call(objOne, callbackfn) && - Array.prototype.some.call(objTwo, callbackfn) && - !Array.prototype.some.call(objThree, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.some.call(objOne, callbackfn), 'Array.prototype.some.call(objOne, callbackfn) !== true'); +assert(Array.prototype.some.call(objTwo, callbackfn), 'Array.prototype.some.call(objTwo, callbackfn) !== true'); +assert.sameValue(Array.prototype.some.call(objThree, callbackfn), false, 'Array.prototype.some.call(objThree, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-15.js index cafe6d503b..8bf8dab6ed 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-15.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-15 description: > Array.prototype.some - 'length' is a string containing an exponential number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 9, 1: 11, 2: 12, length: "2E0" }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-16.js index 4fe8744412..b5c96f86a5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-16.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-3-16 description: Array.prototype.some - 'length' is a string containing a hex number -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -18,7 +16,5 @@ function testcase() { var obj = { 0: 9, 1: 11, 2: 12, length: "0x0002" }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-17.js index 8336f1807f..41f5efd35b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-17.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-17 description: > Array.prototype.some - 'length' is a string containing a number with leading zeros -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 9, 1: 11, 2: 12, length: "0002.00" }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-18.js index 897f64fc92..eae26e52bf 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-3-18 description: > Array.prototype.some - value of 'length' is a string that can't convert to a number -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, 1: 21, length: "two" }; - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-19.js index 959cb81622..eddfe5fc4c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-19.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-19 description: > Array.prototype.some - value of 'length' is an Object which has an own toString method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -32,7 +30,6 @@ function testcase() { } }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2) && toStringAccessed; - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); +assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-2.js index 417bfc05c0..21983f5e9a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-2 description: > Array.prototype.some on an Array-like object if 'length' is 1 (length overridden to true(type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 11, 1: 12, length: true }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-20.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-20.js index 8a5900e975..b8d2c69922 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-20.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-20.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-20 description: > Array.prototype.some - value of 'length' is an Object which has an own valueOf method -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -32,7 +30,6 @@ function testcase() { } }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2) && valueOfAccessed; - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-21.js index aefbaa5bad..cf4f8e9658 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-21.js @@ -7,10 +7,8 @@ description: > Array.prototype.some - '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 callbackfn1(val, idx, obj) { return val > 10; } @@ -38,8 +36,7 @@ function testcase() { } }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2) && - valueOfAccessed && toStringAccessed; - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert(toStringAccessed, 'toStringAccessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-23.js index 384f7829fe..062fd9440b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-23.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-23.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-23 description: > Array.prototype.some uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -45,8 +43,7 @@ function testcase() { length: child }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2) && - valueOfAccessed && !toStringAccessed; - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); +assert(valueOfAccessed, 'valueOfAccessed !== true'); +assert.sameValue(toStringAccessed, false, 'toStringAccessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-24.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-24.js index 0e4bfb502e..c4adabf3da 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-24.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-24.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-24 description: > Array.prototype.some - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -25,7 +23,5 @@ function testcase() { length: 11.5 }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-25.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-25.js index 2de405e4e5..1d21ba73b9 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-25.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-25.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-3-25 description: Array.prototype.some - value of 'length' is a negative non-integer -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -23,7 +21,5 @@ function testcase() { length: -4294967294.5 }; - return !Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn1), false, 'Array.prototype.some.call(obj, callbackfn1)'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-28.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-28.js index 16b471c2e6..49e906c235 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-28.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-28.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-3-28 description: Array.prototype.some - value of 'length' is boundary value (2^32) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -21,6 +18,5 @@ function testcase() { length: 4294967296 }; - return Array.prototype.some.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-29.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-29.js index 3b3206f3b1..b4d05c060a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-29.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-29.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-29 description: > Array.prototype.some - value of 'length' is boundary value (2^32 + 1) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -24,7 +22,5 @@ function testcase() { length: 4294967297 }; - return Array.prototype.some.call(obj, callbackfn1) && - Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert(Array.prototype.some.call(obj, callbackfn2), 'Array.prototype.some.call(obj, callbackfn2) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-3.js index 738111d3e1..38094020c5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-3.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-3-3 description: Array.prototype.some - value of 'length' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: 0 }; - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-4.js index a21d02470d..191395dfd9 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-4.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-3-4 description: Array.prototype.some - value of 'length' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: +0 }; - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-5.js index 9124ab3eb7..8d4820af81 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-5.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-3-5 description: Array.prototype.some - value of 'length' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: -0 }; - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-6.js index f0f4cb48b1..546b694d0b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-6 description: > Array.prototype.some - value of 'length' is a number (value is positive) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 9, 1: 11, 2: 12, length: 2 }; - return Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn1), 'Array.prototype.some.call(obj, callbackfn1) !== true'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-7.js index 67119c5bcb..7dee4335b5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-3-7 description: > Array.prototype.some - value of 'length' is a number (value is negative) -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn1(val, idx, obj) { return val > 10; } @@ -20,7 +18,5 @@ function testcase() { var obj = { 0: 9, 1: 11, 2: 12, length: -4294967294 }; - return !Array.prototype.some.call(obj, callbackfn1) && - !Array.prototype.some.call(obj, callbackfn2); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn1), false, 'Array.prototype.some.call(obj, callbackfn1)'); +assert.sameValue(Array.prototype.some.call(obj, callbackfn2), false, 'Array.prototype.some.call(obj, callbackfn2)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-8.js index 05effd57cc..c11d346162 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-3-8 description: > Array.prototype.some - value of 'length' is a number (value is Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: Infinity }; - return Array.prototype.some.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-3-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-3-9.js index 1c0da633c9..4071be49c5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-3-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-3-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-3-9 description: > Array.prototype.some - value of 'length' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: -Infinity }; - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-4-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-4-12.js index 1d8894821f..746cd0e72c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-4-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-4-12.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-4-12 description: Array.prototype.some - 'callbackfn' is a function -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10; } - return [9, 11].some(callbackfn); - } -runTestCase(testcase); +assert([9, 11].some(callbackfn), '[9, 11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-1-s.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-1-s.js index ae7e5538ff..5660bb38bf 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-1-s.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-1-s.js @@ -5,10 +5,8 @@ es5id: 15.4.4.17-5-1-s description: Array.prototype.some - 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].some(callbackfn); - return innerThisCorrect; - } -runTestCase(testcase); + +assert(innerThisCorrect, 'innerThisCorrect !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-10.js index b569765a56..81fc420f73 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-10.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.17-5-10 description: Array.prototype.some - Array Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objArray = []; function callbackfn(val, idx, obj) { return this === objArray; } - return [11].some(callbackfn, objArray); - } -runTestCase(testcase); +assert([11].some(callbackfn, objArray), '[11].some(callbackfn, objArray) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-11.js index 34090273c9..a00be078ab 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-11.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.17-5-11 description: Array.prototype.some - String object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objString = new String(); function callbackfn(val, idx, obj) { return this === objString; } - return [11].some(callbackfn, objString); - } -runTestCase(testcase); +assert([11].some(callbackfn, objString), '[11].some(callbackfn, objString) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-12.js index 70408ed707..18c45ba7e2 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-12.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.17-5-12 description: Array.prototype.some - Boolean object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objBoolean = new Boolean(); function callbackfn(val, idx, obj) { return this === objBoolean; } - return [11].some(callbackfn, objBoolean); - } -runTestCase(testcase); +assert([11].some(callbackfn, objBoolean), '[11].some(callbackfn, objBoolean) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-13.js index 8c5dac20b3..bf9588eff0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-13.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.17-5-13 description: Array.prototype.some - Number object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objNumber = new Number(); function callbackfn(val, idx, obj) { return this === objNumber; } - return [11].some(callbackfn, objNumber); - } -runTestCase(testcase); +assert([11].some(callbackfn, objNumber), '[11].some(callbackfn, objNumber) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-14.js index 110a9bcd96..73e47faeb8 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-14.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-5-14 description: Array.prototype.some - the Math object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === Math; } - return [11].some(callbackfn, Math); - } -runTestCase(testcase); +assert([11].some(callbackfn, Math), '[11].some(callbackfn, Math) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-15.js index 46d931789f..5fbc512408 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-15.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.17-5-15 description: Array.prototype.some - Date object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objDate = new Date(); function callbackfn(val, idx, obj) { return this === objDate; } - return [11].some(callbackfn, objDate); - } -runTestCase(testcase); +assert([11].some(callbackfn, objDate), '[11].some(callbackfn, objDate) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-16.js index 2a34f2a9c3..47a0ac99df 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-16.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.17-5-16 description: Array.prototype.some - RegExp object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objRegExp = new RegExp(); function callbackfn(val, idx, obj) { return this === objRegExp; } - return [11].some(callbackfn, objRegExp); - } -runTestCase(testcase); +assert([11].some(callbackfn, objRegExp), '[11].some(callbackfn, objRegExp) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-17.js index d860841672..eb3675d1a4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-17.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-5-17 description: Array.prototype.some - the JSON object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === JSON; } - return [11].some(callbackfn, JSON); - } -runTestCase(testcase); +assert([11].some(callbackfn, JSON), '[11].some(callbackfn, JSON) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-18.js index 750deaa02a..9044f2e04e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-18.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.17-5-18 description: Array.prototype.some - Error object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objError = new RangeError(); function callbackfn(val, idx, obj) { return this === objError; } - return [11].some(callbackfn, objError); - } -runTestCase(testcase); +assert([11].some(callbackfn, objError), '[11].some(callbackfn, objError) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-19.js index dcbe3ac806..737e6b8cc1 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-5-19 description: Array.prototype.some - the Arguments object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var arg; function callbackfn(val, idx, obj) { @@ -19,6 +16,4 @@ function testcase() { arg = arguments; }(1, 2, 3)); - return [11].some(callbackfn, arg); - } -runTestCase(testcase); +assert([11].some(callbackfn, arg), '[11].some(callbackfn, arg) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-2.js index e5e6ccf8a7..d9b397e2b6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-5-2 description: Array.prototype.some - thisArg is Object -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var o = new Object(); o.res = true; @@ -17,8 +15,5 @@ function testcase() { } var arr = [1]; - if(arr.some(callbackfn, o) === true) - return true; - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn, o), true, 'arr.some(callbackfn, o)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js index 1542364dd5..c6bda3120e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-21.js @@ -4,18 +4,11 @@ /*--- es5id: 15.4.4.17-5-21 description: Array.prototype.some - 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(); } - return [11].some(callbackfn, fnGlobalObject()); - } -runTestCase(testcase); +assert([11].some(callbackfn, fnGlobalObject()), '[11].some(callbackfn, fnGlobalObject()) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-22.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-22.js index b6cd996a2e..934a6926a0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-22.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-22.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-5-22 description: Array.prototype.some - boolean primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === false; } - return [11].some(callbackfn, false); - } -runTestCase(testcase); +assert([11].some(callbackfn, false), '[11].some(callbackfn, false) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-23.js index b46cdca58b..f908db8cd1 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-23.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-23.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-5-23 description: Array.prototype.some - number primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === 101; } - return [11].some(callbackfn, 101); - } -runTestCase(testcase); +assert([11].some(callbackfn, 101), '[11].some(callbackfn, 101) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-24.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-24.js index 8818408b9e..e38574bd6b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-24.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-24.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-5-24 description: Array.prototype.some - string primitive can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === "abc"; } - return [11].some(callbackfn, "abc"); - } -runTestCase(testcase); +assert([11].some(callbackfn, "abc"), '[11].some(callbackfn, "abc") !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-25.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-25.js index f7ec5b9430..6017b64182 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-25.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-25.js @@ -5,10 +5,8 @@ es5id: 15.4.4.17-5-25 description: Array.prototype.some - thisArg not passed flags: [noStrict] -includes: [runTestCase.js] ---*/ -function testcase() { function innerObj() { this._15_4_4_17_5_25 = true; var _15_4_4_17_5_25 = false; @@ -19,6 +17,5 @@ function testcase() { var arr = [1]; this.retVal = !arr.some(callbackfn); } - return new innerObj().retVal; - } -runTestCase(testcase); + +assert(new innerObj().retVal, 'new innerObj().retVal !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-3.js index e5a1f41bde..745c4890ce 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-3.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-5-3 description: Array.prototype.some - thisArg is Array -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; var a = new Array(); a.res = true; @@ -18,8 +16,4 @@ function testcase() { var arr = [1]; - if(arr.some(callbackfn, a) === true) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn, a), true, 'arr.some(callbackfn, a)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-4.js index 2513270056..950f89e650 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-5-4 description: > Array.prototype.some - thisArg is object from object template(prototype) -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -21,8 +19,4 @@ function testcase() { var f = new foo(); var arr = [1]; - if(arr.some(callbackfn,f) === true) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn,f), true, 'arr.some(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-5.js index 53fbff4058..1474a76335 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-5.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-5-5 description: Array.prototype.some - thisArg is object from object template -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -19,8 +17,4 @@ function testcase() { f.res = true; var arr = [1]; - if(arr.some(callbackfn,f) === true) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn,f), true, 'arr.some(callbackfn,f)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-6.js index f672cd90ec..65566dc824 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-6.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-5-6 description: Array.prototype.some - thisArg is function -includes: [runTestCase.js] ---*/ -function testcase() { var res = false; function callbackfn(val, idx, obj) { @@ -18,8 +16,4 @@ function testcase() { foo.res = true; var arr = [1]; - if(arr.some(callbackfn,foo) === true) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn,foo), true, 'arr.some(callbackfn,foo)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-7.js index cc11abb79a..3b66641957 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-7.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-5-7 description: Array.prototype.some - built-in functions can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this === eval; } - return [11].some(callbackfn, eval); - } -runTestCase(testcase); +assert([11].some(callbackfn, eval), '[11].some(callbackfn, eval) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-5-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-5-9.js index 0835150147..f4b9cb3ad1 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-5-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-5-9.js @@ -4,17 +4,12 @@ /*--- es5id: 15.4.4.17-5-9 description: Array.prototype.some - Function Object can be used as thisArg -includes: [runTestCase.js] ---*/ -function testcase() { - var objFunction = function () { }; function callbackfn(val, idx, obj) { return this === objFunction; } - return [11].some(callbackfn, objFunction); - } -runTestCase(testcase); +assert([11].some(callbackfn, objFunction), '[11].some(callbackfn, objFunction) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-1.js index 63485fc85e..5c8a0c08ad 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-1.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-7-1 description: > Array.prototype.some considers new elements added to array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { var calledForThree = false; function callbackfn(val, idx, obj) @@ -24,6 +22,5 @@ function testcase() { var arr = [1,2,,4,5]; var val = arr.some(callbackfn); - return calledForThree; - } -runTestCase(testcase); + +assert(calledForThree, 'calledForThree !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-2.js index 7c7f75459e..585296c6b7 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-2 description: > Array.prototype.some considers new value of elements in array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { arr[4] = 6; @@ -22,8 +19,5 @@ function testcase() { var arr = [1,2,3,4,5]; - if(arr.some(callbackfn) === true) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.some(callbackfn), true, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-3.js index 48b93e97cd..48eba77539 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-3 description: > Array.prototype.some doesn't visit deleted elements in array after it is called -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { delete arr[2]; @@ -22,8 +19,5 @@ function testcase() { var arr = [1,2,3,4,5]; - if(arr.some(callbackfn) === false) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-4.js index f759bd9d6a..dd5fb68b22 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-4 description: > Array.prototype.some doesn't visit deleted elements when Array.length is decreased -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { arr.length = 3; @@ -22,7 +19,5 @@ function testcase() { var arr = [1,2,3,4,6]; - if(arr.some(callbackfn) === false) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-5.js index 55d2c2e314..0ac93ebd83 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-5 description: > Array.prototype.some doesn't consider newly added elements in sparse array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { arr[1000] = 5; @@ -24,8 +21,5 @@ function testcase() { arr[1] = 1; arr[2] = 2; - if(arr.some(callbackfn) === false) - return true; - - } -runTestCase(testcase); + +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-6.js index 2270801f26..0938957b1d 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-6 description: > Array.prototype.some 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 arr[4]; @@ -26,8 +23,5 @@ function testcase() { var res = arr.some(callbackfn) ; delete Array.prototype[4]; - if(res === true) - return true; - - } -runTestCase(testcase); + +assert.sameValue(res, true, 'res'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-8.js index 961e0a74d2..8e5cd77857 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-8.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-7-8 description: Array.prototype.some - no observable effects occur if length is 0 -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 0 }; - return !Array.prototype.some.call(obj, callbackfn) && !accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(accessed, false, 'accessed'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-9.js index 3e6ae1fcb6..6fc8106c02 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-9 description: > Array.prototype.some - modifications to length don't change number of iterations -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -28,6 +25,5 @@ function testcase() { configurable: true }); - return Array.prototype.some.call(obj, callbackfn) && called === 3; - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); +assert.sameValue(called, 3, 'called'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-1.js index 89753378ed..34000d4587 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-b-1 description: > Array.prototype.some - callbackfn not called for indexes never been assigned values -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -21,8 +18,5 @@ function testcase() { var arr = new Array(10); arr[1] = undefined; arr.some(callbackfn); - if(callCnt === 1) - return true; - - } -runTestCase(testcase); + +assert.sameValue(callCnt, 1, 'callCnt'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-14.js index 4b9e2fc97d..bde75aaa29 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-14.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-7-b-14 description: > Array.prototype.some - decreasing length of array causes index property not to be visited -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -25,6 +23,5 @@ function testcase() { configurable: true }); - return !arr.some(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-16.js index 7fe3ff939a..75d3d366fb 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-16.js @@ -7,10 +7,8 @@ description: > Array.prototype.some - 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 true; @@ -36,6 +34,4 @@ function testcase() { configurable: true }); - return arr.some(callbackfn); - } -runTestCase(testcase); +assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-2.js index 7bd14a3be8..558afcfc8a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-2.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-7-b-2 description: Array.prototype.some - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx, obj) { if (idx === 2 && val === "length") { return true; @@ -26,6 +24,4 @@ function testcase() { configurable: true }); - return Array.prototype.some.call(arr, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(arr, callbackfn), 'Array.prototype.some.call(arr, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-3.js index 12b14620db..f016db5a38 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-7-b-3 description: > Array.prototype.some - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -25,6 +23,5 @@ function testcase() { configurable: true }); - return !Array.prototype.some.call(arr, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(arr, callbackfn), false, 'Array.prototype.some.call(arr, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-4.js index ff5630f8c3..8352a2ccb6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-b-4 description: > Array.prototype.some - 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 true; @@ -34,6 +31,4 @@ function testcase() { configurable: true }); - return Array.prototype.some.call(arr, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(arr, callbackfn), 'Array.prototype.some.call(arr, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-5.js index d14e59b92c..f556eaee5d 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-7-b-5 description: > Array.prototype.some - 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 true; @@ -33,6 +31,4 @@ function testcase() { configurable: true }); - return arr.some(callbackfn); - } -runTestCase(testcase); +assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-8.js index 6813824f47..d44ed2a72b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-7-b-8 description: > Array.prototype.some - deleting own property causes index property not to be visited on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -32,6 +30,5 @@ function testcase() { configurable: true }); - return !Array.prototype.some.call(arr, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(arr, callbackfn), false, 'Array.prototype.some.call(arr, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-9.js index 008358f00e..0e9cd5b4ab 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-b-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-b-9.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-7-b-9 description: > Array.prototype.some - deleting own property causes index property not to be visited on an Array -includes: [runTestCase.js] ---*/ -function testcase() { var accessed = false; function callbackfn(val, idx, obj) { accessed = true; @@ -32,6 +30,5 @@ function testcase() { configurable: true }); - return !arr.some(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-1.js index 7dc8bd56f4..a67bf7f299 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-1 description: > Array.prototype.some - 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) { @@ -22,6 +19,4 @@ function testcase() { var obj = { 5: kValue, length: 100 }; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-10.js index c821639dd4..8d5beb1bff 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-10.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-10 description: > Array.prototype.some - element to be retrieved is own accessor property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = "abc"; function callbackfn(val, idx, obj) { @@ -29,6 +26,4 @@ function testcase() { configurable: true }); - return arr.some(callbackfn); - } -runTestCase(testcase); +assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js index b919cb1e10..318eeea8c0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-11.js @@ -7,11 +7,8 @@ description: > Array.prototype.some - 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) { @@ -36,6 +33,4 @@ function testcase() { configurable: true }); - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-13.js index 8e132900c1..c9dd307ea4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-13.js @@ -7,11 +7,8 @@ description: > Array.prototype.some - 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() { }); - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-15.js index af2e115e2d..8285fa0de1 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-15.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-15 description: > Array.prototype.some - 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) { @@ -35,6 +32,4 @@ function testcase() { var child = new Con(); child.length = 20; - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-17.js index 3485969c8d..856e734e3b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-17.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-17 description: > Array.prototype.some - 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"; @@ -24,6 +21,4 @@ function testcase() { configurable: true }); - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-18.js index df370de95d..23ffb639e0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-18.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-18 description: > Array.prototype.some - 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 === 0) { return typeof val === "undefined"; @@ -25,6 +22,4 @@ function testcase() { configurable: true }); - return arr.some(callbackfn); - } -runTestCase(testcase); +assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-2.js index 0895b01907..8c93ce27f0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-2 description: > Array.prototype.some - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - var kValue = {}; function callbackfn(val, idx, obj) { @@ -20,6 +17,4 @@ function testcase() { return false; } - return [kValue].some(callbackfn); - } -runTestCase(testcase); +assert([kValue].some(callbackfn), '[kValue].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-21.js index 9216ca14ae..bd334b397b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-21 description: > Array.prototype.some - 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 === 1) { return typeof val === "undefined"; @@ -30,6 +27,4 @@ function testcase() { var child = new Con(); child.length = 2; - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-25.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-25.js index 4a73d60cb4..587b1e1ea1 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-25.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-25.js @@ -7,11 +7,8 @@ description: > Array.prototype.some - 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 === 11; @@ -23,6 +20,4 @@ function testcase() { return Array.prototype.some.call(arguments, callbackfn); }; - return func(11); - } -runTestCase(testcase); +assert(func(11), 'func(11) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-26.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-26.js index 9cb57bdbb2..cecb63178f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-26.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-26.js @@ -7,11 +7,8 @@ description: > Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var firstResult = false; var secondResult = false; @@ -31,6 +28,6 @@ function testcase() { return Array.prototype.some.call(arguments, callbackfn); }; - return !func(11, 9) && firstResult && secondResult; - } -runTestCase(testcase); +assert.sameValue(func(11, 9), false, 'func(11, 9)'); +assert(firstResult, 'firstResult !== true'); +assert(secondResult, 'secondResult !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-27.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-27.js index fac8519318..e1e1e0f3df 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-27.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-27.js @@ -7,11 +7,8 @@ description: > Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters) -includes: [runTestCase.js] ---*/ -function testcase() { - var firstResult = false; var secondResult = false; var thirdResult = false; @@ -35,6 +32,7 @@ function testcase() { return Array.prototype.some.call(arguments, callbackfn); }; - return !func(11, 12, 9) && firstResult && secondResult && thirdResult; - } -runTestCase(testcase); +assert.sameValue(func(11, 12, 9), false, 'func(11, 12, 9)'); +assert(firstResult, 'firstResult !== true'); +assert(secondResult, 'secondResult !== true'); +assert(thirdResult, 'thirdResult !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-28.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-28.js index 0bf7e31bbd..c520a37703 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-28.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-28.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-28 description: > Array.prototype.some - element changed by getter on previous iterations is observed on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return val === 12; @@ -39,6 +36,4 @@ function testcase() { configurable: true }); - return arr.some(callbackfn); - } -runTestCase(testcase); +assert(arr.some(callbackfn), 'arr.some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-29.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-29.js index 3674745a7f..2c29fbdc95 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-29.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-29.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-29 description: > Array.prototype.some - element changed by getter on previous iterations on an Array-like object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 1) { return val === 12; @@ -39,6 +36,4 @@ function testcase() { configurable: true }); - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-3.js index 17181ad224..8c11c1dc9d 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-3.js @@ -7,11 +7,8 @@ description: > Array.prototype.some - 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() { child[5] = kValue; child.length = 10; - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-5.js index ea87447185..da667e6dfc 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-5.js @@ -7,11 +7,8 @@ description: > Array.prototype.some - 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 = 1000; function callbackfn(val, idx, obj) { @@ -40,6 +37,4 @@ function testcase() { configurable: true }); - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-7.js index 82333a2881..8647fc9660 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-7 description: > Array.prototype.some - 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) { @@ -28,6 +25,4 @@ function testcase() { var child = new Con(); child.length = 10; - return Array.prototype.some.call(child, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(child, callbackfn), 'Array.prototype.some.call(child, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-9.js index b92048956b..60643bc6ba 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-i-9.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-i-9 description: > Array.prototype.some - 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) { @@ -29,6 +26,4 @@ function testcase() { configurable: true }); - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-1.js index f9cc62ff48..ac68d09681 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-7-c-ii-1 description: Array.prototype.some - callbackfn called with correct parameters -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if(obj[idx] === val) @@ -19,9 +16,5 @@ function testcase() { var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.some(callbackfn) === false) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-10.js index 232ca82c87..99ca002e3c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-10.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-7-c-ii-10 description: Array.prototype.some - callbackfn is called with 1 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val) { return val > 10; } - return [11, 12].some(callbackfn); - } -runTestCase(testcase); +assert([11, 12].some(callbackfn), '[11, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-11.js index 493aa3f1c2..92b5d06fbc 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-11.js @@ -4,14 +4,10 @@ /*--- es5id: 15.4.4.17-7-c-ii-11 description: Array.prototype.some - callbackfn is called with 2 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { function callbackfn(val, idx) { return val > 10 && arguments[2][idx] === val; } - return [9, 12].some(callbackfn); - } -runTestCase(testcase); +assert([9, 12].some(callbackfn), '[9, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-12.js index 3210cc8c69..dba95e67bd 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-12.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-7-c-ii-12 description: Array.prototype.some - callbackfn is called with 3 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return val > 10 && obj[idx] === val; } - return [9, 12].some(callbackfn); - } -runTestCase(testcase); +assert([9, 12].some(callbackfn), '[9, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-13.js index 5bd54f220c..521c8701cb 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-13.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-ii-13 description: > Array.prototype.some - callbackfn that uses arguments object to get parameter value -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return arguments[2][arguments[1]] === arguments[0]; } - return [9, 12].some(callbackfn); - } -runTestCase(testcase); +assert([9, 12].some(callbackfn), '[9, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-16.js index f2fe46c1bb..e80c862050 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-16.js @@ -6,17 +6,12 @@ es5id: 15.4.4.17-7-c-ii-16 description: > Array.prototype.some - 'this' of 'callback' is a Boolean 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; } var obj = { 0: 11, length: 1 }; - return Array.prototype.some.call(obj, callbackfn, false); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn, false), 'Array.prototype.some.call(obj, callbackfn, false) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-17.js index 6dfc8eea9a..6e51aa5ac3 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-17.js @@ -6,17 +6,12 @@ es5id: 15.4.4.17-7-c-ii-17 description: > Array.prototype.some - 'this' of 'callbackfn' is a Number object when T is not an object (T is a number primitive) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return this.valueOf() === 5; } var obj = { 0: 11, length: 1 }; - return Array.prototype.some.call(obj, callbackfn, 5); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn, 5), 'Array.prototype.some.call(obj, callbackfn, 5) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-18.js index 015c563232..7a4a995a93 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-18.js @@ -6,17 +6,12 @@ es5id: 15.4.4.17-7-c-ii-18 description: > Array.prototype.some - 'this' of 'callbackfn' is an String 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!"; } var obj = { 0: 11, 1: 9, length: 2 }; - return Array.prototype.some.call(obj, callbackfn, "hello!"); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn, "hello!"), 'Array.prototype.some.call(obj, callbackfn, "hello!") !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-19.js index 042265a775..106dc32d98 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-19.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-7-c-ii-19 description: Array.prototype.some - non-indexed properties are not called -includes: [runTestCase.js] ---*/ -function testcase() { - var called = 0; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 9, 10: 8, non_index_property: 11, length: 20 }; - return !Array.prototype.some.call(obj, callbackfn) && (2 === called); - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert.sameValue(called, 2, 'called'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2.js index 692b2f45f9..69fbdcdb34 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-7-c-ii-2 description: Array.prototype.some - callbackfn takes 3 arguments -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if(arguments.length === 3) //verify if callbackfn was called with 3 parameters @@ -20,9 +17,5 @@ function testcase() { var arr = [0,1,true,null,new Object(),"five"]; arr[999999] = -6.6; - if(arr.some(callbackfn) === false) - return true; - - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-20.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-20.js index 295ed4a00a..22a2d145a2 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-20.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-20.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-ii-20 description: > Array.prototype.some - callbackfn called with correct parameters (thisArg is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var thisArg = { threshold: 10 }; function callbackfn(val, idx, obj) { @@ -19,6 +16,4 @@ function testcase() { var obj = { 0: 11, length: 2 }; - return Array.prototype.some.call(obj, callbackfn, thisArg); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn, thisArg), 'Array.prototype.some.call(obj, callbackfn, thisArg) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-21.js index b74b017ac9..c53c52ade4 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-21.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-ii-21 description: > Array.prototype.some - callbackfn called with correct parameters (kValue is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var firstIndex = false; var secondIndex = false; @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 2 }; - return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert(firstIndex, 'firstIndex !== true'); +assert(secondIndex, 'secondIndex !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-22.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-22.js index 26e128c9d5..ac058570ec 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-22.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-22.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-ii-22 description: > Array.prototype.some - callbackfn called with correct parameters (the index k is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var firstIndex = false; var secondIndex = false; @@ -27,6 +24,6 @@ function testcase() { var obj = { 0: 11, 1: 12, length: 2 }; - return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert(firstIndex, 'firstIndex !== true'); +assert(secondIndex, 'secondIndex !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-23.js index e5ec3c47fb..752813de23 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-23.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-23.js @@ -6,17 +6,12 @@ es5id: 15.4.4.17-7-c-ii-23 description: > Array.prototype.some - callbackfn called with correct parameters (this object O is correct) -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, 1: 12, length: 2 }; function callbackfn(val, idx, o) { return obj === o; } - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-3.js index 50d84d5a11..01dd49a5e7 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-ii-3 description: > Array.prototype.some immediately returns true if callbackfn returns true -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -23,7 +20,6 @@ function testcase() { var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.some(callbackfn) === true && callCnt === 7) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.some(callbackfn), true, 'arr.some(callbackfn)'); +assert.sameValue(callCnt, 7, 'callCnt'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-4.js index f714878d2b..d39ebfbe53 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-4.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-ii-4 description: > Array.prototype.some - k values are passed in ascending numeric order -includes: [runTestCase.js] ---*/ -function testcase() { - var arr = [0, 1, 2, 3, 4, 5]; var lastIdx = 0; var called = 0; @@ -25,6 +22,5 @@ function testcase() { } } - return !arr.some(callbackfn) && arr.length === called; - } -runTestCase(testcase); +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); +assert.sameValue(arr.length, called, 'arr.length'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js index a662073f4b..2d8c5da6a6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-ii-5 description: > Array.prototype.some - 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. @@ -28,6 +25,4 @@ function testcase() { } } - return ![11, 12, 13, 14].some(callbackfn, undefined); - } -runTestCase(testcase); +assert.sameValue([11, 12, 13, 14].some(callbackfn, undefined), false, '[11, 12, 13, 14].some(callbackfn, undefined)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-6.js index eb165f31f4..405841bde3 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-6.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-7-c-ii-6 description: Array.prototype.some - arguments to callbackfn are self consistent -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 0: 11, length: 1 }; var thisArg = {}; @@ -16,6 +13,4 @@ function testcase() { return this === thisArg && arguments[0] === 11 && arguments[1] === 0 && arguments[2] === obj; } - return Array.prototype.some.call(obj, callbackfn, thisArg); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn, thisArg), 'Array.prototype.some.call(obj, callbackfn, thisArg) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-8.js index c76074a793..c13b25b9eb 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-8.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-ii-8 description: > Array.prototype.some - element changed by callbackfn on previous iterations is observed -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { if (idx === 0) { obj[idx + 1] = 11; @@ -20,6 +17,4 @@ function testcase() { var obj = { 0: 9, 1: 8, length: 2 }; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-9.js index bff2efdd70..197bb88fb5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-ii-9.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-7-c-ii-9 description: Array.prototype.some - callbackfn is called with 0 formal parameter -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return true; } - return [11, 12].some(callbackfn); - } -runTestCase(testcase); +assert([11, 12].some(callbackfn), '[11, 12].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-1.js index 1b317dd180..ab59969e6c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-1.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-7-c-iii-1 description: Array.prototype.some - return value of callbackfn is undefined -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; - return !Array.prototype.some.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-10.js index c2074bd8f6..57debd3a5c 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-10.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-10 description: > Array.prototype.some - return value of callbackfn is a number (value is Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return Infinity; } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-11.js index c6ff839270..08486c8835 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-11.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-11 description: > Array.prototype.some - return value of callbackfn is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return -Infinity; } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-12.js index c452892256..cdde3f074e 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-12.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-iii-12 description: > Array.prototype.some - return value of callbackfn is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,4 @@ function testcase() { return NaN; } - return ![11].some(callbackfn); - } -runTestCase(testcase); +assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-13.js index e1da13a58b..06745c2ef1 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-13.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-iii-13 description: > Array.prototype.some - return value of callbackfn is an empty string -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return ""; } - return ![11].some(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-14.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-14.js index cea0e31aa6..aca2be6d62 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-14.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-14.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-14 description: > Array.prototype.some - return value of callbackfn is a non-empty string -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return "non-empty string"; } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-15.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-15.js index 9b56ea7a25..8cf993f720 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-15.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-15.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-15 description: > Array.prototype.some - return value of callbackfn is Function object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return function () { }; } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-16.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-16.js index 211adfb5f5..1bc0bf5738 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-16.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-16.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-16 description: > Array.prototype.some - return value of callbackfn is an Array object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new Array(10); } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-17.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-17.js index cbc9b62af5..ceff0c9737 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-17.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-17.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-17 description: > Array.prototype.some - return value of callbackfn is a String object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new String(); } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-18.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-18.js index 7fb23df3dc..7e52cd3c07 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-18.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-18.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-18 description: > Array.prototype.some - return value of callbackfn is a Boolean object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new Boolean(); } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-19.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-19.js index 9672354a59..69f3939f67 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-19.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-19.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-19 description: > Array.prototype.some - return value of callbackfn is a Number object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new Number(); } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-2.js index ac01b995d3..70012452e0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-2.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-7-c-iii-2 description: Array.prototype.some - return value of callbackfn is null -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; - return !Array.prototype.some.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-20.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-20.js index 7b91109aa0..11be83fd3a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-20.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-20.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-20 description: > Array.prototype.some - return value of callbackfn is the Math object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return Math; } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-21.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-21.js index 7ac43f1a98..fbfbd54641 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-21.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-21.js @@ -4,15 +4,10 @@ /*--- es5id: 15.4.4.17-7-c-iii-21 description: Array.prototype.some - return value of callbackfn is a Date object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new Date(); } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-22.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-22.js index 7167cf481f..4c7f2e3bd0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-22.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-22.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-22 description: > Array.prototype.some - return value of callbackfn is a RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new RegExp(); } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-23.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-23.js index 03837f98fb..84e5710d78 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-23.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-23.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-23 description: > Array.prototype.some - return value of callbackfn is the JSON object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return JSON; } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-24.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-24.js index 4e29b4e508..a3f0d49594 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-24.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-24.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-24 description: > Array.prototype.some - return value of callbackfn is an Error object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return new EvalError(); } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-25.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-25.js index 48b0b63b50..9c15faaff5 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-25.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-25.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-25 description: > Array.prototype.some - return value of callbackfn is the Arguments object -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return arguments; } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js index 4d67e883bd..7f03efbbb6 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-26.js @@ -6,17 +6,11 @@ es5id: 15.4.4.17-7-c-iii-26 description: > Array.prototype.some - return value of callbackfn is the global object -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return fnGlobalObject(); } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-28.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-28.js index 0547e93468..84bd18fee0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-28.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-28.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-7-c-iii-28 description: Array.prototype.some - true prevents further side effects -includes: [runTestCase.js] ---*/ -function testcase() { var result = false; function callbackfn(val, idx, obj) { if (idx > 1) { @@ -40,6 +38,5 @@ function testcase() { configurable: true }); - return Array.prototype.some.call(obj, callbackfn) && !result; - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); +assert.sameValue(result, false, 'result'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-29.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-29.js index 0dd7ae3872..1c67dd07d0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-29.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-29.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-29 description: > Array.prototype.some - return value (new Boolean(false)) of callbackfn is treated as true value -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn() { return new Boolean(false); } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-3.js index 4ac3d15558..e6cf782200 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-3.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-iii-3 description: > Array.prototype.some - return value of callbackfn is a boolean (value is false) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -20,6 +17,5 @@ function testcase() { var obj = { 0: 11, length: 2 }; - return !Array.prototype.some.call(obj, callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.some.call(obj, callbackfn), false, 'Array.prototype.some.call(obj, callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-4.js index a5a39d2cf4..9b34d801ea 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-4.js @@ -6,17 +6,12 @@ es5id: 15.4.4.17-7-c-iii-4 description: > Array.prototype.some - return value of callbackfn is a boolean (value is true) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } var obj = { 0: 11, length: 2 }; - return Array.prototype.some.call(obj, callbackfn); - } -runTestCase(testcase); +assert(Array.prototype.some.call(obj, callbackfn), 'Array.prototype.some.call(obj, callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-5.js index 9fac92d504..65b0e3ad43 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-5.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-iii-5 description: > Array.prototype.some - return value of callbackfn is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return 0; } - return ![11].some(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-6.js index b1197518c2..c977e1b7fb 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-6.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-iii-6 description: > Array.prototype.some - return value of callbackfn is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return +0; } - return ![11].some(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-7.js index be54570224..47d6d37d38 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-7.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-7-c-iii-7 description: > Array.prototype.some - return value of callbackfn is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - var accessed = false; function callbackfn(val, idx, obj) { @@ -18,6 +15,5 @@ function testcase() { return -0; } - return ![11].some(callbackfn) && accessed; - } -runTestCase(testcase); +assert.sameValue([11].some(callbackfn), false, '[11].some(callbackfn)'); +assert(accessed, 'accessed !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-8.js index 949ac537fa..dc12ba281a 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-8.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-8 description: > Array.prototype.some - return value of callbackfn is a number (value is positive number) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return 5; } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-9.js b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-9.js index 03dae37533..59c06f78a0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-9.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-9.js @@ -6,15 +6,10 @@ es5id: 15.4.4.17-7-c-iii-9 description: > Array.prototype.some - return value of callbackfn is a number (value is negative number) -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return -5; } - return [11].some(callbackfn); - } -runTestCase(testcase); +assert([11].some(callbackfn), '[11].some(callbackfn) !== true'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-1.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-1.js index 9b546a92e8..48e0673360 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-1.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-1.js @@ -4,14 +4,9 @@ /*--- es5id: 15.4.4.17-8-1 description: Array.prototype.some returns false if 'length' is 0 (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { function cb(){} var i = [].some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-10.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-10.js index 5519850a58..e8a7a64ac8 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-10.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-10.js @@ -4,10 +4,8 @@ /*--- es5id: 15.4.4.17-8-10 description: Array.prototype.some - subclassed array when length is reduced -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -22,8 +20,5 @@ function testcase() { } var i = f.some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-11.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-11.js index 50519ec42a..7f3165169f 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-11.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-11.js @@ -6,11 +6,8 @@ es5id: 15.4.4.17-8-11 description: > Array.prototype.some returns false when all calls to callbackfn return false -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -20,7 +17,6 @@ function testcase() { var arr = [0,1,2,3,4,5,6,7,8,9]; - if(arr.some(callbackfn) === false && callCnt === 10) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); +assert.sameValue(callCnt, 10, 'callCnt'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-12.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-12.js index 8043928329..8be153d1b0 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-12.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-12.js @@ -6,25 +6,17 @@ es5id: 15.4.4.17-8-12 description: > Array.prototype.some doesn't mutate the array on which it is called on -includes: [runTestCase.js] ---*/ -function testcase() { - function callbackfn(val, idx, obj) { return true; } var arr = [1,2,3,4,5]; arr.some(callbackfn); - if(arr[0] === 1 && - arr[1] === 2 && - arr[2] === 3 && - arr[3] === 4 && - arr[4] === 5) - { - return true; - } - } -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(arr[4], 5, 'arr[4]'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-13.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-13.js index 1731fddb09..bca47375e3 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-13.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-13.js @@ -4,11 +4,8 @@ /*--- es5id: 15.4.4.17-8-13 description: Array.prototype.some doesn't visit expandos -includes: [runTestCase.js] ---*/ -function testcase() { - var callCnt = 0; function callbackfn(val, idx, obj) { @@ -20,7 +17,6 @@ function testcase() { arr["i"] = 10; arr[true] = 11; - if(arr.some(callbackfn) === false && callCnt === 10) - return true; - } -runTestCase(testcase); + +assert.sameValue(arr.some(callbackfn), false, 'arr.some(callbackfn)'); +assert.sameValue(callCnt, 10, 'callCnt'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-2.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-2.js index 2b502794e5..85fb0e9838 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-2.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-2.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-8-2 description: > Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to null (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { function cb(){} var i = f.some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-3.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-3.js index eb5bc735b7..f01ca3cc5b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-3.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-3.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-8-3 description: > Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to false (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { function cb(){} var i = f.some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-4.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-4.js index c796180039..aa63733266 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-4.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-4.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-8-4 description: > Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { function cb(){} var i = f.some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-5.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-5.js index 1328a2830e..a646445e40 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-5.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-5.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-8-5 description: > Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -18,8 +16,5 @@ function testcase() { function cb(){} var i = f.some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-6.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-6.js index 0fe8c6dc8a..a942ac6015 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-6.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-6.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-8-6 description: > Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with obj with valueOf) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -20,8 +18,5 @@ function testcase() { function cb(){} var i = f.some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-7.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-7.js index 1c4d496b8a..cc5744616b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-7.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-7.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-8-7 description: > Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -26,8 +24,5 @@ function testcase() { function cb(){} var i = f.some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/some/15.4.4.17-8-8.js b/test/built-ins/Array/prototype/some/15.4.4.17-8-8.js index ebbd518601..3a4eb4b47b 100644 --- a/test/built-ins/Array/prototype/some/15.4.4.17-8-8.js +++ b/test/built-ins/Array/prototype/some/15.4.4.17-8-8.js @@ -6,10 +6,8 @@ es5id: 15.4.4.17-8-8 description: > Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with [] -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -33,8 +31,5 @@ function testcase() { function cb(){} var i = f.some(cb); - if (i === false) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(i, false, 'i'); diff --git a/test/built-ins/Array/prototype/splice/15.4.4.12-9-a-1.js b/test/built-ins/Array/prototype/splice/15.4.4.12-9-a-1.js index 02c3116693..ce423f3e34 100644 --- a/test/built-ins/Array/prototype/splice/15.4.4.12-9-a-1.js +++ b/test/built-ins/Array/prototype/splice/15.4.4.12-9-a-1.js @@ -6,12 +6,10 @@ es5id: 15.4.4.12-9-a-1 description: > Array.prototype.splice - 'from' is the result of ToString(actualStart+k) in an Array -includes: [runTestCase.js] ---*/ -function testcase() { var arrObj = [1, 2, 3]; var newArrObj = arrObj.splice(-2, 1); - return newArrObj.length === 1 && newArrObj[0] === 2; - } -runTestCase(testcase); + +assert.sameValue(newArrObj.length, 1, 'newArrObj.length'); +assert.sameValue(newArrObj[0], 2, 'newArrObj[0]');