summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-0-1.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-0-2.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js6
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js18
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js16
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js10
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js10
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js10
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js12
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js10
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js10
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js10
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js10
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js11
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js10
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js10
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js7
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js8
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js12
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js9
-rw-r--r--test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js9
173 files changed, 394 insertions, 1079 deletions
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-0-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-0-1.js
index 810ab7bf6..c507b89db 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-0-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-0-1.js
@@ -4,13 +4,8 @@
/*---
es5id: 15.4.4.20-0-1
description: Array.prototype.filter must exist as a function
-includes: [runTestCase.js]
---*/
-function testcase() {
var f = Array.prototype.filter;
- if (typeof(f) === "function") {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert.sameValue(typeof(f), "function", 'typeof(f)');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-0-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-0-2.js
index 1838bb94b..e5d615e58 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-0-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-0-2.js
@@ -4,12 +4,6 @@
/*---
es5id: 15.4.4.20-0-2
description: Array.prototype.filter.length must be 1
-includes: [runTestCase.js]
---*/
-function testcase() {
- if (Array.prototype.filter.length === 1) {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(Array.prototype.filter.length, 1, 'Array.prototype.filter.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js
index 58d4c06d9..95809f57a 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-11.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-1-11
description: Array.prototype.filter applied to Date object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj instanceof Date;
}
@@ -19,6 +16,4 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr[0] === 1;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 1, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js
index 23f615cd4..f460711cc 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-12.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-1-12
description: Array.prototype.filter applied to RegExp object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj instanceof RegExp;
}
@@ -18,6 +15,5 @@ function testcase() {
obj[1] = true;
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr[0] === true;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr[0], true, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js
index 79e505554..96dd3b7a9 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-14.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-1-14
description: Array.prototype.filter applied to Error object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj instanceof Error;
}
@@ -19,6 +16,4 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr[0] === 1;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 1, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js
index 09cf3cb84..50393de99 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-15.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-1-15
description: Array.prototype.filter applied to the Arguments object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return '[object Arguments]' === Object.prototype.toString.call(obj);
}
@@ -19,6 +16,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr[0] === "a" && newArr[1] === "b";
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], "a", 'newArr[0]');
+assert.sameValue(newArr[1], "b", 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js
index acbfe8cef..f4d747e56 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-4.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-1-4
description: Array.prototype.filter applied to Boolean Object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj instanceof Boolean;
}
@@ -20,6 +17,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr[0] === 11 && newArr[1] === 12;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert.sameValue(newArr[1], 12, 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js
index 003165023..1f3c28404 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-6.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-1-6
description: Array.prototype.filter applied to Number object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj instanceof Number;
}
@@ -19,6 +16,6 @@ function testcase() {
obj[1] = 12;
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr[0] === 11 && newArr[1] === 12;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert.sameValue(newArr[1], 12, 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js
index 36bf5c54a..1389ccaca 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-7.js
@@ -4,17 +4,12 @@
/*---
es5id: 15.4.4.20-1-7
description: Array.prototype.filter applied to string primitive
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj instanceof String;
}
var newArr = Array.prototype.filter.call("abc", callbackfn);
- return newArr[0] === "a";
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], "a", 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js
index e7a928805..5f659fadd 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-8.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.20-1-8
description: Array.prototype.filter applied to String object
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(val, idx, obj) {
return obj instanceof String;
}
@@ -15,6 +13,4 @@ function testcase() {
var obj = new String("abc");
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr[0] === "a";
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], "a", 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js
index 0152e7a75..ec8777ce6 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-1-9.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-1-9
description: Array.prototype.filter applied to Function object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj instanceof Function;
}
@@ -21,6 +18,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr[0] === 11 && newArr[1] === 9;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert.sameValue(newArr[1], 9, 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js
index 9bb86b4e4..b446af28b 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-1.js
@@ -6,25 +6,17 @@ es5id: 15.4.4.20-10-1
description: >
Array.prototype.filter doesn't mutate the Array on which it is
called on
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj)
{
return true;
}
var srcArr = [1,2,3,4,5];
srcArr.filter(callbackfn);
- if(srcArr[0] === 1 &&
- srcArr[1] === 2 &&
- srcArr[2] === 3 &&
- srcArr[3] === 4 &&
- srcArr[4] === 5)
- {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(srcArr[0], 1, 'srcArr[0]');
+assert.sameValue(srcArr[1], 2, 'srcArr[1]');
+assert.sameValue(srcArr[2], 3, 'srcArr[2]');
+assert.sameValue(srcArr[3], 4, 'srcArr[3]');
+assert.sameValue(srcArr[4], 5, 'srcArr[4]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js
index 575563041..63125b807 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-10-2
description: >
Array.prototype.filter returns new Array with length equal to
number of true returned by callbackfn
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj)
{
if(val % 2)
@@ -20,13 +17,8 @@ function testcase() {
}
var srcArr = [1,2,3,4,5];
var resArr = srcArr.filter(callbackfn);
- if(resArr.length === 3 &&
- resArr[0] === 1 &&
- resArr[1] === 3 &&
- resArr[2] === 5)
- {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(resArr.length, 3, 'resArr.length');
+assert.sameValue(resArr[0], 1, 'resArr[0]');
+assert.sameValue(resArr[1], 3, 'resArr[1]');
+assert.sameValue(resArr[2], 5, 'resArr[2]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js
index 0efd73fb4..e5fa29fd5 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-3.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.20-10-3
description: Array.prototype.filter - subclassed array when length is reduced
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
@@ -16,9 +14,6 @@ function testcase() {
function cb(){return true;}
var a = f.filter(cb);
- if (Array.isArray(a) &&
- a.length === 1) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert(Array.isArray(a), 'Array.isArray(a) !== true');
+assert.sameValue(a.length, 1, 'a.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js
index 91f476aa6..cbfcb3a90 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-10-4.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-10-4
description: Array.prototype.filter doesn't visit expandos
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var callCnt = 0;
function callbackfn(val, idx, obj)
{
@@ -19,10 +16,5 @@ function testcase() {
srcArr[true] = 11;
var resArr = srcArr.filter(callbackfn);
- if(callCnt == 5)
- {
- return true;
- }
- }
-runTestCase(testcase);
+assert.sameValue(callCnt, 5, 'callCnt');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js
index 1d7acf36c..8c448e47b 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-1
description: >
Array.prototype.filter applied to Array-like object, 'length' is
own data property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -24,6 +21,4 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js
index e18c2500c..982e0c546 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-10.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-10
description: >
Array.prototype.filter applied to Array-like object, 'length' is
inherited accessor property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -33,6 +30,5 @@ function testcase() {
child[2] = 9;
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js
index 7ef5dbdba..95124b39d 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-11.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-11
description: >
Array.prototype.filter applied to Array-like object, 'length' is
own accessor property without a get function
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -27,6 +24,6 @@ function testcase() {
});
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && !accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js
index 55330c69e..826764cb0 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-13.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-13
description: >
Array.prototype.filter applied to the Array-like object that
'length' is inherited accessor property without a get function
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -31,6 +28,6 @@ function testcase() {
child[1] = 12;
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 0 && !accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js
index 9c913c40c..5beb53def 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-14.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-14
description: >
Array.prototype.filter applied to the Array-like object that
'length property doesn't exist
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -20,6 +17,6 @@ function testcase() {
var obj = { 0: 11, 1: 12 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && !accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js
index c443891e0..8c10fe4b6 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-17.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-17
description: >
Array.prototype.filter applied to the Arguments object, which
implements its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -20,6 +17,4 @@ function testcase() {
return newArr.length === 2;
};
- return func(12, 11);
- }
-runTestCase(testcase);
+assert(func(12, 11), 'func(12, 11) !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js
index 983ac7aab..88ecbbd66 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-18.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-18
description: >
Array.prototype.filter applied to String object, which implements
its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 3;
}
@@ -18,6 +15,5 @@ function testcase() {
var str = new String("012");
var newArr = Array.prototype.filter.call(str, callbackfn);
- return newArr.length === 3;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 3, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js
index 9336f2428..9a69d1a35 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-19.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-19
description: >
Array.prototype.filter applied to Function object, which
implements its own property get method
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -23,6 +20,5 @@ function testcase() {
fun[2] = 9;
var newArr = Array.prototype.filter.call(fun, callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js
index e1cf9585d..e2132438d 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-2.js
@@ -4,16 +4,12 @@
/*---
es5id: 15.4.4.20-2-2
description: Array.prototype.filter - 'length' is own data property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
var newArr = [12, 11].filter(callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js
index 904e93a3e..4a545de61 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-3.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-3
description: >
Array.prototype.filter applied to Array-like object, 'length' is
an own data property that overrides an inherited data property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -27,6 +24,5 @@ function testcase() {
child[2] = 9;
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js
index 8e37a011b..ce4a96ce7 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-5
description: >
Array.prototype.filter to Array-like object, 'length' is an own
data property that overrides an inherited accessor property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -37,6 +34,5 @@ function testcase() {
child[2] = 9;
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js
index eebdda9a9..4d8fc87d2 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-6.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-6
description: >
Array.prototype.filter applied to Array-like object, 'length' is
an inherited data property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -26,6 +23,5 @@ function testcase() {
child[2] = 9;
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js
index 10a595622..edcdc2b16 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-7.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-7
description: >
Array.prototype.filter applied to Array-like object, 'length' is
an own accessor property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -29,6 +26,5 @@ function testcase() {
obj[2] = 9;
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js
index 2616fccc6..6d1cc06aa 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-8.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-2-8
description: >
Array.prototype.filter applied to Array-like object, 'length' is
own accessor property that overrides an inherited data property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -34,6 +31,5 @@ function testcase() {
child[2] = 9;
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js
index c31c4e98e..42d350ef7 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-2-9.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.filter applied to Array-like object, 'length' is
an own accessor property that overrides an inherited accessor
property
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return obj.length === 2;
}
@@ -42,6 +39,5 @@ function testcase() {
child[2] = 9;
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 2;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 2, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js
index af0d6361c..97cfad3de 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-1.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-3-1
description: Array.prototype.filter - value of 'length' is undefined
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 0, 1: 1, length: undefined };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js
index d97c89b72..f911fd837 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-10.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-10
description: >
Array.prototype.filter - value of 'length' is a number (value is
NaN)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -21,6 +18,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js
index f2617dd57..1fa0f170e 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-11.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-11
description: >
Array.prototype.filter - 'length' is a string containing a
positive number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -19,6 +16,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js
index 9dc662ad1..170e54b78 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-12.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-12
description: >
Array.prototype.filter - 'length' is a string containing a
negative number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -19,6 +16,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && newArr[0] === undefined;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(newArr[0], undefined, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js
index f2074a480..d09078563 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-13.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-13
description: >
Array.prototype.filter - 'length' is a string containing a decimal
number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -19,6 +16,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js
index 0e1ffe14e..ec980eabf 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-14.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-3-14
description: Array.prototype.filter - 'length' is a string containing -Infinity
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed2 = false;
function callbackfn2(val, idx, obj) {
@@ -20,6 +17,5 @@ function testcase() {
var newArr2 = Array.prototype.filter.call(obj2, callbackfn2);
- return !accessed2 && newArr2.length === 0;
- }
-runTestCase(testcase);
+assert.sameValue(accessed2, false, 'accessed2');
+assert.sameValue(newArr2.length, 0, 'newArr2.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js
index 064d8d90b..68e5d56d1 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-15.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-15
description: >
Array.prototype.filter - 'length' is a string containing an
exponential number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -19,6 +16,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js
index 31df0b846..2b2af9bb0 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-16.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-16
description: >
Array.prototype.filter - 'length' is a string containing a hex
number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -19,6 +16,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js
index 50effddbd..1a3abfd1f 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-17.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-17
description: >
Array.prototype.filter - 'length' is a string containing a number
with leading zeros
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -19,6 +16,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js
index 4ccc2893a..e559d326a 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-18.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-18
description: >
Array.prototype.filter - value of 'length' is a string that can't
convert to a number
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -21,6 +18,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return !accessed && newArr.length === 0;
- }
-runTestCase(testcase);
+assert.sameValue(accessed, false, 'accessed');
+assert.sameValue(newArr.length, 0, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js
index bc8e3f98b..303a1fe41 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-19.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-19
description: >
Array.prototype.filter - value of 'length' is an Object which has
an own toString method.
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -27,6 +24,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js
index b79453918..9a6486f27 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-2
description: >
Array.prototype.filter applied on an Array-like object if 'length'
is 1 (length overridden to true(type conversion))
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 11, 1: 9, length: true };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js
index aa45c3073..d27da7511 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-20.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-20
description: >
Array.prototype.filter - value of 'length' is an Object which has
an own valueOf method.
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -27,6 +24,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js
index 81b5525e4..7f6eefef3 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-21.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.filter - 'length' is an object that has an own
valueOf method that returns an object and toString method that
returns a string
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var firstStepOccured = false;
var secondStepOccured = false;
@@ -36,6 +33,7 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11 && firstStepOccured && secondStepOccured;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(firstStepOccured, 'firstStepOccured !== true');
+assert(secondStepOccured, 'secondStepOccured !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js
index c8ba73fb8..6353da8a2 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-23.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-23
description: >
Array.prototype.filter uses inherited valueOf method when 'length'
is an object with an own toString and inherited valueOf methods
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var valueOfAccessed = false;
var toStringAccessed = false;
@@ -43,6 +40,7 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11 && valueOfAccessed && !toStringAccessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(valueOfAccessed, 'valueOfAccessed !== true');
+assert.sameValue(toStringAccessed, false, 'toStringAccessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js
index 11793aa4b..b15dc3f08 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-24.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-24
description: >
Array.prototype.filter - value of 'length' is a positive
non-integer, ensure truncation occurs in the proper direction
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -23,6 +20,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js
index 13e504aba..5228bab7a 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-25.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-25
description: >
Array.prototype.filter - value of 'length' is a negative
non-integer
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -23,6 +20,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && newArr[0] === undefined;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(newArr[0], undefined, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js
index 915fe8de4..4b0cdb447 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-3.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-3-3
description: Array.prototype.filter - value of 'length' is a number (value is 0)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 11, length: 0 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js
index b3b5b6ccc..0cdde8d82 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-4
description: >
Array.prototype.filter - value of 'length' is a number (value is
+0)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 11, length: +0 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js
index 687910345..2937724c9 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-5
description: >
Array.prototype.filter - value of 'length' is a number (value is
-0)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 11, length: -0 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js
index 03d93792a..9978de4fe 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-6.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-6
description: >
Array.prototype.filter - value of 'length' is a number (value is
positive)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -19,6 +16,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js
index 1d33c7324..461342772 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-7.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-7
description: >
Array.prototype.filter - value of 'length' is a number (value is
negative)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 1: 11, 2: 9, length: -4294967294 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && newArr[0] === undefined;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(newArr[0], undefined, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js
index 776f98ecd..65f307b33 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-3-9.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-3-9
description: >
Array.prototype.filter - value of 'length' is a number (value is
-Infinity)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
accessed = true;
@@ -21,6 +18,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && !accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(accessed, false, 'accessed');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js
index 9bf8f0600..1549ee785 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-4-12.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-4-12
description: Array.prototype.filter - 'callbackfn' is a function
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
if (idx === 1) {
return val === 9;
@@ -17,6 +14,6 @@ function testcase() {
}
var newArr = [11, 9].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 9;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 9, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js
index ebf975dc1..ea6126f46 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-1-s.js
@@ -5,10 +5,8 @@
es5id: 15.4.4.20-5-1-s
description: Array.prototype.filter - thisArg not passed to strict callbackfn
flags: [noStrict]
-includes: [runTestCase.js]
---*/
-function testcase() {
var innerThisCorrect = false;
function callbackfn(val, idx, obj) {
@@ -18,6 +16,5 @@ function testcase() {
}
[1].filter(callbackfn);
- return innerThisCorrect;
- }
-runTestCase(testcase);
+
+assert(innerThisCorrect, 'innerThisCorrect !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js
index cf8358a92..762c8bbce 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-10.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-10
description: Array.prototype.filter - Array Object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var objArray = new Array(10);
@@ -20,6 +17,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, objArray);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js
index 9f1000c74..9e75e1eef 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-11.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-11
description: Array.prototype.filter - String Object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var objString = new String();
@@ -19,6 +16,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, objString);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js
index 3021093d5..77ff80420 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-12.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-12
description: Array.prototype.filter - Boolean Object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var objBoolean = new Boolean();
@@ -19,6 +16,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, objBoolean);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js
index fef957b0c..393228801 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-13.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-13
description: Array.prototype.filter - Number Object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var objNumber = new Number();
@@ -19,6 +16,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, objNumber);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js
index 2809cb65c..e36f9ad9f 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-14.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-14
description: Array.prototype.filter - the Math object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -18,6 +15,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, Math);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js
index f8d1923c6..07fcb1612 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-15.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-15
description: Array.prototype.filter - Date Object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var objDate = new Date();
@@ -20,6 +17,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, objDate);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js
index 86c878731..67201a996 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-16.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-16
description: Array.prototype.filter - RegExp Object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var objRegExp = new RegExp();
@@ -20,6 +17,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, objRegExp);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js
index 34e1641e0..b7ac72b67 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-17.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.20-5-17
description: Array.prototype.filter - the JSON object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -17,6 +15,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, JSON);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js
index de325a339..5a59fb9f6 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-18.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-18
description: Array.prototype.filter - Error Object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var objError = new RangeError();
@@ -19,6 +16,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, objError);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js
index 00ad7cfbb..f57406d32 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-19.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-5-19
description: >
Array.prototype.filter - the Arguments object can be used as
thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var arg;
@@ -24,6 +21,6 @@ function testcase() {
}(1, 2, 3));
var newArr = [11].filter(callbackfn, arg);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js
index 5a9c1f146..02e553eb9 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-2.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.20-5-2
description: Array.prototype.filter - thisArg is Object
-includes: [runTestCase.js]
---*/
-function testcase() {
var res = false;
var o = new Object();
o.res = true;
@@ -18,7 +16,5 @@ function testcase() {
var srcArr = [1];
var resArr = srcArr.filter(callbackfn,o);
- if( resArr.length === 1)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(resArr.length, 1, 'resArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js
index f2933a462..a181811ef 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-21.js
@@ -4,13 +4,9 @@
/*---
es5id: 15.4.4.20-5-21
description: Array.prototype.filter - the global object can be used as thisArg
-includes:
- - runTestCase.js
- - fnGlobalObject.js
+includes: [fnGlobalObject.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -20,6 +16,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, fnGlobalObject());
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js
index 934188eca..061b7dacf 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-22.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-22
description: Array.prototype.filter - boolean primitive can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -18,6 +15,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, false);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js
index 85137c002..e7b732595 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-23.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-23
description: Array.prototype.filter - number primitive can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -18,6 +15,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, 101);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js
index c936139b1..d52a32e5b 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-24.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-24
description: Array.prototype.filter - string primitive can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -18,6 +15,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, "abc");
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js
index e541ca09c..4a4c5e3fb 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-27.js
@@ -6,13 +6,8 @@ es5id: 15.4.4.20-5-27
description: >
Array.prototype.filter - Array.isArray(arg) returns true when arg
is the returned array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var newArr = [11].filter(function () { });
- return Array.isArray(newArr);
- }
-runTestCase(testcase);
+assert(Array.isArray(newArr), 'Array.isArray(newArr) !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js
index 78620d3e6..0dc932722 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-28.js
@@ -4,13 +4,8 @@
/*---
es5id: 15.4.4.20-5-28
description: Array.prototype.filter - the returned array is instanceof Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var newArr = [11].filter(function () { });
- return newArr instanceof Array;
- }
-runTestCase(testcase);
+assert(newArr instanceof Array, 'newArr instanceof Array !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js
index 53bb28f98..5d6fd637f 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-29.js
@@ -4,13 +4,8 @@
/*---
es5id: 15.4.4.20-5-29
description: Array.prototype.filter - returns an array whose length is 0
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var newArr = [11].filter(function () { });
- return newArr.length === 0;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js
index 8da7ffcc4..2c1d815f0 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-3.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.20-5-3
description: Array.prototype.filter - thisArg is Array
-includes: [runTestCase.js]
---*/
-function testcase() {
var res = false;
var a = new Array();
a.res = true;
@@ -18,8 +16,5 @@ function testcase() {
var srcArr = [1];
var resArr = srcArr.filter(callbackfn,a);
- if( resArr.length === 1)
- return true;
- }
-runTestCase(testcase);
+assert.sameValue(resArr.length, 1, 'resArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js
index e61f0a367..8f63e7058 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-30.js
@@ -5,10 +5,8 @@
es5id: 15.4.4.20-5-30
description: Array.prototype.filter - thisArg not passed
flags: [noStrict]
-includes: [runTestCase.js]
---*/
-function testcase() {
function innerObj() {
this._15_4_4_20_5_30 = true;
var _15_4_4_20_5_30 = false;
@@ -20,6 +18,5 @@ function testcase() {
var resArr = srcArr.filter(callbackfn);
this.retVal = resArr.length === 0;
}
- return new innerObj().retVal;
- }
-runTestCase(testcase);
+
+assert(new innerObj().retVal, 'new innerObj().retVal !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js
index 476654460..5a277cdb2 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-4.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-5-4
description: >
Array.prototype.filter - thisArg is object from object
template(prototype)
-includes: [runTestCase.js]
---*/
-function testcase() {
var res = false;
function callbackfn(val, idx, obj)
{
@@ -22,8 +20,5 @@ function testcase() {
var srcArr = [1];
var resArr = srcArr.filter(callbackfn,f);
- if( resArr.length === 1)
- return true;
- }
-runTestCase(testcase);
+assert.sameValue(resArr.length, 1, 'resArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js
index 015f506d7..dbcd62231 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-5.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.20-5-5
description: Array.prototype.filter - thisArg is object from object template
-includes: [runTestCase.js]
---*/
-function testcase() {
var res = false;
function callbackfn(val, idx, obj)
{
@@ -20,8 +18,5 @@ function testcase() {
var srcArr = [1];
var resArr = srcArr.filter(callbackfn,f);
- if( resArr.length === 1)
- return true;
- }
-runTestCase(testcase);
+assert.sameValue(resArr.length, 1, 'resArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js
index 779deaf48..1eb2df4c2 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-6.js
@@ -4,10 +4,8 @@
/*---
es5id: 15.4.4.20-5-6
description: Array.prototype.filter - thisArg is function
-includes: [runTestCase.js]
---*/
-function testcase() {
var res = false;
function callbackfn(val, idx, obj)
{
@@ -19,8 +17,5 @@ function testcase() {
var srcArr = [1];
var resArr = srcArr.filter(callbackfn,foo);
- if( resArr.length === 1)
- return true;
- }
-runTestCase(testcase);
+assert.sameValue(resArr.length, 1, 'resArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js
index eb53a8cc1..a6afd0c20 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-7.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-7
description: Array.prototype.filter - built-in functions can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -18,6 +15,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, eval);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js
index d0b5799a7..3fdc374e7 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-5-9.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-5-9
description: Array.prototype.filter - Function Object can be used as thisArg
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
var objFunction = function () { };
@@ -19,6 +16,5 @@ function testcase() {
var newArr = [11].filter(callbackfn, objFunction);
- return newArr[0] === 11 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js
index c39bccca9..853db3f7a 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-1.js
@@ -6,15 +6,10 @@ es5id: 15.4.4.20-6-1
description: >
Array.prototype.filter returns an empty array if 'length' is 0
(empty array)
-includes: [runTestCase.js]
---*/
-function testcase() {
function cb(){}
var a = [].filter(cb);
- if (Array.isArray(a) &&
- a.length === 0) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert(Array.isArray(a), 'Array.isArray(a) !== true');
+assert.sameValue(a.length, 0, 'a.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js
index 418c5fa2c..df38841a6 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-2.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-2
description: >
Array.prototype.filter returns an empty array if 'length' is 0
(subclassed Array, length overridden to null (type conversion))
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
@@ -18,9 +16,6 @@ function testcase() {
function cb(){}
var a = f.filter(cb);
- if (Array.isArray(a) &&
- a.length === 0) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert(Array.isArray(a), 'Array.isArray(a) !== true');
+assert.sameValue(a.length, 0, 'a.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js
index 31b450472..093e48da0 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-3.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-3
description: >
Array.prototype.filter returns an empty array if 'length' is 0
(subclassed Array, length overridden to false (type conversion))
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
@@ -18,9 +16,6 @@ function testcase() {
function cb(){}
var a = f.filter(cb);
- if (Array.isArray(a) &&
- a.length === 0) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert(Array.isArray(a), 'Array.isArray(a) !== true');
+assert.sameValue(a.length, 0, 'a.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js
index d2206a109..fb2d3a9e6 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-4.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-4
description: >
Array.prototype.filter returns an empty array if 'length' is 0
(subclassed Array, length overridden to 0 (type conversion))
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
@@ -18,9 +16,6 @@ function testcase() {
function cb(){}
var a = f.filter(cb);
- if (Array.isArray(a) &&
- a.length === 0) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert(Array.isArray(a), 'Array.isArray(a) !== true');
+assert.sameValue(a.length, 0, 'a.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js
index 011bcd8e7..268fb9211 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-5.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-5
description: >
Array.prototype.filter returns an empty array if 'length' is 0
(subclassed Array, length overridden to '0' (type conversion))
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
@@ -18,9 +16,6 @@ function testcase() {
function cb(){}
var a = f.filter(cb);
- if (Array.isArray(a) &&
- a.length === 0) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert(Array.isArray(a), 'Array.isArray(a) !== true');
+assert.sameValue(a.length, 0, 'a.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js
index fddd24394..8ec27a1cd 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-6.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-6
description: >
Array.prototype.filter returns an empty array if 'length' is 0
(subclassed Array, length overridden with obj with valueOf)
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
@@ -20,9 +18,6 @@ function testcase() {
function cb(){}
var a = f.filter(cb);
- if (Array.isArray(a) &&
- a.length === 0) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert(Array.isArray(a), 'Array.isArray(a) !== true');
+assert.sameValue(a.length, 0, 'a.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js
index b10787f27..8075b1500 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-7.js
@@ -7,10 +7,8 @@ description: >
Array.prototype.filter returns an empty array if 'length' is 0
(subclassed Array, length overridden with obj w/o valueOf
(toString))
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
@@ -27,9 +25,6 @@ function testcase() {
function cb(){}
var a = f.filter(cb);
- if (Array.isArray(a) &&
- a.length === 0) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert(Array.isArray(a), 'Array.isArray(a) !== true');
+assert.sameValue(a.length, 0, 'a.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js
index ac90c170b..e526241d8 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-6-8.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-6-8
description: >
Array.prototype.filter returns an empty array if 'length' is 0
(subclassed Array, length overridden with []
-includes: [runTestCase.js]
---*/
-function testcase() {
foo.prototype = new Array(1, 2, 3);
function foo() {}
var f = new foo();
@@ -33,9 +31,6 @@ function testcase() {
function cb(){}
var a = f.filter(cb);
- if (Array.isArray(a) &&
- a.length === 0) {
- return true;
- }
- }
-runTestCase(testcase);
+
+assert(Array.isArray(a), 'Array.isArray(a) !== true');
+assert.sameValue(a.length, 0, 'a.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js
index fa09007c7..0e430bde3 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-1
description: >
Array.prototype.filter doesn't consider new elements added to
array after it is called
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
srcArr[2] = 3;
srcArr[5] = 6;
@@ -19,7 +16,5 @@ function testcase() {
var srcArr = [1, 2, , 4, 5];
var resArr = srcArr.filter(callbackfn);
- return resArr.length === 5;
- }
-runTestCase(testcase);
+assert.sameValue(resArr.length, 5, 'resArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js
index 75f400bee..8e60bc4e0 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-2
description: >
Array.prototype.filter considers new value of elements in array
after it is called
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj)
{
srcArr[2] = -1;
@@ -23,8 +20,7 @@ function testcase() {
var srcArr = [1,2,3,4,5];
var resArr = srcArr.filter(callbackfn);
- if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4)
- return true;
-
- }
-runTestCase(testcase);
+
+assert.sameValue(resArr.length, 3, 'resArr.length');
+assert.sameValue(resArr[0], 1, 'resArr[0]');
+assert.sameValue(resArr[2], 4, 'resArr[2]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js
index 8c0290da0..12d72803a 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-4
description: >
Array.prototype.filter doesn't visit deleted elements when
Array.length is decreased
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj)
{
srcArr.length = 2;
@@ -19,8 +16,5 @@ function testcase() {
var srcArr = [1,2,3,4,6];
var resArr = srcArr.filter(callbackfn);
- if(resArr.length === 2 )
- return true;
-
- }
-runTestCase(testcase);
+
+assert.sameValue(resArr.length, 2, 'resArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js
index 78318cca8..30c8ddf1f 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-5
description: >
Array.prototype.filter doesn't consider newly added elements in
sparse array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj)
{
srcArr[1000] = 3;
@@ -21,8 +18,5 @@ function testcase() {
srcArr[1] = 1;
srcArr[2] = 2;
var resArr = srcArr.filter(callbackfn);
- if( resArr.length === 2)
- return true;
-
- }
-runTestCase(testcase);
+
+assert.sameValue(resArr.length, 2, 'resArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js
index eb157c05c..1b356a04d 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-7.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-9-7
description: >
Array.prototype.filter stops calling callbackfn once the array is
deleted during the call
-includes: [runTestCase.js]
---*/
-function testcase() {
var o = new Object();
o.srcArr = [1, 2, 3, 4, 5];
@@ -22,6 +20,6 @@ function testcase() {
}
var resArr = o.srcArr.filter(callbackfn);
- return resArr.length === 5 && typeof o.srcArr === "undefined";
- }
-runTestCase(testcase);
+
+assert.sameValue(resArr.length, 5, 'resArr.length');
+assert.sameValue(typeof o.srcArr, "undefined", 'typeof o.srcArr');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js
index 983acbe1c..920928338 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-8.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-9-8
description: Array.prototype.filter - no observable effects occur if len is 0
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -20,6 +17,6 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return accessed === false && obj.length === 0 && newArr.length === 0;
- }
-runTestCase(testcase);
+assert.sameValue(accessed, false, 'accessed');
+assert.sameValue(obj.length, 0, 'obj.length');
+assert.sameValue(newArr.length, 0, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js
index d28ebcfe1..9faa3c3c2 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-9.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-9
description: >
Array.prototype.filter - modifications to length don't change
number of iterations
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var called = 0;
function callbackfn(val, idx, obj) {
@@ -30,6 +27,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 2 && 2 === called;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 2, 'newArr.length');
+assert.sameValue(called, 2, 'called');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js
index d90377c62..86b22f227 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-1
description: >
Array.prototype.filter - callbackfn not called for indexes never
been assigned values
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var callCnt = 0;
function callbackfn(val, idx, obj)
{
@@ -21,7 +18,6 @@ function testcase() {
var srcArr = new Array(10);
srcArr[1] = undefined; //explicitly assigning a value
var resArr = srcArr.filter(callbackfn);
- if( resArr.length === 0 && callCnt === 1)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(resArr.length, 0, 'resArr.length');
+assert.sameValue(callCnt, 1, 'callCnt');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js
index b90f5fb89..6e0cb62b4 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-14.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-14
description: >
Array.prototype.filter - decreasing length of array causes index
property not to be visited
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -27,6 +24,5 @@ function testcase() {
var newArr = arr.filter(callbackfn);
- return newArr.length === 3 && newArr[2] === 2;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 3, 'newArr.length');
+assert.sameValue(newArr[2], 2, 'newArr[2]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js
index 7a5e4926f..35377f2fb 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-16.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.filter - decreasing length of array does not
delete non-configurable properties
flags: [noStrict]
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -35,6 +32,5 @@ function testcase() {
var newArr = arr.filter(callbackfn);
- return newArr.length === 3 && newArr[2] === "unconfigurable";
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 3, 'newArr.length');
+assert.sameValue(newArr[2], "unconfigurable", 'newArr[2]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js
index a4f4529c8..dfbf64112 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-2
description: >
Array.prototype.filter - added properties in step 2 are visible
here
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -27,6 +24,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === "length";
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], "length", 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js
index b404aaa9e..80020fa7e 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-3.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-3
description: >
Array.prototype.filter - deleted properties in step 2 are visible
here
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -26,6 +23,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] !== 6.99;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.notSameValue(newArr[0], 6.99, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js
index 236635a92..eae3e1678 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-4
description: >
Array.prototype.filter - properties added into own object after
current position are visited on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -32,6 +29,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 2 && newArr[1] === 6.99;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 2, 'newArr.length');
+assert.sameValue(newArr[1], 6.99, 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js
index bb63b59ad..bb049f1e0 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-5.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-9-b-5
description: >
Array.prototype.filter - properties added into own object after
current position are visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(val, idx, obj) {
return true;
}
@@ -31,6 +29,5 @@ function testcase() {
var newArr = arr.filter(callbackfn);
- return newArr.length === 3 && newArr[1] === 6.99;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 3, 'newArr.length');
+assert.sameValue(newArr[1], 6.99, 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js
index 4b2351574..7888ab9c3 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-8.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-9-b-8
description: >
Array.prototype.filter - deleting own property causes index
property not to be visited on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
var accessed = false;
var obj = { length: 2 };
@@ -35,6 +33,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 0;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 0, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js
index 13cc85453..1198c054c 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-b-9.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-b-9
description: >
Array.prototype.filter - deleting own property causes index
property not to be visited on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -33,6 +30,5 @@ function testcase() {
var newArr = arr.filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 0;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 0, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js
index 802be2dd9..e0a71dc8d 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-1
description: >
Array.prototype.filter - element to be retrieved is own data
property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var kValue = {};
function callbackfn(val, idx, obj) {
return (idx === 5) && (val === kValue);
@@ -20,6 +17,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === kValue;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], kValue, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js
index 73a95f2c4..6cc5ec419 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-10.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-10
description: >
Array.prototype.filter - element to be retrieved is own accessor
property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return idx === 2 && val === 12;
}
@@ -25,6 +22,5 @@ function testcase() {
});
var newArr = arr.filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 12;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 12, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js
index e7ed89eef..a9ce26971 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-11.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.filter - element to be retrieved is own accessor
property that overrides an inherited data property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return idx === 0 && val === 11;
}
@@ -32,6 +29,5 @@ function testcase() {
});
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js
index da47ff946..e8dd405e8 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-13.js
@@ -7,10 +7,8 @@ description: >
Array.prototype.filter - element to be retrieved is own accessor
property that overrides an inherited accessor property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(val, idx, obj) {
return idx === 1 && val === 12;
}
@@ -38,6 +36,5 @@ function testcase() {
});
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 1 && newArr[0] === 12;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 12, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js
index c149c4059..3244f03db 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-15.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-15
description: >
Array.prototype.filter - element to be retrieved is inherited
accessor property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return val === 11 && idx === 1;
}
@@ -31,6 +28,5 @@ function testcase() {
child.length = 20;
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js
index fcace81de..bbc08a967 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-17.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-17
description: >
Array.prototype.filter - element to be retrieved is own accessor
property without a get function on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return undefined === val && idx === 1;
}
@@ -23,6 +20,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === undefined;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], undefined, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js
index 1cab9d884..6e445a0b8 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-18.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-18
description: >
Array.prototype.filter - element to be retrieved is own accessor
property without a get function on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return undefined === val && idx === 0;
}
@@ -24,6 +21,5 @@ function testcase() {
var newArr = arr.filter(callbackfn);
- return newArr.length === 1 && newArr[0] === undefined;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], undefined, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js
index 061a80055..dc8ba25f9 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-2.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-2
description: >
Array.prototype.filter - element to be retrieved is own data
property on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
if (idx === 0) {
return val === 11;
@@ -19,6 +16,5 @@ function testcase() {
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js
index 59a85d009..5c9af8a2a 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-21.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-21
description: >
Array.prototype.filter - element to be retrieved is inherited
accessor property without a get function on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return val === undefined && idx === 1;
}
@@ -28,6 +25,5 @@ function testcase() {
child.length = 2;
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 1 && newArr[0] === undefined;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], undefined, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js
index 1fb0f1282..4ffa430fa 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-25.js
@@ -7,10 +7,8 @@ description: >
Array.prototype.filter - This object is the Arguments object which
implements its own property get method (number of arguments is
less than number of parameters)
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(val, idx, obj) {
return val === 11 && idx === 0;
}
@@ -21,6 +19,5 @@ function testcase() {
var newArr = func(11);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js
index 2f3f84d2a..c56c14fba 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-26.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.filter - This object is the Arguments object which
implements its own property get method (number of arguments equals
number of parameters)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
if (idx === 0) {
return val === 11;
@@ -27,7 +24,6 @@ function testcase() {
};
var newArr = func(11, 9);
- return newArr.length === 2 && newArr[0] === 11 &&
- newArr[1] === 9;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 2, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert.sameValue(newArr[1], 9, 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js
index 23fe0f2e4..595424887 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-27.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.filter - This object is the Arguments object which
implements its own property get method (number of arguments is
greater than number of parameters)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
if (idx === 0) {
return val === 11;
@@ -29,7 +26,7 @@ function testcase() {
};
var newArr = func(11, 12, 9);
- return newArr.length === 3 && newArr[0] === 11 &&
- newArr[1] === 12 && newArr[2] === 9;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 3, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert.sameValue(newArr[1], 12, 'newArr[1]');
+assert.sameValue(newArr[2], 9, 'newArr[2]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js
index d4e3fee5c..61d444c94 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-28.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-28
description: >
Array.prototype.filter - element changed by getter on previous
iterations is observed on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var preIterVisible = false;
var arr = [];
@@ -38,6 +35,5 @@ function testcase() {
});
var newArr = arr.filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 9;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 9, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js
index 27611554d..04ffb5c42 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-29.js
@@ -6,10 +6,8 @@ es5id: 15.4.4.20-9-c-i-29
description: >
Array.prototype.filter - element changed by getter on previous
iterations is observed on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
function callbackfn(val, idx, obj) {
return val === 9 && idx === 1;
}
@@ -37,6 +35,5 @@ function testcase() {
});
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 9;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 9, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js
index 7b8bdeff1..199d43e39 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-3.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.filter - element to be retrieved is own data
property that overrides an inherited data property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return (idx === 5) && (val === "abc");
}
@@ -27,6 +24,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 1 && newArr[0] === "abc";
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], "abc", 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js
index f1c644ffb..9a0c8b197 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-5.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.filter - element to be retrieved is own data
property that overrides an inherited accessor property on an
Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return idx === 0 && val === 11;
}
@@ -38,6 +35,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js
index df63165cd..83dc74ad3 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-7.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-7
description: >
Array.prototype.filter - element to be retrieved is inherited data
property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var kValue = 'abc';
function callbackfn(val, idx, obj) {
@@ -27,6 +24,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(child, callbackfn);
- return newArr.length === 1 && newArr[0] === kValue;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], kValue, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js
index 4eee6faa1..ff21e3316 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-i-9.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-i-9
description: >
Array.prototype.filter - element to be retrieved is own accessor
property on an Array-like object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return (idx === 0) && (val === 11);
}
@@ -25,6 +22,6 @@ function testcase() {
});
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js
index 5eb9a84ff..036a70386 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-1.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-9-c-ii-1
description: Array.prototype.filter - callbackfn called with correct parameters
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var bPar = true;
var bCalled = false;
function callbackfn(val, idx, obj)
@@ -22,7 +19,6 @@ function testcase() {
srcArr[999999] = -6.6;
var resArr = srcArr.filter(callbackfn);
- if(bCalled === true && bPar === true)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(bCalled, true, 'bCalled');
+assert.sameValue(bPar, true, 'bPar');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js
index 5e690d352..467350d87 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-10.js
@@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-10
description: >
Array.prototype.filter - callbackfn is called with 1 formal
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val) {
return val > 10;
}
var newArr = [12].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 12;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 12, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js
index 61083d8e4..9db1998b5 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-11.js
@@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-11
description: >
Array.prototype.filter - callbackfn is called with 2 formal
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx) {
return val > 10 && arguments[2][idx] === val;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js
index 4ba8ddcd4..e69abc72b 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-12.js
@@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-12
description: >
Array.prototype.filter - callbackfn is called with 3 formal
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return val > 10 && obj[idx] === val;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js
index ec47d0ac8..672af4d86 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-13.js
@@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-13
description: >
Array.prototype.filter - callbackfn that uses arguments object to
get parameter value
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn() {
return arguments[2][arguments[1]] === arguments[0];
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js
index 6e57df736..fd8b23eb3 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-16.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-16
description: >
Array.prototype.filter - 'this' of 'callbackfn' is a Boolean
object when T is not an object (T is a boolean)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return this.valueOf() === false;
}
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 11, length: 2 };
var newArr = Array.prototype.filter.call(obj, callbackfn, false);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js
index 9b69702dc..6a57b59ff 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-17.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-17
description: >
Array.prototype.filter -'this' of 'callbackfn' is a Number object
when T is not an object (T is a number)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, o) {
return 5 === this.valueOf();
}
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 11, length: 2 };
var newArr = Array.prototype.filter.call(obj, callbackfn, 5);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js
index 4d2ddff8f..24bc9dff3 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-18.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-18
description: >
Array.prototype.filter - 'this' of 'callbackfn' is an String
object when T is not an object (T is a string)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return 'hello' === this.valueOf();
}
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 11, length: 2 };
var newArr = Array.prototype.filter.call(obj, callbackfn, "hello");
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js
index 7539130fb..def6f012c 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-19.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-9-c-ii-19
description: Array.prototype.filter - non-indexed properties are not called
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -19,6 +16,5 @@ function testcase() {
var obj = { 0: 11, non_index_property: 8, 2: 5, length: 20 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && accessed;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js
index 89181aed8..19ca09ede 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-2.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-9-c-ii-2
description: Array.prototype.filter - callbackfn takes 3 arguments
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var parCnt = 3;
var bCalled = false
function callbackfn(val, idx, obj)
@@ -20,7 +17,6 @@ function testcase() {
var srcArr = [0,1,2,3,4,5,6,7,8,9];
var resArr = srcArr.filter(callbackfn);
- if(bCalled === true && parCnt === 3)
- return true;
- }
-runTestCase(testcase);
+
+assert.sameValue(bCalled, true, 'bCalled');
+assert.sameValue(parCnt, 3, 'parCnt');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js
index f8ddeeecc..efc02456a 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-20.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-20
description: >
Array.prototype.filter - callbackfn called with correct parameters
(thisArg is correct)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var thisArg = { threshold: 10 };
function callbackfn(val, idx, obj) {
@@ -20,6 +17,5 @@ function testcase() {
var obj = { 0: 11, length: 1 };
var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js
index 8f645d49b..455a64267 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-21.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-21
description: >
Array.prototype.filter - callbackfn called with correct parameters
(kValue is correct)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
if (idx === 0) {
return val === 11;
@@ -26,6 +23,6 @@ function testcase() {
var obj = { 0: 11, 1: 12, length: 2 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 2, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert.sameValue(newArr[1], 12, 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js
index 7279c9234..791d1af0d 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-22.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-22
description: >
Array.prototype.filter - callbackfn called with correct parameters
(the index k is correct)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
if (val === 11) {
return idx === 0;
@@ -26,6 +23,6 @@ function testcase() {
var obj = { 0: 11, 1: 12, length: 2 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 2, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
+assert.sameValue(newArr[1], 12, 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js
index ebd639110..0a17eff2b 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-23.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-23
description: >
Array.prototype.filter - callbackfn called with correct parameters
(this object O is correct)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var obj = { 0: 11, length: 2 };
function callbackfn(val, idx, o) {
@@ -19,6 +16,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js
index ec0756d6c..61a1a3f99 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-4
description: >
Array.prototype.filter - k values are passed in ascending numeric
order
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var arr = [0, 1, 2, 3, 4, 5];
var lastIdx = 0;
var called = 0;
@@ -25,6 +22,4 @@ function testcase() {
}
var newArr = arr.filter(callbackfn);
- return newArr.length === called;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, called, 'newArr.length');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js
index e16f74e72..666edc441 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-5
description: >
Array.prototype.filter - k values are accessed during each
iteration and not prior to starting the loop on an Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var kIndex = [];
var called = 0;
@@ -31,6 +28,5 @@ function testcase() {
}
var newArr = [11, 12, 13, 14].filter(callbackfn, undefined);
- return newArr.length === 0 && called === 4;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert.sameValue(called, 4, 'called');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js
index 81f717ba3..f31470f62 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-6.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-6
description: >
Array.prototype.filter - arguments to callbackfn are self
consistent
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var obj = { 0: 11, length: 1 };
var thisArg = {};
@@ -23,6 +20,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js
index 3cf88c29f..1a79ce2ea 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-8.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-ii-8
description: >
Array.prototype.filter - element changed by callbackfn on previous
iterations is observed
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var obj = { 0: 11, 1: 12, length: 2 };
function callbackfn(val, idx, o) {
@@ -22,6 +19,5 @@ function testcase() {
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js
index c03e60dad..82844f7c1 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-ii-9.js
@@ -6,16 +6,12 @@ es5id: 15.4.4.20-9-c-ii-9
description: >
Array.prototype.filter - callbackfn is called with 0 formal
parameter
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn() {
return true;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js
index 2844a1112..621cc22d4 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-1.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-1-1
description: >
Array.prototype.filter - value of returned array element equals to
'kValue'
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -18,6 +15,5 @@ function testcase() {
var obj = { 0: 11, 1: 9, length: 2 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr[0] === obj[0] && newArr[1] === obj[1];
- }
-runTestCase(testcase);
+assert.sameValue(newArr[0], obj[0], 'newArr[0]');
+assert.sameValue(newArr[1], obj[1], 'newArr[1]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js
index 54d6e284e..c2c65aec8 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-3.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-1-3
description: >
Array.prototype.filter - value of returned array element can be
enumerated
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -28,6 +25,4 @@ function testcase() {
}
}
- return enumerable;
- }
-runTestCase(testcase);
+assert(enumerable, 'enumerable !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js
index 1c10d784c..465f03d93 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-1-5
description: >
Array.prototype.filter - values of 'to' are passed in acending
numeric order
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var arr = [0, 1, 2, 3, 4];
var lastToIdx = 0;
var called = 0;
@@ -25,6 +22,5 @@ function testcase() {
}
var newArr = arr.filter(callbackfn);
- return newArr.length === 5 && called === 5;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 5, 'newArr.length');
+assert.sameValue(called, 5, 'called');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js
index 7fd945994..8a748a8bf 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-1-6.js
@@ -7,11 +7,8 @@ description: >
Array.prototype.filter - values of 'to' are accessed during each
iteration when 'selected' is converted to true and not prior to
starting the loop
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var toIndex = [];
var called = 0;
@@ -32,6 +29,5 @@ function testcase() {
}
var newArr = [11, 12, 13, 14].filter(callbackfn, undefined);
- return newArr.length === 4 && called === 4;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 4, 'newArr.length');
+assert.sameValue(called, 4, 'called');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js
index 6dcb0ba28..3b39bc22e 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-10.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-10
description: >
Array.prototype.filter return value of callbackfn is a number
(value is negative number)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return -5;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js
index 63eaf9607..e6801a0b9 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-11.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-11
description: >
Array.prototype.filter return value of callbackfn is a number
(value is Infinity)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return Infinity;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js
index 7683080c6..8f08dfd77 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-12.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-12
description: >
Array.prototype.filter return value of callbackfn is a number
(value is -Infinity)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return -Infinity;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js
index 71e8eb2c0..30d079816 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-13.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-13
description: >
Array.prototype.filter return value of callbackfn is a number
(value is NaN)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -19,6 +16,6 @@ function testcase() {
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 0 && accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js
index e703ae5bb..8fd768e2d 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-14.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-14
description: >
Array.prototype.filter return value of callbackfn is an empty
string
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -19,6 +16,6 @@ function testcase() {
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 0 && accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js
index 9a38dbebd..756a98225 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-15.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-15
description: >
Array.prototype.filter return value of callbackfn is a non-empty
string
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return "non-empty string";
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js
index ef699515c..e9af95d1a 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-16.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-16
description: >
Array.prototype.filter return value of callbackfn is a Function
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return function () { };
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js
index 078f06d02..5de45f6b3 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-17.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-17
description: >
Array.prototype.filter return value of callbackfn is an Array
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return new Array(10);
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js
index 024ed4f7c..bf495741f 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-18.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-18
description: >
Array.prototype.filter return value of callbackfn is a String
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return new String();
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js
index 3c43c07ef..537bc1823 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-19.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-19
description: >
Array.prototype.filter return value of callbackfn is a Boolean
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return new Boolean();
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js
index 49e9d9d80..36115cb3f 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-2.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-9-c-iii-2
description: Array.prototype.filter - return value of callbackfn is undefined
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, o) {
@@ -19,6 +16,6 @@ function testcase() {
var obj = { 0: 11, length: 1 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js
index 4a698dd26..b0a76cc98 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-20.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-20
description: >
Array.prototype.filter - return value of callbackfn is a Number
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return new Number();
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js
index 36d08b622..70cdd1d9f 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-21.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-21
description: >
Array.prototype.filter - return value of callbackfn is the Math
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return Math;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js
index 292a70712..7a1dc81cc 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-22.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-22
description: >
Array.prototype.filter - return value of callbackfn is a Date
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return new Date();
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js
index c69d6c58e..4cc1be3b3 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-23.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-23
description: >
Array.prototype.filter - return value of callbackfn is a RegExp
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return new RegExp();
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js
index b3d989a9d..2e9dbb431 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-24.js
@@ -6,17 +6,13 @@ es5id: 15.4.4.20-9-c-iii-24
description: >
Array.prototype.filter - return value of callbackfn is the JSON
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return JSON;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js
index 2ee67815c..6444609de 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-25.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-25
description: >
Array.prototype.filter - return value of callbackfn is an Error
object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return new EvalError();
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js
index ab979d034..dda54944f 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-26.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-26
description: >
Array.prototype.filter - return value of callbackfn is the
Arguments object
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return arguments;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js
index 0777dbe29..4bd224f22 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-28.js
@@ -6,18 +6,14 @@ es5id: 15.4.4.20-9-c-iii-28
description: >
Array.prototype.filter - return value of callbackfn is the global
object
-includes:
- - runTestCase.js
- - fnGlobalObject.js
+includes: [fnGlobalObject.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return fnGlobalObject();
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js
index bcbaffe31..616822e1f 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-29.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-29
description: >
Array.prototype.filter - false prevents element added to output
Array
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var called = 0;
function callbackfn(val, idx, obj) {
@@ -21,7 +18,7 @@ function testcase() {
var obj = { 0: 11, 1: 8, length: 20 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] !== 8 && called === 2;
- }
-runTestCase(testcase);
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.notSameValue(newArr[0], 8, 'newArr[0]');
+assert.sameValue(called, 2, 'called');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js
index 542cda5b0..6487fd929 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-3.js
@@ -4,11 +4,8 @@
/*---
es5id: 15.4.4.20-9-c-iii-3
description: Array.prototype.filter - return value of callbackfn is null
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -19,6 +16,6 @@ function testcase() {
var obj = { 0: 11, length: 1 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js
index acc0c0a2d..ccdafac4a 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-30.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-30
description: >
Array.prototype.filter - return value (new Boolean(false)) of
callbackfn is treated as true value
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return new Boolean(false);
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js
index d476381fe..009734858 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-4.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-4
description: >
Array.prototype.filter - return value of callbackfn is a boolean
(value is false)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -21,6 +18,6 @@ function testcase() {
var obj = { 0: 11, length: 1 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 0 && accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js
index 82317a141..70b3c651e 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-5.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-5
description: >
Array.prototype.filter - return value of callbackfn is a boolean
(value is true)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return true;
}
@@ -18,6 +15,6 @@ function testcase() {
var obj = { 0: 11, length: 1 };
var newArr = Array.prototype.filter.call(obj, callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js
index 5d4c34ee4..cf029cb4b 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-6.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-6
description: >
Array.prototype.filter - return value of callbackfn is a number
(value is 0)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -19,6 +16,6 @@ function testcase() {
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 0 && accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js
index 5ff2a7502..2dda2ab49 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-7.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-7
description: >
Array.prototype.filter - return value of callbackfn is a number
(value is +0)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -19,6 +16,6 @@ function testcase() {
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 0 && accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js
index 0f4663f99..23263f961 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-8.js
@@ -6,11 +6,8 @@ es5id: 15.4.4.20-9-c-iii-8
description: >
Array.prototype.filter - return value of callbackfn is a nunmber
(value is -0)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
var accessed = false;
function callbackfn(val, idx, obj) {
@@ -19,6 +16,6 @@ function testcase() {
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 0 && accessed;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 0, 'newArr.length');
+assert(accessed, 'accessed !== true');
diff --git a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js
index a756d7841..b9eac5296 100644
--- a/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js
+++ b/test/built-ins/Array/prototype/filter/15.4.4.20-9-c-iii-9.js
@@ -6,16 +6,13 @@ es5id: 15.4.4.20-9-c-iii-9
description: >
Array.prototype.filter - return value of callbackfn is a number
(value is positive number)
-includes: [runTestCase.js]
---*/
-function testcase() {
-
function callbackfn(val, idx, obj) {
return 5;
}
var newArr = [11].filter(callbackfn);
- return newArr.length === 1 && newArr[0] === 11;
- }
-runTestCase(testcase);
+
+assert.sameValue(newArr.length, 1, 'newArr.length');
+assert.sameValue(newArr[0], 11, 'newArr[0]');