diff options
author | André Bargull <andre.bargull@gmail.com> | 2015-08-06 18:16:23 +0200 |
---|---|---|
committer | André Bargull <andre.bargull@gmail.com> | 2015-08-06 18:16:23 +0200 |
commit | 659aa4c0f83e609a47d57fe2616930fa317e7423 (patch) | |
tree | 63df703a358356504e6dd9a634a037c6a1e4cae9 /test | |
parent | a87aedd8a50aa1e6edfc08b91e7e766e2a07033d (diff) | |
download | qtdeclarative-testsuites-659aa4c0f83e609a47d57fe2616930fa317e7423.tar.gz |
Replace runTestCase with assert helpers [test/built-ins/Array/prototype/some]
Diffstat (limited to 'test')
169 files changed, 273 insertions, 1042 deletions
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 5bc4c44c4..5631376e0 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 3390ade0e..6d60a2dc4 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 19db289e2..1b2ff04da 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 fca4eab7f..1519bbe50 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 101bcbf29..fcaf21b31 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 1271a0e06..80ac3077e 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 90860cffd..dfae54fdd 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 1f5488cb6..d2dff83bc 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 69e72f163..4160b0f10 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 ac5b875a2..b21980e99 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 68810cb5e..ec4681eae 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 95e22540d..c9d1b4d94 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 72770693b..c0e5373b0 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 34fdd974c..834e85fdb 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 b5e58eecf..50b9af52a 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 0aa12ddc1..9baa1b181 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 f01c633de..81a2d8a36 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 5bb677183..0f6dcebf5 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 5264bdebf..aeabcc364 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 f96b72e90..d7f7c7a82 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 c8068c37f..3673c6733 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 11f6cbaf2..2306c70eb 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 8a41eb789..3ae57edd4 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 2c510e8cc..d8a3c51bc 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 aff479774..148b919e7 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 f327b12b2..7cb0234b4 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 71bcca315..040840143 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 f90237c9e..1d7558877 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 9501598b3..962c26fc8 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 17f018890..14e8593f2 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 cafe6d503..8bf8dab6e 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 4fe874441..b5c96f86a 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 8336f1807..41f5efd35 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 897f64fc9..eae26e52b 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 959cb8162..eddfe5fc4 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 417bfc05c..21983f5e9 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 8a5900e97..b8d2c6992 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 aefbaa5ba..cf4f8e965 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 384f7829f..062fd9440 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 0e4bfb502..c4adabf3d 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 2de405e4e..1d21ba73b 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 16b471c2e..49e906c23 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 3b3206f3b..b4d05c060 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 738111d3e..38094020c 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 a21d02470..191395dfd 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 9124ab3eb..8d4820af8 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 f0f4cb48b..546b694d0 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 67119c5bc..7dee4335b 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 05effd57c..c11d34616 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 1c0da633c..4071be49c 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 1d8894821..746cd0e72 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 ae7e5538f..5660bb38b 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 b569765a5..81fc420f7 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 34090273c..a00be078a 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 70408ed70..18c45ba7e 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 8c5dac20b..bf9588eff 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 110a9bcd9..73e47faeb 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 46d931789..5fbc51240 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 2a34f2a9c..47a0ac99d 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 d86084167..eb3675d1a 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 750deaa02..9044f2e04 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 dcbe3ac80..737e6b8cc 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 e5e6ccf8a..d9b397e2b 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 1542364dd..c6bda3120 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 b6cd996a2..934a6926a 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 b46cdca58..f908db8cd 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 8818408b9..e38574bd6 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 f7ec5b943..6017b6418 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 e5a1f41bd..745c4890c 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 251327005..950f89e65 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 53fbff405..1474a7633 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 f672cd90e..65566dc82 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 cc11abb79..3b6664195 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 083515014..f4b9cb3ad 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 63485fc85..5c8a0c08a 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 7c7f75459..585296c6b 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 48b93e97c..48eba7753 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 f759bd9d6..dd5fb68b2 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 55d2c2e31..0ac93ebd8 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 2270801f2..0938957b1 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 961e0a74d..8e5cd7785 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 3e6ae1fcb..6fc8106c0 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 89753378e..34000d458 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 4b9e2fc97..bde75aaa2 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 7fe3ff939..75d3d366f 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 7bd14a3be..558afcfc8 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 12b14620d..f016db5a3 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 ff5630f8c..8352a2ccb 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 d14e59b92..f556eaee5 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 6813824f4..d44ed2a72 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 008358f00..0e9cd5b4a 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 7dc8bd56f..a67bf7f29 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 c821639dd..8d5beb1bf 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 b919cb1e1..318eeea8c 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 8e132900c..c9dd307ea 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 af2e115e2..8285fa0de 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 3485969c8..856e734e3 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 df370de95..23ffb639e 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 0895b0190..8c93ce27f 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 9216ca14a..bd334b397 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 4a73d60cb..587b1e1ea 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 9cb57bdbb..cecb63178 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 fac851931..e1e1e0f3d 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 0bf7e31bb..c520a3770 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 3674745a7..2c29fbdc9 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 17181ad22..8c11c1dc9 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 ea8744718..da667e6df 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 82333a288..8647fc966 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 b92048956..60643bc6b 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 f9cc62ff4..ac68d0968 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 232ca82c8..99ca002e3 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 493aa3f1c..92b5d06fb 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 3210cc8c6..dba95e67b 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 5bd54f220..521c8701c 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 f2fe46c1b..e80c86205 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 6dfc8eea9..6e51aa5ac 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 015c56323..7a4a995a9 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 042265a77..106dc32d9 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 692b2f45f..69fbdcdb3 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 295ed4a00..22a2d145a 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 b74b017ac..c53c52ade 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 26e128c9d..ac058570e 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 e5ec3c47f..752813de2 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 50d84d5a1..01dd49a5e 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 f714878d2..d39ebfbe5 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 a662073f4..2d8c5da6a 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 eb165f31f..405841bde 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 c76074a79..c13b25b9e 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 bff2efdd7..197bb88fb 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 1b317dd18..ab59969e6 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 c2074bd8f..57debd3a5 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 c6ff83927..08486c883 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 c45289225..cdde3f074 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 e1da13a58..06745c2ef 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 cea0e31aa..aca2be6d6 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 9b56ea7a2..8cf993f72 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 211adfb5f..1bc0bf573 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 cbc9b62af..ceff0c973 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 7fb23df3d..7e52cd3c0 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 9672354a5..69f3939f6 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 ac01b995d..70012452e 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 7b91109aa..11be83fd3 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 7ac43f1a9..fbfbd5464 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 7167cf481..4c7f2e3bd 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 03837f98f..84e5710d7 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 4e29b4e50..a3f0d4959 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 48b0b63b5..9c15faaff 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 4d67e883b..7f03efbbb 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 0547e9346..84bd18fee 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 0dd7ae387..1c67dd07d 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 4ac3d1555..e6cf78220 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 a5a39d2cf..9b34d801e 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 9fac92d50..65b0e3ad4 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 b1197518c..c977e1b7f 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 be5457022..47d6d37d3 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 949ac537f..dc12ba281 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 03dae3753..59c06f78a 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 9b546a92e..48e067336 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 5519850a5..e8a7a64ac 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 50519ec42..7f3165169 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 804392832..8be153d1b 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 1731fddb0..bca47375e 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 2b502794e..85fb0e983 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 eb5bc735b..f01ca3cc5 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 c79618003..aa6373326 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 1328a2830..a646445e4 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 0fe8c6dc8..a942ac601 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 1c4d496b8..cc5744616 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 ebbd51860..3a4eb4b47 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'); |