summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2015-08-06 18:18:58 +0200
committerAndré Bargull <andre.bargull@gmail.com>2015-08-06 18:18:58 +0200
commitdf43797c70b77d4f74a0595315868485f6f816fc (patch)
tree6dfbb96908396cc1ef8153e73b93be589c918aad /test
parent976a687b27a696a9954180501109ef4a3b05eddb (diff)
downloadqtdeclarative-testsuites-df43797c70b77d4f74a0595315868485f6f816fc.tar.gz
Replace runTestCase with assert helpers [test/built-ins/Array/prototype/reduce]
Diffstat (limited to 'test')
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-0-1.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-0-2.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js6
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js6
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js6
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js6
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js6
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js18
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js10
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js10
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js11
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js6
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js10
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js10
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js10
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js10
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js10
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js10
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js10
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js11
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js7
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js9
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js8
-rw-r--r--test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js8
159 files changed, 291 insertions, 978 deletions
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-0-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-0-1.js
index f9ed27c78..b6a168723 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-0-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-0-1.js
@@ -4,13 +4,8 @@
/*---
es5id: 15.4.4.21-0-1
description: Array.prototype.reduce must exist as a function
-includes: [runTestCase.js]
---*/
-function testcase() {
var f = Array.prototype.reduce;
- if (typeof(f) === "function") {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(typeof(f), "function", 'typeof(f)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-0-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-0-2.js
index 5df27324c..06afb159d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-0-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-0-2.js
@@ -4,12 +4,6 @@
/*---
es5id: 15.4.4.21-0-2
description: Array.prototype.reduce.length must be 1
-includes: [runTestCase.js]
---*/
-function testcase() {
- if (Array.prototype.reduce.length === 1) {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.length, 1, 'Array.prototype.reduce.length');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js
index 47df4a005..3c7a850ef 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-11.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.21-1-11
description: Array.prototype.reduce applied to Date object
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(prevVal, curVal, idx, obj) {
return obj instanceof Date;
}
@@ -16,6 +14,4 @@ function testcase() {
obj.length = 1;
obj[0] = 1;
- return Array.prototype.reduce.call(obj, callbackfn, 1);
- }
-runTestCase(testcase);
+assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js
index 6c7e916d6..e107e890f 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-12.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.21-1-12
description: Array.prototype.reduce applied to RegExp object
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(prevVal, curVal, idx, obj) {
return obj instanceof RegExp;
}
@@ -16,6 +14,4 @@ function testcase() {
obj.length = 1;
obj[0] = 1;
- return Array.prototype.reduce.call(obj, callbackfn, 1);
- }
-runTestCase(testcase);
+assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js
index d14c442e2..26d6b9067 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-14.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.21-1-14
description: Array.prototype.reduce applied to Error object
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(prevVal, curVal, idx, obj) {
return obj instanceof Error;
}
@@ -16,6 +14,4 @@ function testcase() {
obj.length = 1;
obj[0] = 1;
- return Array.prototype.reduce.call(obj, callbackfn, 1);
- }
-runTestCase(testcase);
+assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js
index 726a931c8..856b8fc76 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-15.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-1-15
description: Array.prototype.reduce applied to the Arguments object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return ('[object Arguments]' === Object.prototype.toString.call(obj));
}
@@ -17,6 +14,4 @@ function testcase() {
return arguments;
}("a", "b"));
- return Array.prototype.reduce.call(obj, callbackfn, 1);
- }
-runTestCase(testcase);
+assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js
index d09aebad4..c32bd1624 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-4.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.21-1-4
description: Array.prototype.reduce applied to Boolean object
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(prevVal, curVal, idx, obj) {
return obj instanceof Boolean;
}
@@ -17,6 +15,4 @@ function testcase() {
obj[0] = 11;
obj[1] = 12;
- return Array.prototype.reduce.call(obj, callbackfn, 1);
- }
-runTestCase(testcase);
+assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js
index 137efb0b4..d9a979e1b 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-6.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.21-1-6
description: Array.prototype.reduce applied to Number object
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(prevVal, curVal, idx, obj) {
return obj instanceof Number;
}
@@ -16,6 +14,5 @@ function testcase() {
obj.length = 2;
obj[0] = 11;
obj[1] = 12;
- return Array.prototype.reduce.call(obj, callbackfn, 1);
- }
-runTestCase(testcase);
+
+assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js
index 9cc9e3584..3f69d4521 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-7.js
@@ -4,15 +4,10 @@
/*---
es5id: 15.4.4.21-1-7
description: Array.prototype.reduce applied to string primitive
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return obj instanceof String;
}
- return Array.prototype.reduce.call("abc", callbackfn, 1);
- }
-runTestCase(testcase);
+assert(Array.prototype.reduce.call("abc", callbackfn, 1), 'Array.prototype.reduce.call("abc", callbackfn, 1) !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js
index aa6377c36..714bfbb4d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-8.js
@@ -4,17 +4,12 @@
/*---
es5id: 15.4.4.21-1-8
description: Array.prototype.reduce applied to String object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return obj instanceof String;
}
var obj = new String("abc");
- return Array.prototype.reduce.call(obj, callbackfn, 1);
- }
-runTestCase(testcase);
+assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js
index 9c8cf1dfd..e6ccb13a7 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-1-9.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.21-1-9
description: Array.prototype.reduce applied to Function object
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(prevVal, curVal, idx, obj) {
return obj instanceof Function;
}
@@ -18,6 +16,4 @@ function testcase() {
obj[0] = 11;
obj[1] = 9;
- return Array.prototype.reduce.call(obj, callbackfn, 1);
- }
-runTestCase(testcase);
+assert(Array.prototype.reduce.call(obj, callbackfn, 1), 'Array.prototype.reduce.call(obj, callbackfn, 1) !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js
index c0d3668f6..3e1de73b4 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-1.js
@@ -6,25 +6,17 @@ es5id: 15.4.4.21-10-1
description: >
Array.prototype.reduce doesn't mutate the Array on which it is
called on
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj)
{
return 1;
}
var srcArr = [1,2,3,4,5];
srcArr.reduce(callbackfn);
- if(srcArr[0] === 1 &&
- srcArr[1] === 2 &&
- srcArr[2] === 3 &&
- srcArr[3] === 4 &&
- srcArr[4] === 5)
- {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(srcArr[0], 1, 'srcArr[0]');
+assert.sameValue(srcArr[1], 2, 'srcArr[1]');
+assert.sameValue(srcArr[2], 3, 'srcArr[2]');
+assert.sameValue(srcArr[3], 4, 'srcArr[3]');
+assert.sameValue(srcArr[4], 5, 'srcArr[4]');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js
index 81eca4210..8cdc8eebb 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-2.js
@@ -6,20 +6,12 @@ es5id: 15.4.4.21-10-2
description: >
Array.prototype.reduce reduces the array in ascending order of
indices
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj)
{
return prevVal + curVal;
}
var srcArr = ['1','2','3','4','5'];
- if(srcArr.reduce(callbackfn) === '12345')
- {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(srcArr.reduce(callbackfn), '12345', 'srcArr.reduce(callbackfn)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js
index 87784f561..ac6b33700 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-3.js
@@ -4,16 +4,12 @@
/*---
es5id: 15.4.4.21-10-3
description: Array.prototype.reduce - subclassed array of length 1
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = [1];
function foo() {}
var f = new foo();
function cb(){}
- if(f.reduce(cb) === 1)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(f.reduce(cb), 1, 'f.reduce(cb)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js
index 6b387e091..eb3928eca 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-4.js
@@ -4,16 +4,12 @@
/*---
es5id: 15.4.4.21-10-4
description: Array.prototype.reduce - subclassed array with length more than 1
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = new Array(1, 2, 3, 4);
function foo() {}
var f = new foo();
function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
- if(f.reduce(cb) === 10)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(f.reduce(cb), 10, 'f.reduce(cb)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js
index 2cbe4bb8d..a406a1ed8 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-5.js
@@ -6,20 +6,12 @@ es5id: 15.4.4.21-10-5
description: >
Array.prototype.reduce reduces the array in ascending order of
indices(initialvalue present)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj)
{
return prevVal + curVal;
}
var srcArr = ['1','2','3','4','5'];
- if(srcArr.reduce(callbackfn,'0') === '012345')
- {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(srcArr.reduce(callbackfn,'0'), '012345', 'srcArr.reduce(callbackfn,"0")');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js
index e53b35ca0..1678a8631 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-6.js
@@ -6,16 +6,12 @@ es5id: 15.4.4.21-10-6
description: >
Array.prototype.reduce - subclassed array when initialvalue
provided
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = [1,2,3,4];
function foo() {}
var f = new foo();
function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
- if(f.reduce(cb,-1) === 9)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(f.reduce(cb,-1), 9, 'f.reduce(cb,-1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js
index dcbe93842..bb6165189 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-7.js
@@ -6,16 +6,12 @@ es5id: 15.4.4.21-10-7
description: >
Array.prototype.reduce - subclassed array with length 1 and
initialvalue provided
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = [1];
function foo() {}
var f = new foo();
function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}
- if(f.reduce(cb,-1) === 0)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(f.reduce(cb,-1), 0, 'f.reduce(cb,-1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js
index 86aa67a1b..754e31290 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-10-8.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-10-8
description: Array.prototype.reduce doesn't visit expandos
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var callCnt = 0;
function callbackfn(prevVal, curVal, idx, obj)
{
@@ -20,10 +17,4 @@ function testcase() {
srcArr[true] = 11;
srcArr.reduce(callbackfn);
- if(callCnt == 4)
- {
- return true;
- }
-
- }
-runTestCase(testcase);
+assert.sameValue(callCnt, 4, 'callCnt');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js
index 88296c03e..7653134cb 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-1
description: >
Array.prototype.reduce - 'length' is own data property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -22,6 +19,4 @@ function testcase() {
length: 2
};
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js
index f9d57dd58..ab09f8ea1 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-10.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-10
description: >
Array.prototype.reduce applied to Array-like object, 'length' is
an inherited accessor property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -32,6 +29,4 @@ function testcase() {
child[1] = 11;
child[2] = 9;
- return Array.prototype.reduce.call(child, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js
index c5aaaa67a..40657d6c1 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-11.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-11
description: >
Array.prototype.reduce applied to Array-like object, 'length' is
an own accessor property without a get function
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -25,6 +22,5 @@ function testcase() {
configurable: true
});
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js
index 919647eda..7697a8bcd 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-13.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-13
description: >
Array.prototype.reduce applied to Array-like object that 'length'
is inherited accessor property without a get function
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -30,6 +27,5 @@ function testcase() {
child[0] = 11;
child[1] = 12;
- return Array.prototype.reduce.call(child, callbackfn, 1) === 1 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), 1, 'Array.prototype.reduce.call(child, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js
index 616d481ec..c82e17103 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-14.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-14
description: >
Array.prototype.reduce applied to the Array-like object that
'length' property doesn't exist
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -19,7 +16,5 @@ function testcase() {
var obj = { 0: 11, 1: 12 };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
-
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js
index f0b58b065..841c3266e 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-17.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-17
description: >
Array.prototype.reduce applied to the Arguments object, which
implements its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -20,6 +17,4 @@ function testcase() {
return Array.prototype.reduce.call(arguments, callbackfn, 1);
};
- return func(12, 11) === true;
- }
-runTestCase(testcase);
+assert.sameValue(func(12, 11), true, 'func(12, 11)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js
index 39c7fb90f..9f72d44be 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-18.js
@@ -6,17 +6,12 @@ es5id: 15.4.4.21-2-18
description: >
Array.prototype.reduce applied to String object, which implements
its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 3);
}
var str = new String("012");
- return Array.prototype.reduce.call(str, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(str, callbackfn, 1), true, 'Array.prototype.reduce.call(str, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js
index b5a6fc104..2affbf266 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-19.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-19
description: >
Array.prototype.reduce applied to Function object, which
implements its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -22,6 +19,4 @@ function testcase() {
fun[1] = 11;
fun[2] = 9;
- return Array.prototype.reduce.call(fun, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(fun, callbackfn, 1), true, 'Array.prototype.reduce.call(fun, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js
index d5b04de32..dfd1d93fe 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-2.js
@@ -4,15 +4,10 @@
/*---
es5id: 15.4.4.21-2-2
description: Array.prototype.reduce - 'length' is own data property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
- return [12, 11].reduce(callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue([12, 11].reduce(callbackfn, 1), true, '[12, 11].reduce(callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js
index 6a3a47cdd..fb9124117 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-3.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-3
description: >
Array.prototype.reduce - 'length' is an own data property that
overrides an inherited data property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -26,6 +23,4 @@ function testcase() {
child[1] = 11;
child[2] = 9;
- return Array.prototype.reduce.call(child, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js
index c9cd2af88..7d5b5c4b9 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-5
description: >
Array.prototype.reduce applied to Array-like object, 'length' is
an own data property that overrides an inherited accessor property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -36,6 +33,4 @@ function testcase() {
child[1] = 11;
child[2] = 9;
- return Array.prototype.reduce.call(child, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js
index a78487cff..03acf1257 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-6.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-6
description: >
Array.prototype.reduce applied to Array-like object, 'length' is
an inherited data property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -25,6 +22,4 @@ function testcase() {
child[1] = 11;
child[2] = 9;
- return Array.prototype.reduce.call(child, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js
index adbabf8ce..041084fc9 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-7.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-7
description: >
Array.prototype.reduce applied to Array-like object, 'length' is
an own accessor property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -28,6 +25,4 @@ function testcase() {
obj[1] = 11;
obj[2] = 9;
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js
index 099169a67..fc1b7ddcc 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-8.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-2-8
description: >
Array.prototype.reduce applied to Array-like object, 'length' is
an own accessor property that overrides an inherited data property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -33,6 +30,4 @@ function testcase() {
child[1] = 11;
child[2] = 9;
- return Array.prototype.reduce.call(child, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js
index 3573898f3..bb13c5fdc 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-2-9.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce applied to Array-like object, 'length' is
an own accessor property that overrides an inherited accessor
property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (obj.length === 2);
}
@@ -41,6 +38,4 @@ function testcase() {
child[1] = 11;
child[2] = 9;
- return Array.prototype.reduce.call(child, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(child, callbackfn, 1), true, 'Array.prototype.reduce.call(child, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js
index 65889e730..37934077d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-1.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-3-1
description: Array.prototype.reduce - value of 'length' is undefined
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 0, 1: 1, length: undefined };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js
index 8343d81ee..a3f6cea74 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-10.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-10
description: >
Array.prototype.reduce - value of 'length' is number primitive
(value is NaN)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 9, length: NaN };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js
index d4ad07c5f..31c311af8 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-11.js
@@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-11
description: >
Array.prototype.reduce - 'length' is a string containing a
positive number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
var obj = { 1: 11, 2: 9, length: "2" };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js
index 2365eb653..1707e5d42 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-12.js
@@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-12
description: >
Array.prototype.reduce - 'length' is a string containing a
negative number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
var obj = { 1: 11, 2: 9, length: "-4294967294" };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js
index 8a8e950a3..cc310f68e 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-13.js
@@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-13
description: >
Array.prototype.reduce - 'length' is a string containing a decimal
number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
var obj = { 1: 11, 2: 9, length: "2.5" };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js
index 424041eca..2780fc4ee 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-14.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-3-14
description: Array.prototype.reduce - 'length' is a string containing -Infinity
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed2 = false;
function callbackfn2(prevVal, curVal, idx, obj) {
@@ -18,7 +15,5 @@ function testcase() {
var obj2 = { 0: 9, length: "-Infinity" };
- return Array.prototype.reduce.call(obj2, callbackfn2, 1) === 1
- && !accessed2;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj2, callbackfn2, 1), 1, 'Array.prototype.reduce.call(obj2, callbackfn2, 1)');
+assert.sameValue(accessed2, false, 'accessed2');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js
index 7def35b7b..afc324344 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-15.js
@@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-15
description: >
Array.prototype.reduce - 'length' is a string containing an
exponential number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
var obj = { 1: 11, 2: 9, length: "2E0" };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js
index 23804aa91..9bbc9eeaa 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-16.js
@@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-16
description: >
Array.prototype.reduce - 'length' is a string containing a hex
number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
var obj = { 1: 11, 2: 9, length: "0x0002" };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js
index 921445a8b..690bbf7e1 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-17.js
@@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-17
description: >
Array.prototype.reduce - 'length' is a string containing a number
with leading zeros
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
var obj = { 1: 11, 2: 9, length: "0002.00" };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js
index 845c3e77f..a9080d059 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-18.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-18
description: >
Array.prototype.reduce - value of 'length' is a string that can't
convert to a number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 9, length: "asdf!_" };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js
index 5943822b4..d585f3422 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-19.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-19
description: >
Array.prototype.reduce - value of 'length' is an Object which has
an own toString method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
@@ -25,6 +22,4 @@ function testcase() {
}
};
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js
index e4cd999a3..fd6781f5a 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-2.js
@@ -6,18 +6,12 @@ es5id: 15.4.4.21-3-2
description: >
Array.prototype.reduce - value of 'length' is a boolean (value is
true)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 0);
}
var obj = { 0: 11, 1: 9, length: true };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
-
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js
index 1db54db83..3bbdb5514 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-20.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-20
description: >
Array.prototype.reduce - value of 'length' is an object which has
an own valueOf method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
@@ -25,6 +22,4 @@ function testcase() {
}
};
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js
index 641f227ac..6df7cf31e 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-21.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - 'length' is an object that has an own
valueOf method that returns an object and toString method that
returns a string
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var valueOfOccured = false;
var toStringOccured = false;
@@ -34,6 +31,6 @@ function testcase() {
}
};
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfOccured && toStringOccured;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert(valueOfOccured, 'valueOfOccured !== true');
+assert(toStringOccured, 'toStringOccured !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js
index 3db766290..5231d12ff 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-23.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-23
description: >
Array.prototype.reduce uses inherited valueOf method - 'length' is
an object with an own toString and inherited valueOf methods
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var valueOfAccessed = false;
var toStringAccessed = false;
@@ -41,6 +38,6 @@ function testcase() {
length: child
};
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfAccessed && !toStringAccessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert(valueOfAccessed, 'valueOfAccessed !== true');
+assert.sameValue(toStringAccessed, false, 'toStringAccessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js
index c08fc1a65..ceaeabd19 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-24.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.21-3-24
description: >
Array.prototype.reduce - value of 'length' is a positive
non-integer, ensure truncation occurs in the proper direction
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
@@ -20,6 +18,4 @@ function testcase() {
length: 2.685
};
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js
index 08eb40fa7..4728d9f4f 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-25.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-25
description: >
Array.prototype.reduce - value of 'length' is a negative
non-integer
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
@@ -21,6 +18,4 @@ function testcase() {
length: -4294967294.5
};
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js
index 50b23de4b..f988b1dc8 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-3.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-3-3
description: Array.prototype.reduce - value of 'length' is a number (value is 0)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 1, 1: 1, length: 0 };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js
index 9806b73d4..b6a0e3ba2 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-4
description: >
Array.prototype.reduce - value of 'length' is a number (value is
+0)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 11, length: +0 };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js
index f611533a1..dd3dc6159 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-5
description: >
Array.prototype.reduce - value of 'length' is a number (value is
-0)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 11, length: -0 };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js
index 200e9cf60..8a307a43d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-6.js
@@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-6
description: >
Array.prototype.reduce - value of 'length' is a number (value is
positive)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
var obj = { 1: 11, 2: 9, length: 2 };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === true;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), true, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js
index 953274886..9499dd414 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-7.js
@@ -6,17 +6,12 @@ es5id: 15.4.4.21-3-7
description: >
Array.prototype.reduce - value of 'length' is a number (value is
negative)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return (curVal === 11 && idx === 1);
}
var obj = { 1: 11, 2: 9, length: -4294967294 };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js
index 8943a1929..122c00077 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-3-9.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-3-9
description: >
Array.prototype.reduce - value of 'length' is a number (value is
-Infinity)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 9, length: -Infinity };
- return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 1), 1, 'Array.prototype.reduce.call(obj, callbackfn, 1)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js
index 68b217dec..5d5da70f6 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-4-12.js
@@ -4,17 +4,13 @@
/*---
es5id: 15.4.4.21-4-12
description: Array.prototype.reduce - 'callbackfn' is a function
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
return curVal > 10;
}
- return [11, 9].reduce(callbackfn, 1) === false && accessed;
- }
-runTestCase(testcase);
+assert.sameValue([11, 9].reduce(callbackfn, 1), false, '[11, 9].reduce(callbackfn, 1)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js
index 49eb6e0d3..294a20c49 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-5-9.js
@@ -6,16 +6,12 @@ es5id: 15.4.4.21-5-9
description: >
Array.prototype.reduce - 'initialValue' is returned if 'len' is 0
and 'initialValue' is present
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
}
- return [].reduce(callbackfn, 3) === 3 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue([].reduce(callbackfn, 3), 3, '[].reduce(callbackfn, 3)');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js
index 60a3e9977..58799e4c0 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-2
description: >
Array.prototype.reduce - modifications to length don't change
number of iterations in step 9
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
return idx;
}
@@ -25,6 +22,4 @@ function testcase() {
configurable: true
});
- return Array.prototype.reduce.call(obj, callbackfn) === 3;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn), 3, 'Array.prototype.reduce.call(obj, callbackfn)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js
index d9ecb6e2e..a7d8312cb 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-3.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-8-b-3
description: Array.prototype.reduce - loop is broken once 'kPresent' is true
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var called = 0;
var testResult = false;
var firstCalled = 0;
@@ -40,6 +37,7 @@ function testcase() {
});
arr.reduce(callbackfn);
- return testResult && firstCalled === 1 && secondCalled === 1;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
+assert.sameValue(firstCalled, 1, 'firstCalled');
+assert.sameValue(secondCalled, 1, 'secondCalled');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js
index afa7bdf8e..2015994b5 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-1
description: >
Array.prototype.reduce - element to be retrieved is own data
property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 0, 1: 1, 2: 2, length: 2 };
Array.prototype.reduce.call(obj, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js
index 6529df29b..afd039d95 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-10.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-10
description: >
Array.prototype.reduce - when element to be retrieved is own
accessor property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -28,6 +26,5 @@ function testcase() {
});
arr.reduce(callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js
index d3a2d8e52..749849c5c 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-11.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - element to be retrieved is own accessor
property that overrides an inherited data property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -35,6 +32,5 @@ function testcase() {
});
Array.prototype.reduce.call(child, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js
index 267ba2a33..a1d8b0ae5 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-13.js
@@ -7,10 +7,8 @@ description: >
Array.prototype.reduce - element to be retrieved is own accessor
property that overrides an inherited accessor property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -42,6 +40,5 @@ function testcase() {
});
Array.prototype.reduce.call(child, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js
index 4bf79ff7b..4e88911dc 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-15.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-15
description: >
Array.prototype.reduce - element to be retrieved is inherited
accessor property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -34,6 +31,5 @@ function testcase() {
child.length = 3;
Array.prototype.reduce.call(child, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js
index fc535d6ad..df2461903 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-17.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-17
description: >
Array.prototype.reduce - element to be retrieved is own accessor
property without a get function on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -26,6 +23,5 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js
index 836b0f764..56d7265b8 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-18.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-18
description: >
Array.prototype.reduce - element to be retrieved is own accessor
property without a get function on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -26,6 +23,5 @@ function testcase() {
});
arr.reduce(callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js
index 248d8441b..95847b620 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-2
description: >
Array.prototype.reduce - element to be retrieved is own data
property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -20,6 +17,5 @@ function testcase() {
var arr = [0, 1, 2];
arr.reduce(callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js
index 9bc629798..a81948773 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-21.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-21
description: >
Array.prototype.reduce - element to be retrieved is inherited
accessor property without a get function on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -32,6 +29,5 @@ function testcase() {
child.length = 3;
Array.prototype.reduce.call(child, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js
index f806300bb..ffc348e3b 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-25.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - This object is the Arguments object which
implements its own property get method (number of arguments is
less than number of parameters)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -24,6 +21,5 @@ function testcase() {
};
func(0, 1);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js
index 913112c7e..77cf2e205 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-26.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - This object is the Arguments object which
implements its own property get method (number of arguments equals
number of parameters)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 2) {
@@ -25,6 +22,5 @@ function testcase() {
};
func(0, 1, 2);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js
index 75cfe2b64..79cf151db 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-27.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - This object is the Arguments object which
implements its own property get method (number of arguments is
greater than number of parameters)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 3) {
@@ -26,6 +23,5 @@ function testcase() {
};
func(0, 1, 2, 3);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js
index 94325f7c8..451cf864f 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-28.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-28
description: >
Array.prototype.reduce - applied to String object, which
implements its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -20,7 +17,5 @@ function testcase() {
var str = new String("012");
Array.prototype.reduce.call(str, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js
index 7592901dc..ead6d3bbc 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-29.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-29
description: >
Array.prototype.reduce - applied to Function object which
implements its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -27,7 +24,5 @@ function testcase() {
obj[3] = 3;
Array.prototype.reduce.call(obj, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js
index 1e98797a9..c110f39fe 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-3.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - element to be retrieved is own data
property that overrides an inherited data property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -29,7 +26,5 @@ function testcase() {
child.length = 3;
Array.prototype.reduce.call(child, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js
index 3c611a8d0..5b44c264e 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-30.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-30
description: >
Array.prototype.reduce - element changed by getter on current
iterations is observed in subsequent iterations on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -41,6 +38,5 @@ function testcase() {
});
arr.reduce(callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js
index 2f4076f1b..84ebb3340 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-31.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - element changed by getter on current
iterations is observed in subsequent iterations on an Array-like
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -42,7 +39,5 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js
index d8db9e89a..d9f5cd35d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-5.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - element to be retrieved is own data
property that overrides an inherited accessor property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -40,6 +37,5 @@ function testcase() {
child[1] = "1";
Array.prototype.reduce.call(child, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js
index e72682d8c..6abc1c045 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-7.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-7
description: >
Array.prototype.reduce - element to be retrieved is inherited data
property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -26,6 +23,5 @@ function testcase() {
child.length = 3;
Array.prototype.reduce.call(child, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js
index a7cb749e3..2226c04b2 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-iii-1-9.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-iii-1-9
description: >
Array.prototype.reduce - element to be retrieved is own accessor
property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 1) {
@@ -27,6 +24,5 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js
index 8b7b014c1..97a2f04fa 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-1.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.21-9-1
description: >
Array.prototype.reduce doesn't consider new elements added to
array after it is called
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(prevVal, curVal, idx, obj) {
arr[5] = 6;
arr[2] = 3;
@@ -17,6 +15,5 @@ function testcase() {
}
var arr = [1, 2, , 4, '5'];
- return arr.reduce(callbackfn) === "105";
- }
-runTestCase(testcase);
+
+assert.sameValue(arr.reduce(callbackfn), "105", 'arr.reduce(callbackfn)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js
index 9746e1cbf..f5a45d660 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-10.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-10
description: >
Array.prototype.reduce called with an initial value doesn't
consider new elements added to array after it is called
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj) {
arr[5] = 6;
arr[2] = 3;
@@ -18,6 +15,5 @@ function testcase() {
}
var arr = [1,2,,4,'5'];
- return arr.reduce(callbackfn, "") === "12345";
- }
-runTestCase(testcase);
+
+assert.sameValue(arr.reduce(callbackfn, ""), "12345", 'arr.reduce(callbackfn, "")');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js
index 00a8baf1d..0999bcdc8 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-2
description: >
Array.prototype.reduce considers new value of elements in array
after it is called
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj)
{
arr[3] = -2;
@@ -19,8 +16,5 @@ function testcase() {
}
var arr = [1,2,3,4,5];
- if(arr.reduce(callbackfn) === 3)
- return true;
-
- }
-runTestCase(testcase);
+
+assert.sameValue(arr.reduce(callbackfn), 3, 'arr.reduce(callbackfn)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js
index e90142598..b183adfbd 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-4
description: >
Array.prototype.reduce doesn't visit deleted elements when
Array.length is decreased
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj)
{
arr.length = 2;
@@ -18,8 +15,5 @@ function testcase() {
}
var arr = [1,2,3,4,5];
- if(arr.reduce(callbackfn) === 3 )
- return true;
-
- }
-runTestCase(testcase);
+
+assert.sameValue(arr.reduce(callbackfn), 3, 'arr.reduce(callbackfn)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js
index 8676b3e38..c6e96e9a7 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-5
description: >
Array.prototype.reduce - callbackfn not called for array with one
element
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var callCnt = 0;
function callbackfn(prevVal, curVal, idx, obj)
{
@@ -19,7 +16,6 @@ function testcase() {
}
var arr = [1];
- if(arr.reduce(callbackfn) === 1 && callCnt === 0 )
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(arr.reduce(callbackfn), 1, 'arr.reduce(callbackfn)');
+assert.sameValue(callCnt, 0, 'callCnt');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js
index 07285709e..9f6baab99 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-7.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.21-9-7
description: >
Array.prototype.reduce stops calling callbackfn once the array is
deleted during the call
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(prevVal, curVal, idx, obj) {
delete o.arr;
return prevVal + curVal;
@@ -17,6 +15,6 @@ function testcase() {
var o = new Object();
o.arr = ['1', 2, 3, 4, 5];
- return o.arr.reduce(callbackfn) === "12345" && !o.hasOwnProperty("arr");
- }
-runTestCase(testcase);
+
+assert.sameValue(o.arr.reduce(callbackfn), "12345", 'o.arr.reduce(callbackfn)');
+assert.sameValue(o.hasOwnProperty("arr"), false, 'o.hasOwnProperty("arr")');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js
index d2b396980..66dd77475 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-8.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-8
description: Array.prototype.reduce - no observable effects occur if 'len' is 0
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var callbackAccessed = false;
function callbackfn() {
@@ -26,6 +23,6 @@ function testcase() {
});
Array.prototype.reduce.call(obj, function () { }, "initialValue");
- return !accessed && !callbackAccessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(accessed, false, 'accessed');
+assert.sameValue(callbackAccessed, false, 'callbackAccessed');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js
index bd97d824f..ccf92a2d6 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-9.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.21-9-9
description: >
Array.prototype.reduce - modifications to length don't change
number of iterations in step 9
-includes: [runTestCase.js]
---*/
-function testcase() {
var called = 0;
function callbackfn(accum, val, idx, obj) {
called++;
@@ -27,6 +25,5 @@ function testcase() {
var newAccum = arr.reduce(callbackfn, "initialValue");
- return newAccum === "initialValue01" && called === 2;
- }
-runTestCase(testcase);
+assert.sameValue(newAccum, "initialValue01", 'newAccum');
+assert.sameValue(called, 2, 'called');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js
index 5b50b0226..4a7990498 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-1.js
@@ -6,19 +6,12 @@ es5id: 15.4.4.21-9-b-1
description: >
Array.prototype.reduce returns initialvalue when Array is empty
and initialValue is present
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj)
{
}
var arr = new Array(10);
- if(arr.reduce(callbackfn,5) === 5)
- return true;
-
- }
-runTestCase(testcase);
+assert.sameValue(arr.reduce(callbackfn,5), 5, 'arr.reduce(callbackfn,5)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js
index 7eb49ee79..3ec5f1161 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-14.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-14
description: >
Array.prototype.reduce - decreasing length of array in step 8
causes deleted index property not to be visited
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -33,6 +30,5 @@ function testcase() {
arr.reduce(callbackfn);
- return testResult && accessed;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js
index 9737b8120..880948afe 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-16.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - decreasing length of array in step 8 does
not delete non-configurable properties
flags: [noStrict]
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(accum, val, idx, obj) {
@@ -39,6 +36,4 @@ function testcase() {
arr.reduce(callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js
index e86b5b32b..d113edf65 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-17.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-17
description: >
Array.prototype.reduce - properties added into own object are
visited on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(accum, val, idx, obj) {
@@ -35,6 +32,5 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn, "initialValue");
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js
index e1c0178ed..fdd1232be 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-18.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-18
description: >
Array.prototype.reduce - properties added into own object are
visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(accum, val, idx, obj) {
@@ -35,6 +32,5 @@ function testcase() {
});
arr.reduce(callbackfn, "initialValue");
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js
index fb21cd668..76ec6be5a 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-2
description: >
Array.prototype.reduce - added properties in step 2 are visible
here
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(accum, val, idx, obj) {
@@ -31,6 +28,4 @@ function testcase() {
Array.prototype.reduce.call(obj, callbackfn, "initialValue");
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js
index 1df76b4a8..9f622a0bc 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-21.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-21
description: >
Array.prototype.reduce - deleting own property causes deleted
index property not to be visited on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -39,6 +36,6 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn, "initialValue");
- return testResult && accessed;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js
index dd7b9f67b..d276ff1f4 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-22.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-22
description: >
Array.prototype.reduce - deleting own property causes deleted
index property not to be visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -39,6 +36,6 @@ function testcase() {
});
arr.reduce(callbackfn, "initialValue");
- return testResult && accessed;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js
index 3f5ff8933..fa0595364 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-27.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-27
description: >
Array.prototype.reduce - decreasing length of array causes deleted
index property not to be visited
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -33,6 +30,5 @@ function testcase() {
arr.reduce(callbackfn, "initialValue");
- return testResult && accessed;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js
index 83ef0cbc8..4a1d05875 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-29.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - decreasing length of array does not
delete non-configurable properties
flags: [noStrict]
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(accum, val, idx, obj) {
@@ -39,6 +36,4 @@ function testcase() {
arr.reduce(callbackfn, "initialValue");
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js
index 7d36a853a..e25a0c8bc 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-3.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-3
description: >
Array.prototype.reduce - deleted properties in step 2 are visible
here
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -33,6 +30,5 @@ function testcase() {
Array.prototype.reduce.call(obj, callbackfn, "initialValue");
- return accessed && testResult;
- }
-runTestCase(testcase);
+assert(accessed, 'accessed !== true');
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js
index 21d48f2cb..eb1a8e37c 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-4
description: >
Array.prototype.reduce - properties added into own object in step
8 are visited on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(accum, val, idx, obj) {
@@ -35,6 +32,5 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js
index 71e49118e..b045c3346 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-5
description: >
Array.prototype.reduce - properties added into own object in step
8 are visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
function callbackfn(accum, val, idx, obj) {
@@ -35,6 +32,5 @@ function testcase() {
});
arr.reduce(callbackfn);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js
index 5ff818e4f..c9ae451a9 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-8.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-8
description: >
Array.prototype.reduce - deleting own property in step 8 causes
deleted index property not to be visited on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -39,6 +36,6 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn);
- return testResult && accessed;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js
index fd8d2ab0e..38291cd27 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-b-9.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-b-9
description: >
Array.prototype.reduce - deleting own property in step 8 causes
deleted index property not to be visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var testResult = true;
@@ -32,6 +29,6 @@ function testcase() {
});
arr.reduce(callbackfn);
- return testResult && accessed;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js
index aa2bfbfb3..2c5673ea9 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-1
description: >
Array.prototype.reduce - callbackfn not called for indexes never
been assigned values
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var callCnt = 0;
function callbackfn(prevVal, curVal, idx, obj)
{
@@ -20,7 +17,6 @@ function testcase() {
var arr = new Array(10);
arr[0] = arr[1] = undefined; //explicitly assigning a value
- if( arr.reduce(callbackfn) === undefined && callCnt === 1)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(arr.reduce(callbackfn), undefined, 'arr.reduce(callbackfn)');
+assert.sameValue(callCnt, 1, 'callCnt');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js
index edbce72d2..c5d969c15 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-1
description: >
Array.prototype.reduce - element to be retrieved is own data
property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -21,6 +18,5 @@ function testcase() {
var obj = { 0: 0, 1: 1, 2: 2, length: 2 };
Array.prototype.reduce.call(obj, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js
index f1d1e3436..5abbe780a 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-10.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-10
description: >
Array.prototype.reduce - element to be retrieved is own accessor
property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -29,6 +26,5 @@ function testcase() {
});
arr.reduce(callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js
index 875342dd9..54332b569 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-11.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - element to be retrieved is own accessor
property that overrides an inherited data property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -36,6 +33,5 @@ function testcase() {
});
Array.prototype.reduce.call(child, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js
index befe7caf4..2faa0cca6 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-13.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - element to be retrieved is own accessor
property that overrides an inherited accessor property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -43,6 +40,5 @@ function testcase() {
});
Array.prototype.reduce.call(child, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js
index 01d48876a..54e70886e 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-15.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-15
description: >
Array.prototype.reduce - element to be retrieved is inherited
accessor property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -35,6 +32,5 @@ function testcase() {
child.length = 3;
Array.prototype.reduce.call(child, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js
index b33016a89..aaf664665 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-17.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-17
description: >
Array.prototype.reduce - element to be retrieved is own accessor
property without a get function on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -27,6 +24,5 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js
index 525faa40d..a4f82d024 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-18.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-18
description: >
Array.prototype.reduce - element to be retrieved is own accessor
property without a get function on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -27,7 +24,5 @@ function testcase() {
});
arr.reduce(callbackfn, initialValue);
- return testResult;
-
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js
index b37f46f13..5e6915028 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-2
description: >
Array.prototype.reduce - element to be retrieved is own data
property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -21,6 +18,5 @@ function testcase() {
var arr = [0, 1];
arr.reduce(callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js
index db05c388b..350e6c04e 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-21.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-21
description: >
Array.prototype.reduce - element to be retrieved is inherited
accessor property without a get function on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -33,6 +30,5 @@ function testcase() {
child.length = 3;
Array.prototype.reduce.call(child, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js
index 0cbb4cd84..6ae39b967 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-25.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - This object is the Arguments object which
implements its own property get method (number of arguments is
less than number of parameters)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -25,6 +22,5 @@ function testcase() {
};
func(0, 1);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js
index 82999096b..fa9b3d46c 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-26.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - This object is the Arguments object which
implements its own property get method (number of arguments equals
number of parameters)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -25,6 +22,5 @@ function testcase() {
};
func(0, 1, 2);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js
index c66163677..bd13966d9 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-27.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - This object is the Arguments object which
implements its own property get method (number of arguments is
greater than number of parameters)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -25,6 +22,5 @@ function testcase() {
};
func(0, 1, 2, 3);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js
index 0795014a5..59459ffa6 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-28.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-28
description: >
Array.prototype.reduce - applied to String object, which
implements its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -22,7 +19,5 @@ function testcase() {
var str = new String("012");
Array.prototype.reduce.call(str, callbackfn, initialValue);
- return testResult;
-
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js
index c0d326e4f..eb4d19cfe 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-29.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-29
description: >
Array.prototype.reduce - applied to Function object which
implements its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -28,6 +25,5 @@ function testcase() {
obj[3] = 3;
Array.prototype.reduce.call(obj, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js
index 9ad289384..44f136d10 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-3.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - element to be retrieved is own data
property that overrides an inherited data property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -30,7 +27,5 @@ function testcase() {
child.length = 3;
Array.prototype.reduce.call(child, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js
index a7d94e4f3..da35414d3 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-30.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-30
description: >
Array.prototype.reduce - element changed by getter on previous
iterations is observed on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -42,6 +39,5 @@ function testcase() {
});
arr.reduce(callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js
index 1bcce7f11..852b4289e 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-31.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-31
description: >
Array.prototype.reduce - element changed by getter on previous
iterations is observed on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -42,7 +39,5 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js
index f8e08c1a9..cacb0e36b 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-5.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - element to be retrieved is own data
property that overrides an inherited accessor property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -43,6 +40,5 @@ function testcase() {
child[1] = "1";
Array.prototype.reduce.call(child, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js
index 4e0dbb299..90e6a5677 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-7.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-7
description: >
Array.prototype.reduce - element to be retrieved is inherited data
property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -27,6 +24,5 @@ function testcase() {
child.length = 3;
Array.prototype.reduce.call(child, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js
index 86c84f0ca..a7f92f8b6 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-i-9.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-i-9
description: >
Array.prototype.reduce - element to be retrieved is own accessor
property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var testResult = false;
var initialValue = 0;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -28,7 +25,5 @@ function testcase() {
});
Array.prototype.reduce.call(obj, callbackfn, initialValue);
- return testResult;
- }
-runTestCase(testcase);
+assert(testResult, 'testResult !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js
index 3a96b3f72..18fe4e63c 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-1
description: >
Array.prototype.reduce - callbackfn called with correct parameters
(initialvalue not passed)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(prevVal, curVal, idx, obj)
{
if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal)
@@ -20,7 +17,5 @@ function testcase() {
}
var arr = [0,1,true,null,new Object(),"five"];
- if( arr.reduce(callbackfn) === "five")
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(arr.reduce(callbackfn), "five", 'arr.reduce(callbackfn)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js
index 68646c07c..de1864bc9 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-10.js
@@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-10
description: >
Array.prototype.reduce - callbackfn is called with 1 formal
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var result = false;
function callbackfn(prevVal) {
result = (prevVal === 1);
}
[11].reduce(callbackfn, 1);
- return result;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js
index 44070bdbe..33fb22ec3 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-11.js
@@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-11
description: >
Array.prototype.reduce - callbackfn is called with 2 formal
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var result = false;
function callbackfn(prevVal, curVal) {
result = (curVal > 10 && 1 === prevVal);
}
[11].reduce(callbackfn, 1);
- return result;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js
index 42407c4e4..26b296bae 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-12.js
@@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-12
description: >
Array.prototype.reduce - callbackfn is called with 3 formal
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var result = false;
function callbackfn(prevVal, curVal, idx) {
result = (prevVal === 1 && arguments[3][idx] === curVal);
}
[11].reduce(callbackfn, 1);
- return result;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js
index ad0e086ce..6f148ee49 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-13.js
@@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-13
description: >
Array.prototype.reduce - callbackfn is called with 4 formal
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var result = false;
function callbackfn(prevVal, curVal, idx, obj) {
result = (prevVal === 1 && obj[idx] === curVal);
}
[11].reduce(callbackfn, 1);
- return result;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js
index 81c879421..f6ac6ab95 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-14.js
@@ -4,17 +4,13 @@
/*---
es5id: 15.4.4.21-9-c-ii-14
description: Array.prototype.reduce - callbackfn that uses arguments
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var result = false;
function callbackfn() {
result = (arguments[0] === 1 && arguments[3][arguments[2]] === arguments[1]);
}
[11].reduce(callbackfn, 1);
- return result;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js
index 7bad0ecfe..51516da72 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-16.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-16
description: Array.prototype.reduce - non-indexed properties are not called
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var result1 = true;
var result2 = true;
@@ -27,6 +24,7 @@ function testcase() {
var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 };
Array.prototype.reduce.call(obj, callbackfn, 1);
- return result1 && result2 && accessed;
- }
-runTestCase(testcase);
+
+assert(result1, 'result1 !== true');
+assert(result2, 'result2 !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js
index 0ec567ef8..9d6531359 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-17.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-17
description: >
Array.prototype.reduce - 'accumulator' used for current iteration
is the result of previous iteration on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var result = true;
var accessed = false;
var preIteration = 1;
@@ -24,6 +21,6 @@ function testcase() {
}
[11, 12, 13].reduce(callbackfn, 1);
- return result && accessed;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js
index 01ae0dfd2..a3f9f8fe7 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-18.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - value of 'accumulator' used for first
iteration is the value of 'initialValue' when it is present on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var result = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 0) {
@@ -22,6 +19,5 @@ function testcase() {
var obj = { 0: 11, 1: 9, length: 2 };
Array.prototype.reduce.call(obj, callbackfn, 1);
- return result;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js
index 52aaa89ea..766779d1f 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-19.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.reduce - value of 'accumulator' used for first
iteration is the value of least index property which is not
undefined when 'initialValue' is not present on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var called = 0;
var result = false;
function callbackfn(prevVal, curVal, idx, obj) {
@@ -22,6 +19,6 @@ function testcase() {
}
[11, 9].reduce(callbackfn);
- return result && called === 1;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
+assert.sameValue(called, 1, 'called');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js
index 7aa907f38..15ad8ace1 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-2
description: >
Array.prototype.reduce - callbackfn called with correct parameters
(initialvalue passed)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var bParCorrect = false;
function callbackfn(prevVal, curVal, idx, obj)
{
@@ -24,7 +21,5 @@ function testcase() {
var arr = [0,1,true,null,new Object(),"five"];
var initialValue = 5.5;
- if( arr.reduce(callbackfn,initialValue) === "five")
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(arr.reduce(callbackfn,initialValue), "five", 'arr.reduce(callbackfn,initialValue)');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js
index 1af81d84d..27e59f803 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-20.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-20
description: Array.prototype.reduce - undefined can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -17,6 +14,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, undefined) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, undefined), true, 'Array.prototype.reduce.call(obj, callbackfn, undefined)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js
index 98bcb4acd..8e061807b 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-21.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-21
description: Array.prototype.reduce - null can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -17,6 +14,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, null) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, null), true, 'Array.prototype.reduce.call(obj, callbackfn, null)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js
index 8eff43af5..17528b9bb 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-22.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-22
description: >
Array.prototype.reduce - boolean primitive can be used as
accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, false) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, false), true, 'Array.prototype.reduce.call(obj, callbackfn, false)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js
index c06bc3aca..9ed6701d1 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-23.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-23
description: >
Array.prototype.reduce - number primitive can be used as
accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, 12) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, 12), true, 'Array.prototype.reduce.call(obj, callbackfn, 12)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js
index 3ca3a438f..d4068840c 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-24.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-24
description: >
Array.prototype.reduce - string primitive can be used as
accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, "hello_") === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, "hello_"), true, 'Array.prototype.reduce.call(obj, callbackfn, "hello_")');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js
index 35aa57223..34c73fb08 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-25.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-25
description: Array.prototype.reduce - Function object can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var objFunction = function () { };
var accessed = false;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, objFunction) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objFunction), true, 'Array.prototype.reduce.call(obj, callbackfn, objFunction)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js
index 409cae622..326e7a081 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-26.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-26
description: Array.prototype.reduce - Array object can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var objArray = new Array(10);
var accessed = false;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, objArray) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objArray), true, 'Array.prototype.reduce.call(obj, callbackfn, objArray)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js
index 7bd5cec23..727c12185 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-27.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-27
description: Array.prototype.reduce - String object can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var objString = new String();
var accessed = false;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, objString) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objString), true, 'Array.prototype.reduce.call(obj, callbackfn, objString)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js
index 230308bf6..03006716d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-28.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-28
description: Array.prototype.reduce - Boolean object can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var objBoolean = new Boolean();
var accessed = false;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, objBoolean) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objBoolean), true, 'Array.prototype.reduce.call(obj, callbackfn, objBoolean)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js
index cff38a8db..39f163756 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-29.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-29
description: Array.prototype.reduce - Number object can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var objNumber = new Number();
var accessed = false;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, objNumber) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objNumber), true, 'Array.prototype.reduce.call(obj, callbackfn, objNumber)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js
index 239322be0..3074cd1e6 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-3.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-3
description: Array.prototype.reduce - callbackfn takes 4 arguments
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var bCalled = false;
function callbackfn(prevVal, curVal, idx, obj)
{
@@ -19,7 +16,6 @@ function testcase() {
return false;
}
var arr = [0,1,2,3,4,5,6,7,8,9];
- if(arr.reduce(callbackfn,true) === true && bCalled === true)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(arr.reduce(callbackfn,true), true, 'arr.reduce(callbackfn,true)');
+assert.sameValue(bCalled, true, 'bCalled');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js
index 383aa5716..d810b428d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-30.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-30
description: Array.prototype.reduce - the Math object can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -17,6 +14,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, Math) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, Math), true, 'Array.prototype.reduce.call(obj, callbackfn, Math)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js
index 9f7904ecf..c6cd280b3 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-31.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-31
description: Array.prototype.reduce - Date object can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var objDate = new Date();
var accessed = false;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, objDate) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objDate), true, 'Array.prototype.reduce.call(obj, callbackfn, objDate)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js
index 025e0419b..adb6a57ab 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-32.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-32
description: Array.prototype.reduce - RegExp object can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var objRegExp = new RegExp();
var accessed = false;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, objRegExp) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objRegExp), true, 'Array.prototype.reduce.call(obj, callbackfn, objRegExp)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js
index 0c973e920..bc7dc899d 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-33.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-33
description: Array.prototype.reduce - the JSON can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -17,6 +14,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, JSON) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, JSON), true, 'Array.prototype.reduce.call(obj, callbackfn, JSON)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js
index 1e81b884f..9a9c1ea52 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-34.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.21-9-c-ii-34
description: Array.prototype.reduce - Error object can be used as accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var objError = new RangeError();
var accessed = false;
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, objError) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, objError), true, 'Array.prototype.reduce.call(obj, callbackfn, objError)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js
index 00dac48c3..dbd0e6106 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-35.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-35
description: >
Array.prototype.reduce - the Arguments object can be used as
accumulator
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var arg;
@@ -25,6 +22,5 @@ function testcase() {
arg = arguments;
}(10, 11, 12, 13));
- return Array.prototype.reduce.call(obj, callbackfn, arg) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, arg), true, 'Array.prototype.reduce.call(obj, callbackfn, arg)');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js
index e49546d60..b2a788187 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-37.js
@@ -6,13 +6,9 @@ es5id: 15.4.4.21-9-c-ii-37
description: >
Array.prototype.reduce - the global object can be used as
accumulator
-includes:
- - runTestCase.js
- - fnGlobalObject.js
+includes: [fnGlobalObject.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(prevVal, curVal, idx, obj) {
accessed = true;
@@ -21,6 +17,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
- return Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject()) === true && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject()), true, 'Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject())');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js
index 8fc526b30..468d72a27 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4-s.js
@@ -7,10 +7,8 @@ description: >
Array.prototype.reduce - undefined passed as thisValue to strict
callbackfn
flags: [noStrict]
-includes: [runTestCase.js]
---*/
-function testcase() {
var innerThisCorrect = false;
function callbackfn(prevVal, curVal, idx, obj)
{
@@ -19,6 +17,5 @@ function testcase() {
return true;
}
[0].reduce(callbackfn,true);
- return innerThisCorrect;
- }
-runTestCase(testcase);
+
+assert(innerThisCorrect, 'innerThisCorrect !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js
index e8a1fd2c0..a3da080eb 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-4
description: >
Array.prototype.reduce - k values are passed in acending numeric
order on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var arr = [0, 1, 2];
var lastIdx = 0;
var result = true;
@@ -26,6 +23,6 @@ function testcase() {
}
arr.reduce(callbackfn, 11);
- return result && accessed;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js
index ebdb2a013..d0efec527 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-5
description: >
Array.prototype.reduce - k values are accessed during each
iteration and not prior to starting the loop on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var result = true;
var kIndex = [];
var called = 0;
@@ -32,6 +29,5 @@ function testcase() {
[11, 12, 13, 14].reduce(callbackfn, 1);
- return result && called === 4;
- }
-runTestCase(testcase);
+assert(result, 'result !== true');
+assert.sameValue(called, 4, 'called');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js
index cb50d526c..1c3956cca 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-8.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.21-9-c-ii-8
description: >
Array.prototype.reduce - element changed by callbackfn on previous
iterations is observed
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var result = false;
function callbackfn(prevVal, curVal, idx, obj) {
if (idx === 0) {
@@ -25,6 +22,5 @@ function testcase() {
var obj = { 0: 11, 1: 12, length: 2 };
Array.prototype.reduce.call(obj, callbackfn, 1);
- return result;
- }
-runTestCase(testcase);
+
+assert(result, 'result !== true');
diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js
index 84ad5fcc2..58824ccf5 100644
--- a/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js
+++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-9-c-ii-9.js
@@ -6,17 +6,13 @@ es5id: 15.4.4.21-9-c-ii-9
description: >
Array.prototype.reduce - callbackfn is called with 0 formal
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var called = 0;
function callbackfn() {
called++;
}
[11, 12].reduce(callbackfn, 1);
- return 2 === called;
- }
-runTestCase(testcase);
+
+assert.sameValue(called, 2, 'called');