From 1b14708467b4cab8055effad884071123637e475 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bargull?= Date: Fri, 7 Aug 2015 18:40:21 +0200 Subject: [PATCH] Replace runTestCase with assert helpers [test/built-ins] --- test/built-ins/Array/isArray/15.4.3.2-1-1.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-10.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-11.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-12.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-15.js | 10 ++-------- test/built-ins/Array/isArray/15.4.3.2-1-2.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-3.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-4.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-5.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-6.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-7.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-8.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-1-9.js | 7 +------ test/built-ins/Array/isArray/15.4.3.2-2-3.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-1-7.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-5-13.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-5-14.js | 8 ++------ .../Array/prototype/indexOf/15.4.4.14-5-15.js | 9 ++------- .../Array/prototype/indexOf/15.4.4.14-5-17.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-5-33.js | 15 +++++---------- .../Array/prototype/indexOf/15.4.4.14-5-7.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-5-8.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-5-9.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-7-1.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-7-2.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-7-3.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-7-4.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-7-5.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-8-2.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-8-3.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-8-4.js | 7 +------ .../Array/prototype/indexOf/15.4.4.14-9-b-1.js | 7 +------ .../prototype/indexOf/15.4.4.14-9-b-i-2.js | 10 +++------- .../prototype/indexOf/15.4.4.14-9-b-ii-1.js | 17 ++++++----------- .../prototype/indexOf/15.4.4.14-9-b-ii-10.js | 7 +------ .../prototype/indexOf/15.4.4.14-9-b-ii-11.js | 8 ++------ .../prototype/indexOf/15.4.4.14-9-b-ii-2.js | 8 ++------ .../prototype/indexOf/15.4.4.14-9-b-ii-3.js | 7 +------ .../prototype/indexOf/15.4.4.14-9-b-ii-4.js | 7 +------ .../prototype/indexOf/15.4.4.14-9-b-ii-5.js | 7 +------ .../prototype/indexOf/15.4.4.14-9-b-ii-6.js | 7 +------ .../prototype/indexOf/15.4.4.14-9-b-ii-7.js | 7 +------ .../prototype/indexOf/15.4.4.14-9-b-ii-8.js | 7 +------ .../prototype/indexOf/15.4.4.14-9-b-ii-9.js | 7 +------ .../prototype/indexOf/15.4.4.14-9-b-iii-1.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-1-7.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-5-13.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-5-14.js | 14 +++++--------- .../prototype/lastIndexOf/15.4.4.15-5-15.js | 9 ++------- .../prototype/lastIndexOf/15.4.4.15-5-17.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-5-33.js | 15 +++++---------- .../prototype/lastIndexOf/15.4.4.15-5-8.js | 9 ++------- .../prototype/lastIndexOf/15.4.4.15-5-9.js | 9 ++------- .../prototype/lastIndexOf/15.4.4.15-6-2.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-6-3.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-6-4.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-6-5.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-6-6.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-7-2.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-7-3.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-7-4.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-8-b-1.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-8-b-i-2.js | 10 +++------- .../prototype/lastIndexOf/15.4.4.15-8-b-ii-1.js | 17 ++++++----------- .../lastIndexOf/15.4.4.15-8-b-ii-10.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-8-b-ii-2.js | 8 ++------ .../prototype/lastIndexOf/15.4.4.15-8-b-ii-3.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-8-b-ii-4.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-8-b-ii-5.js | 6 +----- .../prototype/lastIndexOf/15.4.4.15-8-b-ii-6.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-8-b-ii-7.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-8-b-ii-8.js | 7 +------ .../prototype/lastIndexOf/15.4.4.15-8-b-ii-9.js | 7 +------ .../lastIndexOf/15.4.4.15-8-b-iii-1.js | 7 +------ .../Array/prototype/reduce/15.4.4.21-7-1.js | 11 +---------- .../Array/prototype/reduce/15.4.4.21-7-10.js | 8 ++------ .../Array/prototype/reduce/15.4.4.21-7-11.js | 8 ++------ .../Array/prototype/reduce/15.4.4.21-7-2.js | 10 +--------- .../Array/prototype/reduce/15.4.4.21-7-3.js | 10 +--------- .../Array/prototype/reduce/15.4.4.21-7-4.js | 10 +--------- .../Array/prototype/reduce/15.4.4.21-7-5.js | 10 +--------- .../Array/prototype/reduce/15.4.4.21-7-6.js | 10 +--------- .../Array/prototype/reduce/15.4.4.21-7-7.js | 10 +--------- .../Array/prototype/reduce/15.4.4.21-7-8.js | 10 +--------- .../Array/prototype/reduce/15.4.4.21-7-9.js | 10 +--------- .../prototype/reduce/15.4.4.21-8-b-ii-1.js | 7 +------ .../prototype/reduce/15.4.4.21-8-b-ii-2.js | 7 +------ .../prototype/reduceRight/15.4.4.22-5-9.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-7-1.js | 11 +---------- .../prototype/reduceRight/15.4.4.22-7-10.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-7-11.js | 8 ++------ .../prototype/reduceRight/15.4.4.22-7-2.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-7-3.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-7-4.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-7-5.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-7-6.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-7-7.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-7-8.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-7-9.js | 10 +--------- .../prototype/reduceRight/15.4.4.22-8-b-ii-2.js | 7 +------ test/built-ins/Date/now/15.9.4.4-0-1.js | 6 +----- test/built-ins/Date/now/15.9.4.4-0-2.js | 6 +----- test/built-ins/Date/now/15.9.4.4-0-4.js | 6 +----- .../Date/prototype/toISOString/15.9.5.43-0-2.js | 6 +----- .../Date/prototype/toISOString/15.9.5.43-0-3.js | 6 +----- test/built-ins/Error/15.11-1.js | 6 +----- test/built-ins/Error/15.11-2.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g2-1.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g2-5.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g5-1.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g6-1.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g6-2.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g6-3.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g6-4.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g6-5.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g6-6.js | 6 +----- test/built-ins/JSON/parse/15.12.1.1-g6-7.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-1.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-10.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-11.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-12.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-13.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-14.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-15.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-2.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-3.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-4.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-5.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-6.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-7.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-8.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-11-9.js | 6 +----- test/built-ins/JSON/stringify/15.12.3-4-1.js | 9 +-------- .../built-ins/JSON/stringify/15.12.3_2-3-a-1.js | 6 +----- .../built-ins/JSON/stringify/15.12.3_2-3-a-2.js | 6 +----- .../built-ins/JSON/stringify/15.12.3_2-3-a-3.js | 6 +----- test/built-ins/Math/max/15.8.2.11-1.js | 6 +----- test/built-ins/Math/min/15.8.2.12-1.js | 6 +----- .../Number/isNaN/Number.isNaN_Boolean.js | 6 +----- test/built-ins/Number/isNaN/Number.isNaN_NaN.js | 6 +----- .../Number/isNaN/Number.isNaN_Object.js | 6 +----- .../Number/isNaN/Number.isNaN_String.js | 6 +----- .../RegExp/prototype/lastIndex/15.10.7.5-1.js | 6 +----- .../String/prototype/trim/15.5.4.20-1-3.js | 13 +------------ .../String/prototype/trim/15.5.4.20-1-4.js | 13 +------------ .../String/prototype/trim/15.5.4.20-1-5.js | 13 +------------ .../String/prototype/trim/15.5.4.20-1-6.js | 13 +------------ .../String/prototype/trim/15.5.4.20-1-7.js | 13 +------------ .../String/prototype/trim/15.5.4.20-2-1.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-10.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-11.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-12.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-13.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-14.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-15.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-16.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-17.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-18.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-19.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-2.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-20.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-21.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-22.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-23.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-24.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-25.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-26.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-27.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-28.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-29.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-3.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-30.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-31.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-32.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-33.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-34.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-35.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-36.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-37.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-4.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-47.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-5.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-6.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-7.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-8.js | 6 +----- .../String/prototype/trim/15.5.4.20-2-9.js | 6 +----- .../String/prototype/trim/15.5.4.20-3-10.js | 6 +----- .../String/prototype/trim/15.5.4.20-3-11.js | 6 +----- .../String/prototype/trim/15.5.4.20-3-12.js | 6 +----- .../String/prototype/trim/15.5.4.20-3-13.js | 6 +----- .../String/prototype/trim/15.5.4.20-3-14.js | 6 +----- .../String/prototype/trim/15.5.4.20-3-8.js | 6 +----- .../String/prototype/trim/15.5.4.20-3-9.js | 6 +----- .../String/prototype/trim/15.5.4.20-4-10.js | 6 +----- .../String/prototype/trim/15.5.4.20-4-18.js | 6 +----- .../String/prototype/trim/15.5.4.20-4-34.js | 6 +----- .../String/prototype/trim/15.5.4.20-4-39.js | 6 +----- test/built-ins/parseFloat/15.1.2.3-2-1.js | 7 ++----- test/built-ins/parseInt/15.1.2.2-2-1.js | 7 ++----- test/language/expressions/delete/11.4.1-2-1.js | 9 ++------- .../expressions/delete/11.4.1-4.a-17.js | 7 +------ .../expressions/unary-minus/11.4.7-4-1.js | 6 +----- .../expressions/unary-plus/11.4.6-2-1.js | 6 +----- 203 files changed, 246 insertions(+), 1240 deletions(-) diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-1.js b/test/built-ins/Array/isArray/15.4.3.2-1-1.js index d89e4cd2a3..2374fd7efd 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-1.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-1.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-1 description: Array.isArray applied to boolean primitive -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(true); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(true), false, 'Array.isArray(true)'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-10.js b/test/built-ins/Array/isArray/15.4.3.2-1-10.js index ee02196fc9..395c3b4dc1 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-10.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-10.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-10 description: Array.isArray applied to RegExp object -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(new RegExp()); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(new RegExp()), false, 'Array.isArray(new RegExp())'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-11.js b/test/built-ins/Array/isArray/15.4.3.2-1-11.js index fdb958b431..6a83171f9c 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-11.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-11.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-11 description: Array.isArray applied to the JSON object -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(JSON); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(JSON), false, 'Array.isArray(JSON)'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-12.js b/test/built-ins/Array/isArray/15.4.3.2-1-12.js index 333e2bb817..2b1aaa798e 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-12.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-12.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-12 description: Array.isArray applied to Error object -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(new SyntaxError()); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(new SyntaxError()), false, 'Array.isArray(new SyntaxError())'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-15.js b/test/built-ins/Array/isArray/15.4.3.2-1-15.js index 12645ff982..048859180c 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-15.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-15.js @@ -4,13 +4,7 @@ /*--- es5id: 15.4.3.2-1-15 description: Array.isArray applied to the global object -includes: - - runTestCase.js - - fnGlobalObject.js +includes: [fnGlobalObject.js] ---*/ -function testcase() { - - return !Array.isArray(fnGlobalObject()); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(fnGlobalObject()), false, 'Array.isArray(fnGlobalObject())'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-2.js b/test/built-ins/Array/isArray/15.4.3.2-1-2.js index b79d46bae4..94624b5205 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-2.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-2.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-2 description: Array.isArray applied to Boolean Object -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(new Boolean(false)); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(new Boolean(false)), false, 'Array.isArray(new Boolean(false))'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-3.js b/test/built-ins/Array/isArray/15.4.3.2-1-3.js index e7e0caf5bc..d6a2bf581d 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-3.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-3.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-3 description: Array.isArray applied to number primitive -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(5); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(5), false, 'Array.isArray(5)'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-4.js b/test/built-ins/Array/isArray/15.4.3.2-1-4.js index 5f3d6a378a..dec4307f37 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-4.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-4.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-4 description: Array.isArray applied to Number object -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(new Number(-3)); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(new Number(-3)), false, 'Array.isArray(new Number(-3))'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-5.js b/test/built-ins/Array/isArray/15.4.3.2-1-5.js index a8abc5d0da..39777f333d 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-5.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-5.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-5 description: Array.isArray applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray("abc"); - } -runTestCase(testcase); +assert.sameValue(Array.isArray("abc"), false, 'Array.isArray("abc")'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-6.js b/test/built-ins/Array/isArray/15.4.3.2-1-6.js index b6c0e1a402..82b6b6aa1e 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-6.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-6.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-6 description: Array.isArray applied to String object -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(new String("hello\nworld\\!")); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(new String("hello\nworld\\!")), false, 'Array.isArray(new String("hello\nworld\\!"))'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-7.js b/test/built-ins/Array/isArray/15.4.3.2-1-7.js index 44af09a804..6bf491fffa 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-7.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-7.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-7 description: Array.isArray applied to Function object -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(function () { }); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(function () { }), false, 'Array.isArray(function () { })'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-8.js b/test/built-ins/Array/isArray/15.4.3.2-1-8.js index 2602420aa2..ecb60080ea 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-8.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-8.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-8 description: Array.isArray applied to the Math object -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(Math); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(Math), false, 'Array.isArray(Math)'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-1-9.js b/test/built-ins/Array/isArray/15.4.3.2-1-9.js index 688d178f06..31ac3fbf42 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-1-9.js +++ b/test/built-ins/Array/isArray/15.4.3.2-1-9.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.3.2-1-9 description: Array.isArray applied to Date object -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray(new Date()); - } -runTestCase(testcase); +assert.sameValue(Array.isArray(new Date()), false, 'Array.isArray(new Date())'); diff --git a/test/built-ins/Array/isArray/15.4.3.2-2-3.js b/test/built-ins/Array/isArray/15.4.3.2-2-3.js index 5f16b65f06..34459c2dc1 100644 --- a/test/built-ins/Array/isArray/15.4.3.2-2-3.js +++ b/test/built-ins/Array/isArray/15.4.3.2-2-3.js @@ -6,11 +6,6 @@ es5id: 15.4.3.2-2-3 description: > Array.isArray applied to an Array-like object with length and some indexed properties -includes: [runTestCase.js] ---*/ -function testcase() { - - return !Array.isArray({ 0: 12, 1: 9, length: 2 }); - } -runTestCase(testcase); +assert.sameValue(Array.isArray({ 0: 12, 1: 9, length: 2 }), false, 'Array.isArray({ 0: 12, 1: 9, length: 2 })'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-7.js index 0916a43dd6..d48adccb49 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-1-7.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.14-1-7 description: Array.prototype.indexOf applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { - - return Array.prototype.indexOf.call("abc", "b") === 1; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.indexOf.call("abc", "b"), 1, 'Array.prototype.indexOf.call("abc", "b")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-13.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-13.js index cd36077d21..08f805073f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-13.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-13.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-5-13 description: > Array.prototype.indexOf - value of 'fromIndex' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - - return [true].indexOf(true, -Infinity) === 0; - } -runTestCase(testcase); +assert.sameValue([true].indexOf(true, -Infinity), 0, '[true].indexOf(true, -Infinity)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-14.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-14.js index 674e03dc76..ad4a1a61f7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-14.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-14.js @@ -6,11 +6,7 @@ es5id: 15.4.4.14-5-14 description: > Array.prototype.indexOf - value of 'fromIndex' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - - return [true].indexOf(true, NaN) === 0 && [true].indexOf(true, -NaN) === 0; - } -runTestCase(testcase); +assert.sameValue([true].indexOf(true, NaN), 0, '[true].indexOf(true, NaN)'); +assert.sameValue([true].indexOf(true, -NaN), 0, '[true].indexOf(true, -NaN)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-15.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-15.js index de7b827c18..6ea2d1a7c7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-15.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-15.js @@ -6,12 +6,7 @@ es5id: 15.4.4.14-5-15 description: > Array.prototype.indexOf - value of 'fromIndex' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { - - return [0, true, 2].indexOf(true, "-1") === -1 && - [0, 1, true].indexOf(true, "-1") === 2; - } -runTestCase(testcase); +assert.sameValue([0, true, 2].indexOf(true, "-1"), -1, '[0, true, 2].indexOf(true, "-1")'); +assert.sameValue([0, 1, true].indexOf(true, "-1"), 2, '[0, 1, true].indexOf(true, "-1")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-17.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-17.js index e69de33f20..324d58d544 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-17.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-17.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-5-17 description: > Array.prototype.indexOf - value of 'fromIndex' is a string containing -Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - - return [true].indexOf(true, "-Infinity") === 0; - } -runTestCase(testcase); +assert.sameValue([true].indexOf(true, "-Infinity"), 0, '[true].indexOf(true, "-Infinity")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-33.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-33.js index 6c46d4995d..791bc1b6be 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-33.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-33.js @@ -6,15 +6,10 @@ es5id: 15.4.4.14-5-33 description: > Array.prototype.indexOf match on the first element, a middle element and the last element when 'fromIndex' is passed -includes: [runTestCase.js] ---*/ -function testcase() { - - return [0, 1, 2, 3, 4].indexOf(0, 0) === 0 && - [0, 1, 2, 3, 4].indexOf(2, 1) === 2 && - [0, 1, 2, 3, 4].indexOf(2, 2) === 2 && - [0, 1, 2, 3, 4].indexOf(4, 2) === 4 && - [0, 1, 2, 3, 4].indexOf(4, 4) === 4; - } -runTestCase(testcase); +assert.sameValue([0, 1, 2, 3, 4].indexOf(0, 0), 0, '[0, 1, 2, 3, 4].indexOf(0, 0)'); +assert.sameValue([0, 1, 2, 3, 4].indexOf(2, 1), 2, '[0, 1, 2, 3, 4].indexOf(2, 1)'); +assert.sameValue([0, 1, 2, 3, 4].indexOf(2, 2), 2, '[0, 1, 2, 3, 4].indexOf(2, 2)'); +assert.sameValue([0, 1, 2, 3, 4].indexOf(4, 2), 4, '[0, 1, 2, 3, 4].indexOf(4, 2)'); +assert.sameValue([0, 1, 2, 3, 4].indexOf(4, 4), 4, '[0, 1, 2, 3, 4].indexOf(4, 4)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-7.js index 77021d2c05..0be678f979 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-7.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-5-7 description: > Array.prototype.indexOf - value of 'fromIndex' is a number (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - - return [true].indexOf(true, 0) === 0; - } -runTestCase(testcase); +assert.sameValue([true].indexOf(true, 0), 0, '[true].indexOf(true, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-8.js index 439deeabd0..a703e616f8 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-8.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-5-8 description: > Array.prototype.indexOf - value of 'fromIndex' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - - return [true].indexOf(true, +0) === 0; - } -runTestCase(testcase); +assert.sameValue([true].indexOf(true, +0), 0, '[true].indexOf(true, +0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-9.js index 2b2fa9b077..44d8c0887b 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-5-9.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-5-9 description: > Array.prototype.indexOf - value of 'fromIndex' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - - return [true].indexOf(true, -0) === 0; - } -runTestCase(testcase); +assert.sameValue([true].indexOf(true, -0), 0, '[true].indexOf(true, -0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-1.js index 44cb45a3ee..77db068802 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-1.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-7-1 description: > Array.prototype.indexOf returns -1 when 'fromIndex' is length of array - 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3].indexOf(1, 2) === -1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3].indexOf(1, 2), -1, '[1, 2, 3].indexOf(1, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-2.js index 2a85858303..e2d4af59ff 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-2.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-7-2 description: > Array.prototype.indexOf returns correct index when 'fromIndex' is length of array - 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3].indexOf(3, 2) === 2; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3].indexOf(3, 2), 2, '[1, 2, 3].indexOf(3, 2)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-3.js index 44f682486e..f6ffe860f7 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-3.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-7-3 description: > Array.prototype.indexOf returns -1 when 'fromIndex' and 'length' are both 0 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [].indexOf(1, 0) === -1; - } -runTestCase(testcase); +assert.sameValue([].indexOf(1, 0), -1, '[].indexOf(1, 0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-4.js index 09db35e375..9b9986a414 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-4.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.14-7-4 description: Array.prototype.indexOf returns -1 when 'fromIndex' is 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3].indexOf(1, 1) === -1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3].indexOf(1, 1), -1, '[1, 2, 3].indexOf(1, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-5.js index ab2db3e5f9..dff5a445d6 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-7-5.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.14-7-5 description: Array.prototype.indexOf returns correct index when 'fromIndex' is 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3].indexOf(2, 1) === 1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3].indexOf(2, 1), 1, '[1, 2, 3].indexOf(2, 1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-2.js index c65c70213e..02441ef35a 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-2.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-8-2 description: > Array.prototype.indexOf returns correct index when 'fromIndex' is -1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3, 4].indexOf(4, -1) === 3; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3, 4].indexOf(4, -1), 3, '[1, 2, 3, 4].indexOf(4, -1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-3.js index e195d0e06f..8c004c8010 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-3.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-8-3 description: > Array.prototype.indexOf returns -1 when abs('fromIndex') is length of array - 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3, 4].indexOf(1, -3) === -1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3, 4].indexOf(1, -3), -1, '[1, 2, 3, 4].indexOf(1, -3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-4.js index 8db32ee4b5..33b2459bd3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-8-4.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-8-4 description: > Array.prototype.indexOf returns -1 when abs('fromIndex') is length of array -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3, 4].indexOf(0, -4) === -1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3, 4].indexOf(0, -4), -1, '[1, 2, 3, 4].indexOf(0, -4)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-1.js index 63093afc93..cd0be7aa50 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-1.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.14-9-b-1 description: Array.prototype.indexOf - non-existent property wouldn't be called -includes: [runTestCase.js] ---*/ -function testcase() { - - return [0, , 2].indexOf(undefined) === -1; - } -runTestCase(testcase); +assert.sameValue([0, , 2].indexOf(undefined), -1, '[0, , 2].indexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-2.js index 6a22313a40..c37adf4dbb 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-i-2.js @@ -6,12 +6,8 @@ es5id: 15.4.4.14-9-b-i-2 description: > Array.prototype.indexOf - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - return [true, true, true].indexOf(true) === 0 && - [false, true, true].indexOf(true) === 1 && - [false, false, true].indexOf(true) === 2; - } -runTestCase(testcase); +assert.sameValue([true, true, true].indexOf(true), 0, '[true, true, true].indexOf(true)'); +assert.sameValue([false, true, true].indexOf(true), 1, '[false, true, true].indexOf(true)'); +assert.sameValue([false, false, true].indexOf(true), 2, '[false, false, true].indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js index 0f9dceb187..9551e31c79 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-1.js @@ -6,16 +6,11 @@ es5id: 15.4.4.14-9-b-ii-1 description: > Array.prototype.indexOf - type of array element is different from type of search element -includes: [runTestCase.js] ---*/ -function testcase() { - - return ["true"].indexOf(true) === -1 && - ["0"].indexOf(0) === -1 && - [false].indexOf(0) === -1 && - [undefined].indexOf(0) === -1 && - [null].indexOf(0) === -1 && - [[]].indexOf(0) === -1; - } -runTestCase(testcase); +assert.sameValue(["true"].indexOf(true), -1, '["true"].indexOf(true)'); +assert.sameValue(["0"].indexOf(0), -1, '["0"].indexOf(0)'); +assert.sameValue([false].indexOf(0), -1, '[false].indexOf(0)'); +assert.sameValue([undefined].indexOf(0), -1, '[undefined].indexOf(0)'); +assert.sameValue([null].indexOf(0), -1, '[null].indexOf(0)'); +assert.sameValue([[]].indexOf(0), -1, '[[]].indexOf(0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-10.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-10.js index d994687cf8..c5e6b04d16 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-10.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-10.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-9-b-ii-10 description: > Array.prototype.indexOf - both array element and search element are Boolean type, and they have same value -includes: [runTestCase.js] ---*/ -function testcase() { - - return [false, true].indexOf(true) === 1; - } -runTestCase(testcase); +assert.sameValue([false, true].indexOf(true), 1, '[false, true].indexOf(true)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js index 47bd171aaf..a47ce01397 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-11.js @@ -6,14 +6,10 @@ es5id: 15.4.4.14-9-b-ii-11 description: > Array.prototype.indexOf - both array element and search element are Object type, and they refer to the same object -includes: [runTestCase.js] ---*/ -function testcase() { - var obj1 = {}; var obj2 = {}; var obj3 = obj2; - return [{}, obj1, obj2].indexOf(obj3) === 2; - } -runTestCase(testcase); + +assert.sameValue([{}, obj1, obj2].indexOf(obj3), 2, '[{}, obj1, obj2].indexOf(obj3)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-2.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-2.js index f5eacb27ee..77e3af80c3 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-2.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-2.js @@ -6,11 +6,7 @@ es5id: 15.4.4.14-9-b-ii-2 description: > Array.prototype.indexOf - both type of array element and type of search element are Undefined -includes: [runTestCase.js] ---*/ -function testcase() { - - return [undefined].indexOf() === 0 && [undefined].indexOf(undefined) === 0; - } -runTestCase(testcase); +assert.sameValue([undefined].indexOf(), 0, '[undefined].indexOf()'); +assert.sameValue([undefined].indexOf(undefined), 0, '[undefined].indexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-3.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-3.js index 3674c2b54a..6941589c7c 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-3.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-3.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-9-b-ii-3 description: > Array.prototype.indexOf - both type of array element and type of search element are null -includes: [runTestCase.js] ---*/ -function testcase() { - - return [null].indexOf(null) === 0; - } -runTestCase(testcase); +assert.sameValue([null].indexOf(null), 0, '[null].indexOf(null)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-4.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-4.js index a3a6cada60..0cbb8224b5 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-4.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-4.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.14-9-b-ii-4 description: Array.prototype.indexOf - search element is NaN -includes: [runTestCase.js] ---*/ -function testcase() { - - return [+NaN, NaN, -NaN].indexOf(NaN) === -1; - } -runTestCase(testcase); +assert.sameValue([+NaN, NaN, -NaN].indexOf(NaN), -1, '[+NaN, NaN, -NaN].indexOf(NaN)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-5.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-5.js index 337c8fae35..e31dfff982 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-5.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-5.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.14-9-b-ii-5 description: Array.prototype.indexOf - search element is -NaN -includes: [runTestCase.js] ---*/ -function testcase() { - - return [+NaN, NaN, -NaN].indexOf(-NaN) === -1; - } -runTestCase(testcase); +assert.sameValue([+NaN, NaN, -NaN].indexOf(-NaN), -1, '[+NaN, NaN, -NaN].indexOf(-NaN)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-6.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-6.js index c93162e4d5..75eda5e675 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-6.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-6.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-9-b-ii-6 description: > Array.prototype.indexOf - array element is +0 and search element is -0 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [+0].indexOf(-0) === 0; - } -runTestCase(testcase); +assert.sameValue([+0].indexOf(-0), 0, '[+0].indexOf(-0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-7.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-7.js index 6184e05e18..c3acc3530f 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-7.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-7.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-9-b-ii-7 description: > Array.prototype.indexOf - array element is -0 and search element is +0 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [-0].indexOf(+0) === 0; - } -runTestCase(testcase); +assert.sameValue([-0].indexOf(+0), 0, '[-0].indexOf(+0)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-8.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-8.js index 50ea1b629b..2cedb40c24 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-8.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-8.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-9-b-ii-8 description: > Array.prototype.indexOf - both array element and search element are Number, and they have same value -includes: [runTestCase.js] ---*/ -function testcase() { - - return [-1, 0, 1].indexOf(1) === 2; - } -runTestCase(testcase); +assert.sameValue([-1, 0, 1].indexOf(1), 2, '[-1, 0, 1].indexOf(1)'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-9.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-9.js index 959250a896..e5499b6638 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-9.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-ii-9.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-9-b-ii-9 description: > Array.prototype.indexOf - both array element and search element are String, and they have exactly the same sequence of characters -includes: [runTestCase.js] ---*/ -function testcase() { - - return ["", "ab", "bca", "abc"].indexOf("abc") === 3; - } -runTestCase(testcase); +assert.sameValue(["", "ab", "bca", "abc"].indexOf("abc"), 3, '["", "ab", "bca", "abc"].indexOf("abc")'); diff --git a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-1.js b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-1.js index fa1d4e5d09..1e9bc0d3cf 100644 --- a/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-1.js +++ b/test/built-ins/Array/prototype/indexOf/15.4.4.14-9-b-iii-1.js @@ -6,11 +6,6 @@ es5id: 15.4.4.14-9-b-iii-1 description: > Array.prototype.indexOf - returns index of last one when more than two elements in array are eligible -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 2, 1, 2].indexOf(2) === 1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 2, 1, 2].indexOf(2), 1, '[1, 2, 2, 1, 2].indexOf(2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-7.js index caf111c8f0..11ed44ee70 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-1-7.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.15-1-7 description: Array.prototype.lastIndexOf applied to string primitive -includes: [runTestCase.js] ---*/ -function testcase() { - - return Array.prototype.lastIndexOf.call("abc", "c") === 2; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.lastIndexOf.call("abc", "c"), 2, 'Array.prototype.lastIndexOf.call("abc", "c")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-13.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-13.js index 7b789da46d..f92d51835c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-13.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-13.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-5-13 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - - return [true].lastIndexOf(true, -Infinity) === -1; - } -runTestCase(testcase); +assert.sameValue([true].lastIndexOf(true, -Infinity), -1, '[true].lastIndexOf(true, -Infinity)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js index 32b9e429ca..7e08f9923c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-14.js @@ -6,14 +6,10 @@ es5id: 15.4.4.15-5-14 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - - return [0, true].lastIndexOf(true, NaN) === -1 && // from Index will be convert to +0 - [true, 0].lastIndexOf(true, NaN) === 0 && - [0, true].lastIndexOf(true, -NaN) === -1 && - [true, 0].lastIndexOf(true, -NaN) === 0; - } -runTestCase(testcase); +// from Index will be convert to +0 +assert.sameValue([0, true].lastIndexOf(true, NaN), -1, '[0, true].lastIndexOf(true, NaN)'); +assert.sameValue([true, 0].lastIndexOf(true, NaN), 0, '[true, 0].lastIndexOf(true, NaN)'); +assert.sameValue([0, true].lastIndexOf(true, -NaN), -1, '[0, true].lastIndexOf(true, -NaN)'); +assert.sameValue([true, 0].lastIndexOf(true, -NaN), 0, '[true, 0].lastIndexOf(true, -NaN)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-15.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-15.js index 51ca82ad79..295b118096 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-15.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-15.js @@ -6,12 +6,7 @@ es5id: 15.4.4.15-5-15 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing a negative number -includes: [runTestCase.js] ---*/ -function testcase() { - - return [0, "-2", 2].lastIndexOf("-2", "-2") === 1 && - [0, 2, "-2"].lastIndexOf("-2", "-2") === -1; - } -runTestCase(testcase); +assert.sameValue([0, "-2", 2].lastIndexOf("-2", "-2"), 1, '[0, "-2", 2].lastIndexOf("-2", "-2")'); +assert.sameValue([0, 2, "-2"].lastIndexOf("-2", "-2"), -1, '[0, 2, "-2"].lastIndexOf("-2", "-2")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-17.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-17.js index 5508b81ce4..1d994c5042 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-17.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-17.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-5-17 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing -Infinity -includes: [runTestCase.js] ---*/ -function testcase() { - - return [true].lastIndexOf(true, "-Infinity") === -1; - } -runTestCase(testcase); +assert.sameValue([true].lastIndexOf(true, "-Infinity"), -1, '[true].lastIndexOf(true, "-Infinity")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-33.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-33.js index 3486b0ce87..fc8f059e2a 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-33.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-33.js @@ -6,15 +6,10 @@ es5id: 15.4.4.15-5-33 description: > Array.prototype.lastIndexOf - match on the first element, a middle element and the last element when 'fromIndex' is passed -includes: [runTestCase.js] ---*/ -function testcase() { - - return [0, 1, 2, 3, 4].lastIndexOf(0, 0) === 0 && - [0, 1, 2, 3, 4].lastIndexOf(0, 2) === 0 && - [0, 1, 2, 3, 4].lastIndexOf(2, 2) === 2 && - [0, 1, 2, 3, 4].lastIndexOf(2, 4) === 2 && - [0, 1, 2, 3, 4].lastIndexOf(4, 4) === 4; - } -runTestCase(testcase); +assert.sameValue([0, 1, 2, 3, 4].lastIndexOf(0, 0), 0, '[0, 1, 2, 3, 4].lastIndexOf(0, 0)'); +assert.sameValue([0, 1, 2, 3, 4].lastIndexOf(0, 2), 0, '[0, 1, 2, 3, 4].lastIndexOf(0, 2)'); +assert.sameValue([0, 1, 2, 3, 4].lastIndexOf(2, 2), 2, '[0, 1, 2, 3, 4].lastIndexOf(2, 2)'); +assert.sameValue([0, 1, 2, 3, 4].lastIndexOf(2, 4), 2, '[0, 1, 2, 3, 4].lastIndexOf(2, 4)'); +assert.sameValue([0, 1, 2, 3, 4].lastIndexOf(4, 4), 4, '[0, 1, 2, 3, 4].lastIndexOf(4, 4)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-8.js index 426ee071f3..ddd70c04ce 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-8.js @@ -6,12 +6,7 @@ es5id: 15.4.4.15-5-8 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - - return [0, true].lastIndexOf(true, +0) === -1 && - [true, 0].lastIndexOf(true, +0) === 0; - } -runTestCase(testcase); +assert.sameValue([0, true].lastIndexOf(true, +0), -1, '[0, true].lastIndexOf(true, +0)'); +assert.sameValue([true, 0].lastIndexOf(true, +0), 0, '[true, 0].lastIndexOf(true, +0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-9.js index e1d6ae2d1e..5ecdcb1d8c 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-5-9.js @@ -6,12 +6,7 @@ es5id: 15.4.4.15-5-9 description: > Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - - return [0, true].lastIndexOf(true, -0) === -1 && - [true, 0].lastIndexOf(true, -0) === 0; - } -runTestCase(testcase); +assert.sameValue([0, true].lastIndexOf(true, -0), -1, '[0, true].lastIndexOf(true, -0)'); +assert.sameValue([true, 0].lastIndexOf(true, -0), 0, '[true, 0].lastIndexOf(true, -0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-2.js index f47cab40a7..3015f756c9 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-2.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-6-2 description: > Array.prototype.lastIndexOf returns correct index when 'fromIndex' is length of array - 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3].lastIndexOf(3, 2) === 2; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3].lastIndexOf(3, 2), 2, '[1, 2, 3].lastIndexOf(3, 2)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-3.js index 6f64ea3a73..d994fd9abe 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-3.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-6-3 description: > Array.prototype.lastIndexOf returns -1 when 'fromIndex' is length of array - 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3].lastIndexOf(3, 1) === -1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3].lastIndexOf(3, 1), -1, '[1, 2, 3].lastIndexOf(3, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-4.js index 8447670107..580791ef5b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-4.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-6-4 description: > Array.prototype.lastIndexOf returns -1 when 'fromIndex' and 'length' are both 0 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [].lastIndexOf(1, 0) === -1; - } -runTestCase(testcase); +assert.sameValue([].lastIndexOf(1, 0), -1, '[].lastIndexOf(1, 0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-5.js index ba40a95ce1..a1f9d14053 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-5.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.15-6-5 description: Array.prototype.lastIndexOf returns -1 when 'fromIndex' is 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3].lastIndexOf(3, 1) === -1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3].lastIndexOf(3, 1), -1, '[1, 2, 3].lastIndexOf(3, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-6.js index 8e1ca80bba..a4a313ab25 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-6-6.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-6-6 description: > Array.prototype.lastIndexOf returns correct index when 'fromIndex' is 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3].lastIndexOf(2, 1) === 1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3].lastIndexOf(2, 1), 1, '[1, 2, 3].lastIndexOf(2, 1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-2.js index 779e9b5c7e..35195a5b69 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-2.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-7-2 description: > Array.prototype.lastIndexOf returns correct index when 'fromIndex' is -1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3, 4].lastIndexOf(4, -1) === 3; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3, 4].lastIndexOf(4, -1), 3, '[1, 2, 3, 4].lastIndexOf(4, -1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-3.js index d882c99431..57e6127013 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-3.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-7-3 description: > Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is length of array - 1 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3, 4].lastIndexOf(3, -3) === -1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3, 4].lastIndexOf(3, -3), -1, '[1, 2, 3, 4].lastIndexOf(3, -3)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-4.js index c695f01b2d..973e668e6d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-7-4.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-7-4 description: > Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is length of array -includes: [runTestCase.js] ---*/ -function testcase() { - - return [1, 2, 3, 4].lastIndexOf(2, -4) === -1; - } -runTestCase(testcase); +assert.sameValue([1, 2, 3, 4].lastIndexOf(2, -4), -1, '[1, 2, 3, 4].lastIndexOf(2, -4)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-1.js index c73193e7e2..8798a9405e 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-1.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.15-8-b-1 description: Array.prototype.lastIndexOf - undefined property wouldn't be called -includes: [runTestCase.js] ---*/ -function testcase() { - - return [0, , 2].lastIndexOf(undefined) === -1; - } -runTestCase(testcase); +assert.sameValue([0, , 2].lastIndexOf(undefined), -1, '[0, , 2].lastIndexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-2.js index 0ca10fbfe4..9d2ac61afb 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-i-2.js @@ -6,12 +6,8 @@ es5id: 15.4.4.15-8-b-i-2 description: > Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array -includes: [runTestCase.js] ---*/ -function testcase() { - return [true, true, true].lastIndexOf(true) === 2 && - [true, true, false].lastIndexOf(true) === 1 && - [true, false, false].lastIndexOf(true) === 0; - } -runTestCase(testcase); +assert.sameValue([true, true, true].lastIndexOf(true), 2, '[true, true, true].lastIndexOf(true)'); +assert.sameValue([true, true, false].lastIndexOf(true), 1, '[true, true, false].lastIndexOf(true)'); +assert.sameValue([true, false, false].lastIndexOf(true), 0, '[true, false, false].lastIndexOf(true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-1.js index c511309121..a506afb155 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-1.js @@ -6,16 +6,11 @@ es5id: 15.4.4.15-8-b-ii-1 description: > Array.prototype.lastIndexOf - type of array element is different from type of search element -includes: [runTestCase.js] ---*/ -function testcase() { - - return ["true"].lastIndexOf(true) === -1 && - ["0"].lastIndexOf(0) === -1 && - [false].lastIndexOf(0) === -1 && - [undefined].lastIndexOf(0) === -1 && - [null].lastIndexOf(0) === -1 && - [[]].lastIndexOf(0) === -1; - } -runTestCase(testcase); +assert.sameValue(["true"].lastIndexOf(true), -1, '["true"].lastIndexOf(true)'); +assert.sameValue(["0"].lastIndexOf(0), -1, '["0"].lastIndexOf(0)'); +assert.sameValue([false].lastIndexOf(0), -1, '[false].lastIndexOf(0)'); +assert.sameValue([undefined].lastIndexOf(0), -1, '[undefined].lastIndexOf(0)'); +assert.sameValue([null].lastIndexOf(0), -1, '[null].lastIndexOf(0)'); +assert.sameValue([[]].lastIndexOf(0), -1, '[[]].lastIndexOf(0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-10.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-10.js index 5d05f5291e..a4fe50c447 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-10.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-10.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-8-b-ii-10 description: > Array.prototype.lastIndexOf - both array element and search element are booleans, and they have same value -includes: [runTestCase.js] ---*/ -function testcase() { - - return [false, true].lastIndexOf(true) === 1; - } -runTestCase(testcase); +assert.sameValue([false, true].lastIndexOf(true), 1, '[false, true].lastIndexOf(true)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-2.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-2.js index 0024fe08a4..c0e766e26e 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-2.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-2.js @@ -6,11 +6,7 @@ es5id: 15.4.4.15-8-b-ii-2 description: > Array.prototype.lastIndexOf - both type of array element and type of search element are Undefined -includes: [runTestCase.js] ---*/ -function testcase() { - - return [undefined].lastIndexOf() === 0 && [undefined].lastIndexOf(undefined) === 0; - } -runTestCase(testcase); +assert.sameValue([undefined].lastIndexOf(), 0, '[undefined].lastIndexOf()'); +assert.sameValue([undefined].lastIndexOf(undefined), 0, '[undefined].lastIndexOf(undefined)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-3.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-3.js index 2f90ee54e6..53d1aa1d91 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-3.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-3.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-8-b-ii-3 description: > Array.prototype.lastIndexOf - both type of array element and type of search element are Null -includes: [runTestCase.js] ---*/ -function testcase() { - - return [null].lastIndexOf(null) === 0; - } -runTestCase(testcase); +assert.sameValue([null].lastIndexOf(null), 0, '[null].lastIndexOf(null)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-4.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-4.js index 466aaf1103..fa9ff7be6d 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-4.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-4.js @@ -4,11 +4,6 @@ /*--- es5id: 15.4.4.15-8-b-ii-4 description: Array.prototype.lastIndexOf - search element is NaN -includes: [runTestCase.js] ---*/ -function testcase() { - - return [+NaN, NaN, -NaN].lastIndexOf(NaN) === -1; - } -runTestCase(testcase); +assert.sameValue([+NaN, NaN, -NaN].lastIndexOf(NaN), -1, '[+NaN, NaN, -NaN].lastIndexOf(NaN)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-5.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-5.js index 847952193f..5ee7ff43e9 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-5.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-5.js @@ -4,10 +4,6 @@ /*--- es5id: 15.4.4.15-8-b-ii-5 description: Array.prototype.lastIndexOf - search element is -NaN -includes: [runTestCase.js] ---*/ -function testcase() { - return [+NaN, NaN, -NaN].lastIndexOf(-NaN) === -1; - } -runTestCase(testcase); +assert.sameValue([+NaN, NaN, -NaN].lastIndexOf(-NaN), -1, '[+NaN, NaN, -NaN].lastIndexOf(-NaN)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-6.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-6.js index 14e29da772..722ae58b78 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-6.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-6.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-8-b-ii-6 description: > Array.prototype.lastIndexOf - array element is +0 and search element is -0 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [+0].lastIndexOf(-0) === 0; - } -runTestCase(testcase); +assert.sameValue([+0].lastIndexOf(-0), 0, '[+0].lastIndexOf(-0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-7.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-7.js index 39aa8c6e1c..1cc26df7a2 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-7.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-7.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-8-b-ii-7 description: > Array.prototype.lastIndexOf - array element is -0 and search element is +0 -includes: [runTestCase.js] ---*/ -function testcase() { - - return [-0].lastIndexOf(+0) === 0; - } -runTestCase(testcase); +assert.sameValue([-0].lastIndexOf(+0), 0, '[-0].lastIndexOf(+0)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-8.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-8.js index 1132490d3a..96c979125b 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-8.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-8.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-8-b-ii-8 description: > Array.prototype.lastIndexOf - both array element and search element are numbers, and they have same value -includes: [runTestCase.js] ---*/ -function testcase() { - - return [-1, 0, 1].lastIndexOf(-1) === 0; - } -runTestCase(testcase); +assert.sameValue([-1, 0, 1].lastIndexOf(-1), 0, '[-1, 0, 1].lastIndexOf(-1)'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-9.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-9.js index 2beb5cb248..2814fe5bf4 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-9.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-ii-9.js @@ -7,11 +7,6 @@ description: > Array.prototype.lastIndexOf - both array element and search element are strings, and they have exactly the same sequence of characters -includes: [runTestCase.js] ---*/ -function testcase() { - - return ["abc", "ab", "bca", ""].lastIndexOf("abc") === 0; - } -runTestCase(testcase); +assert.sameValue(["abc", "ab", "bca", ""].lastIndexOf("abc"), 0, '["abc", "ab", "bca", ""].lastIndexOf("abc")'); diff --git a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-1.js b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-1.js index 974ae4a04f..df20781824 100644 --- a/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-1.js +++ b/test/built-ins/Array/prototype/lastIndexOf/15.4.4.15-8-b-iii-1.js @@ -6,11 +6,6 @@ es5id: 15.4.4.15-8-b-iii-1 description: > Array.prototype.lastIndexOf returns index of last one when more than two elements in array are eligible -includes: [runTestCase.js] ---*/ -function testcase() { - - return [2, 1, 2, 2, 1].lastIndexOf(2) === 3; - } -runTestCase(testcase); +assert.sameValue([2, 1, 2, 2, 1].lastIndexOf(2), 3, '[2, 1, 2, 2, 1].lastIndexOf(2)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-1.js index 8e1a618399..06f271c97c 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-1.js @@ -6,16 +6,7 @@ es5id: 15.4.4.21-7-1 description: > Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { function cb(){} - - try { - if([].reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue([].reduce(cb,1), 1, '[].reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-10.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-10.js index ce0b9aac2d..5354dfa85b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-10.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-10.js @@ -4,12 +4,8 @@ /*--- es5id: 15.4.4.21-7-10 description: Array.prototype.reduce - 'initialValue' is present -includes: [runTestCase.js] ---*/ -function testcase() { - var str = "initialValue is present"; - return str === [].reduce(function () { }, str); - } -runTestCase(testcase); + +assert.sameValue([].reduce(function () { }, str), str, '[].reduce(function () { }, str)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-11.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-11.js index b6b99ce1bf..fbda9e9ebb 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-11.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-11.js @@ -4,12 +4,8 @@ /*--- es5id: 15.4.4.21-7-11 description: Array.prototype.reduce - 'initialValue' is not present -includes: [runTestCase.js] ---*/ -function testcase() { - var str = "initialValue is not present"; - return str === [str].reduce(function () { }); - } -runTestCase(testcase); + +assert.sameValue([str].reduce(function () { }), str, '[str].reduce(function () { })'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-2.js index 73ae44d164..16a9fbcd7e 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-2.js @@ -7,20 +7,12 @@ description: > Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (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(); f.length = null; function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-3.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-3.js index 9ea1a314b5..552d32da60 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-3.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-3.js @@ -7,20 +7,12 @@ description: > Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (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(); f.length = false; function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-4.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-4.js index 9d90eb60c8..696d3cdad4 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-4.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-4.js @@ -7,20 +7,12 @@ description: > Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (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(); f.length = 0; function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-5.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-5.js index 864bb4dc49..ffc5f18709 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-5.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-5.js @@ -7,20 +7,12 @@ description: > Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (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(); f.length = '0'; function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-6.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-6.js index bfeab2ce68..e00c883a01 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-6.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-6.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (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(); @@ -19,10 +17,4 @@ function testcase() { f.length = o; function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-7.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-7.js index 991e6aea18..ca1d17e24b 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-7.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-7.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -25,10 +23,4 @@ function testcase() { // resulting string to a number. function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-8.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-8.js index aefe0c3da2..1ee25dae57 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-8.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-8.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with []) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -32,10 +30,4 @@ function testcase() { // or if its one element is not a number, the array converts to NaN. function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-9.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-9.js index 4b732ef598..e52de88c9f 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-7-9.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-7-9.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [0]) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -32,10 +30,4 @@ function testcase() { // or if its one element is not a number, the array converts to NaN. function cb(){} - try { - if(f.reduce(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduce(cb,1), 1, 'f.reduce(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-1.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-1.js index 95f3d7c248..94e5a5e850 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-1.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-1.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-ii-1 description: > Array.prototype.reduce - added properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { }; Object.defineProperty(obj, "length", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return Array.prototype.reduce.call(obj, function () { }) === "accumulator"; - } -runTestCase(testcase); +assert.sameValue(Array.prototype.reduce.call(obj, function () { }), "accumulator", 'Array.prototype.reduce.call(obj, function () { })'); diff --git a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-2.js b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-2.js index e1c79f25a8..81ac5c5171 100644 --- a/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-2.js +++ b/test/built-ins/Array/prototype/reduce/15.4.4.21-8-b-ii-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.21-8-b-ii-2 description: > Array.prototype.reduce - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 1: "accumulator", 2: "another" }; Object.defineProperty(obj, "length", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return "accumulator" !== Array.prototype.reduce.call(obj, function () { }); - } -runTestCase(testcase); +assert.notSameValue(Array.prototype.reduce.call(obj, function () { }), "accumulator", 'Array.prototype.reduce.call(obj, function () { })'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-9.js index b143a15569..9c3ff7132b 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-5-9.js @@ -6,12 +6,8 @@ es5id: 15.4.4.22-5-9 description: > Array.prototype.reduceRight - 'initialValue' is returned if 'len' is 0 and 'initialValue' is present -includes: [runTestCase.js] ---*/ -function testcase() { - var initialValue = 10; - return initialValue === [].reduceRight(function () { }, initialValue); - } -runTestCase(testcase); + +assert.sameValue([].reduceRight(function () { }, initialValue), initialValue, '[].reduceRight(function () { }, initialValue)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-1.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-1.js index dafb24ae87..c02fb40001 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-1.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-1.js @@ -6,16 +6,7 @@ es5id: 15.4.4.22-7-1 description: > Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (empty array) -includes: [runTestCase.js] ---*/ -function testcase() { function cb(){} - - try { - if([].reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue([].reduceRight(cb,1), 1, '[].reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-10.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-10.js index 4b1bb71cb7..fbd5ad19ee 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-10.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-10.js @@ -4,12 +4,8 @@ /*--- es5id: 15.4.4.22-7-10 description: Array.prototype.reduceRight - 'initialValue' is present -includes: [runTestCase.js] ---*/ -function testcase() { - var str = "initialValue is present"; - return str === [].reduceRight(function () { }, str); - } -runTestCase(testcase); + +assert.sameValue([].reduceRight(function () { }, str), str, '[].reduceRight(function () { }, str)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-11.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-11.js index ec4e4b8003..d1c2db342e 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-11.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-11.js @@ -4,12 +4,8 @@ /*--- es5id: 15.4.4.22-7-11 description: Array.prototype.reduceRight - 'initialValue' is not present -includes: [runTestCase.js] ---*/ -function testcase() { - var str = "initialValue is not present"; - return str === [str].reduceRight(function () { }); - } -runTestCase(testcase); + +assert.sameValue([str].reduceRight(function () { }), str, '[str].reduceRight(function () { })'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-2.js index 129a07a01b..6a2b04b166 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-2.js @@ -7,20 +7,12 @@ description: > Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (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(); f.length = null; function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-3.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-3.js index 0dea7b8154..58accb2129 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-3.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-3.js @@ -7,20 +7,12 @@ description: > Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (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(); f.length = false; function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-4.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-4.js index 5ee711423b..bf4a4bbbbc 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-4.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-4.js @@ -7,20 +7,12 @@ description: > Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (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(); f.length = 0; function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-5.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-5.js index 2f900f368d..a344bd1622 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-5.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-5.js @@ -7,20 +7,12 @@ description: > Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (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(); f.length = '0'; function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-6.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-6.js index cb89355522..4c561a34a6 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-6.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-6.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (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(); @@ -19,10 +17,4 @@ function testcase() { f.length = o; function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-7.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-7.js index 2f35537099..dcc9f4eeaa 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-7.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-7.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj w/o valueOf (toString)) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -25,10 +23,4 @@ function testcase() { // resulting string to a number. function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-8.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-8.js index 9ef8c95c88..1bc3b1634a 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-8.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-8.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with []) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -32,10 +30,4 @@ function testcase() { // or if its one element is not a number, the array converts to NaN. function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-9.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-9.js index 9484da5a68..40cdd279e4 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-9.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-7-9.js @@ -7,10 +7,8 @@ description: > Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [0]) -includes: [runTestCase.js] ---*/ -function testcase() { foo.prototype = new Array(1, 2, 3); function foo() {} var f = new foo(); @@ -32,10 +30,4 @@ function testcase() { // or if its one element is not a number, the array converts to NaN. function cb(){} - try { - if(f.reduceRight(cb,1) === 1) - return true; - } - catch (e) { } - } -runTestCase(testcase); +assert.sameValue(f.reduceRight(cb,1), 1, 'f.reduceRight(cb,1)'); diff --git a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-2.js b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-2.js index 156471b6da..7cfafc07f2 100644 --- a/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-2.js +++ b/test/built-ins/Array/prototype/reduceRight/15.4.4.22-8-b-ii-2.js @@ -6,11 +6,8 @@ es5id: 15.4.4.22-8-b-ii-2 description: > Array.prototype.reduceRight - deleted properties in step 2 are visible here -includes: [runTestCase.js] ---*/ -function testcase() { - var obj = { 2: "accumulator", 3: "another" }; Object.defineProperty(obj, "length", { @@ -21,6 +18,4 @@ function testcase() { configurable: true }); - return "accumulator" !== Array.prototype.reduceRight.call(obj, function () { }); - } -runTestCase(testcase); +assert.notSameValue(Array.prototype.reduceRight.call(obj, function () { }), "accumulator", 'Array.prototype.reduceRight.call(obj, function () { })'); diff --git a/test/built-ins/Date/now/15.9.4.4-0-1.js b/test/built-ins/Date/now/15.9.4.4-0-1.js index 52fc56ef4f..d85d2d6039 100644 --- a/test/built-ins/Date/now/15.9.4.4-0-1.js +++ b/test/built-ins/Date/now/15.9.4.4-0-1.js @@ -4,10 +4,6 @@ /*--- es5id: 15.9.4.4-0-1 description: Date.now must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { - return typeof Date.now === "function"; - } -runTestCase(testcase); +assert.sameValue(typeof Date.now, "function", 'typeof Date.now'); diff --git a/test/built-ins/Date/now/15.9.4.4-0-2.js b/test/built-ins/Date/now/15.9.4.4-0-2.js index 607d4a3882..ee88193a17 100644 --- a/test/built-ins/Date/now/15.9.4.4-0-2.js +++ b/test/built-ins/Date/now/15.9.4.4-0-2.js @@ -4,10 +4,6 @@ /*--- es5id: 15.9.4.4-0-2 description: Date.now must exist as a function taking 0 parameters -includes: [runTestCase.js] ---*/ -function testcase() { - return Date.now.length === 0; - } -runTestCase(testcase); +assert.sameValue(Date.now.length, 0, 'Date.now.length'); diff --git a/test/built-ins/Date/now/15.9.4.4-0-4.js b/test/built-ins/Date/now/15.9.4.4-0-4.js index d2211ca7a2..b6b701e36f 100644 --- a/test/built-ins/Date/now/15.9.4.4-0-4.js +++ b/test/built-ins/Date/now/15.9.4.4-0-4.js @@ -4,10 +4,6 @@ /*--- es5id: 15.9.4.4-0-4 description: Date.now - returns number -includes: [runTestCase.js] ---*/ -function testcase() { - return typeof Date.now() === "number"; - } -runTestCase(testcase); +assert.sameValue(typeof Date.now(), "number", 'typeof Date.now()'); diff --git a/test/built-ins/Date/prototype/toISOString/15.9.5.43-0-2.js b/test/built-ins/Date/prototype/toISOString/15.9.5.43-0-2.js index 22c9ee6a13..f3b637b3ba 100644 --- a/test/built-ins/Date/prototype/toISOString/15.9.5.43-0-2.js +++ b/test/built-ins/Date/prototype/toISOString/15.9.5.43-0-2.js @@ -6,10 +6,6 @@ es5id: 15.9.5.43-0-2 description: > Date.prototype.toISOString must exist as a function taking 0 parameters -includes: [runTestCase.js] ---*/ -function testcase() { - return Date.prototype.toISOString.length === 0; - } -runTestCase(testcase); +assert.sameValue(Date.prototype.toISOString.length, 0, 'Date.prototype.toISOString.length'); diff --git a/test/built-ins/Date/prototype/toISOString/15.9.5.43-0-3.js b/test/built-ins/Date/prototype/toISOString/15.9.5.43-0-3.js index 4c4d93b4d4..8a34c89fa6 100644 --- a/test/built-ins/Date/prototype/toISOString/15.9.5.43-0-3.js +++ b/test/built-ins/Date/prototype/toISOString/15.9.5.43-0-3.js @@ -4,10 +4,6 @@ /*--- es5id: 15.9.5.43-0-3 description: Date.prototype.toISOString must exist as a function -includes: [runTestCase.js] ---*/ -function testcase() { - return typeof (Date.prototype.toISOString) === "function"; - } -runTestCase(testcase); +assert.sameValue(typeof (Date.prototype.toISOString), "function", 'typeof (Date.prototype.toISOString)'); diff --git a/test/built-ins/Error/15.11-1.js b/test/built-ins/Error/15.11-1.js index 0404c957fc..d66d5dc5fa 100644 --- a/test/built-ins/Error/15.11-1.js +++ b/test/built-ins/Error/15.11-1.js @@ -4,10 +4,6 @@ /*--- es5id: 15.11-1 description: Error - ConversionError has been removed from IE9 standard mode -includes: [runTestCase.js] ---*/ -function testcase() { - return typeof ConversionError === "undefined"; - } -runTestCase(testcase); +assert.sameValue(typeof ConversionError, "undefined", 'typeof ConversionError'); diff --git a/test/built-ins/Error/15.11-2.js b/test/built-ins/Error/15.11-2.js index 41f725d121..4bb74dd4e5 100644 --- a/test/built-ins/Error/15.11-2.js +++ b/test/built-ins/Error/15.11-2.js @@ -4,10 +4,6 @@ /*--- es5id: 15.11-2 description: Error - RegExpError has been removed from IE9 standard mode -includes: [runTestCase.js] ---*/ -function testcase() { - return typeof RegExpError === "undefined"; - } -runTestCase(testcase); +assert.sameValue(typeof RegExpError, "undefined", 'typeof RegExpError'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g2-1.js b/test/built-ins/JSON/parse/15.12.1.1-g2-1.js index 9b480202b8..7358d4ffd7 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g2-1.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g2-1.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.1.1-g2-1 description: JSONStrings can be written using double quotes -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('"abc"')==="abc"; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('"abc"'), "abc", 'JSON.parse(\'"abc"\')'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g2-5.js b/test/built-ins/JSON/parse/15.12.1.1-g2-5.js index a6c5233538..c9c9d34b6d 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g2-5.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g2-5.js @@ -6,10 +6,6 @@ es5id: 15.12.1.1-g2-5 description: > A JSONStrings can contain no JSONStringCharacters (Empty JSONStrings) -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('""')===""; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('""'), "", 'JSON.parse(\'""\')'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g5-1.js b/test/built-ins/JSON/parse/15.12.1.1-g5-1.js index 5aa9e1af99..ebe955db24 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g5-1.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g5-1.js @@ -6,10 +6,6 @@ es5id: 15.12.1.1-g5-1 description: > The JSON lexical grammar allows Unicode escape sequences in a JSONString -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('"\\u0058"')==='X'; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('"\\u0058"'), 'X', 'JSON.parse(\'"\\u0058"\')'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g6-1.js b/test/built-ins/JSON/parse/15.12.1.1-g6-1.js index 59230751eb..68c3da37d5 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g6-1.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g6-1.js @@ -6,10 +6,6 @@ es5id: 15.12.1.1-g6-1 description: > The JSON lexical grammer allows '/' as a JSONEscapeCharacter after '' in a JSONString -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('"\\/"')==='/'; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('"\\/"'), '/', 'JSON.parse(\'"\\/"\')'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g6-2.js b/test/built-ins/JSON/parse/15.12.1.1-g6-2.js index 2b22e1a0ac..5ac859ec06 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g6-2.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g6-2.js @@ -6,10 +6,6 @@ es5id: 15.12.1.1-g6-2 description: > The JSON lexical grammer allows '' as a JSONEscapeCharacter after '' in a JSONString -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('"\\\\"')==='\\'; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('"\\\\"'), '\\', 'JSON.parse(\'"\\\\"\')'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g6-3.js b/test/built-ins/JSON/parse/15.12.1.1-g6-3.js index 6965358554..d18c65d7d5 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g6-3.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g6-3.js @@ -6,10 +6,6 @@ es5id: 15.12.1.1-g6-3 description: > The JSON lexical grammer allows 'b' as a JSONEscapeCharacter after '' in a JSONString -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('"\\b"')==='\b'; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('"\\b"'), '\b', 'JSON.parse(\'"\\b"\')'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g6-4.js b/test/built-ins/JSON/parse/15.12.1.1-g6-4.js index a6fe3bee0c..e36e0c32f4 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g6-4.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g6-4.js @@ -6,10 +6,6 @@ es5id: 15.12.1.1-g6-4 description: > The JSON lexical grammer allows 'f' as a JSONEscapeCharacter after '' in a JSONString -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('"\\f"')==='\f'; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('"\\f"'), '\f', 'JSON.parse(\'"\\f"\')'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g6-5.js b/test/built-ins/JSON/parse/15.12.1.1-g6-5.js index 5eb59afedc..1b9b8a7f46 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g6-5.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g6-5.js @@ -6,10 +6,6 @@ es5id: 15.12.1.1-g6-5 description: > The JSON lexical grammer allows 'n' as a JSONEscapeCharacter after '' in a JSONString -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('"\\n"')==='\n'; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('"\\n"'), '\n', 'JSON.parse(\'"\\n"\')'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g6-6.js b/test/built-ins/JSON/parse/15.12.1.1-g6-6.js index 7be75edae7..a56aa8c218 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g6-6.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g6-6.js @@ -6,10 +6,6 @@ es5id: 15.12.1.1-g6-6 description: > The JSON lexical grammer allows 'r' as a JSONEscapeCharacter after '' in a JSONString -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('"\\r"')==='\r'; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('"\\r"'), '\r', 'JSON.parse(\'"\\r"\')'); diff --git a/test/built-ins/JSON/parse/15.12.1.1-g6-7.js b/test/built-ins/JSON/parse/15.12.1.1-g6-7.js index 4c6f451b4b..93d9c3da86 100644 --- a/test/built-ins/JSON/parse/15.12.1.1-g6-7.js +++ b/test/built-ins/JSON/parse/15.12.1.1-g6-7.js @@ -6,10 +6,6 @@ es5id: 15.12.1.1-g6-7 description: > The JSON lexical grammer allows 't' as a JSONEscapeCharacter after '' in a JSONString -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.parse('"\\t"')==='\t'; - } -runTestCase(testcase); +assert.sameValue(JSON.parse('"\\t"'), '\t', 'JSON.parse(\'"\\t"\')'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-1.js b/test/built-ins/JSON/stringify/15.12.3-11-1.js index 09ae2ff2b0..13654fbc1b 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-1.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.3-11-1 description: JSON.stringify(undefined) returns undefined -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(undefined) === undefined; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(undefined), undefined, 'JSON.stringify(undefined)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-10.js b/test/built-ins/JSON/stringify/15.12.3-11-10.js index 55e651cd4f..f151731964 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-10.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-10.js @@ -6,10 +6,6 @@ es5id: 15.12.3-11-10 description: > A JSON.stringify replacer function applied to a top level scalar value can return undefined. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(42, function(k, v) { return undefined }) === undefined; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(42, function(k, v) { return undefined }), undefined, 'JSON.stringify(42, function(k, v) { return undefined })'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-11.js b/test/built-ins/JSON/stringify/15.12.3-11-11.js index 65b7024fe7..da886044b9 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-11.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-11.js @@ -6,10 +6,6 @@ es5id: 15.12.3-11-11 description: > A JSON.stringify replacer function applied to a top level Object can return undefined. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify({prop:1}, function(k, v) { return undefined }) === undefined; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify({prop:1}, function(k, v) { return undefined }), undefined, 'JSON.stringify({prop:1}, function(k, v) { return undefined })'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-12.js b/test/built-ins/JSON/stringify/15.12.3-11-12.js index c09996f038..5fdfea8383 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-12.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-12.js @@ -6,10 +6,6 @@ es5id: 15.12.3-11-12 description: > A JSON.stringify replacer function applied to a top level scalar can return an Array. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v }) === '[4,2]'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v }), '[4,2]', 'JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v })'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-13.js b/test/built-ins/JSON/stringify/15.12.3-11-13.js index d4a08dad44..e98f671164 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-13.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-13.js @@ -6,10 +6,6 @@ es5id: 15.12.3-11-13 description: > A JSON.stringify replacer function applied to a top level scalar can return an Object. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v}) === '{"forty":2}'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v}), '{"forty":2}', 'JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v})'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-14.js b/test/built-ins/JSON/stringify/15.12.3-11-14.js index 286960452a..43a27b090d 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-14.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-14.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.3-11-14 description: Applying JSON.stringify to a function returns undefined. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(function() {}) === undefined; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(function() {}), undefined, 'JSON.stringify(function() {})'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-15.js b/test/built-ins/JSON/stringify/15.12.3-11-15.js index bfd4433c34..d2cb931914 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-15.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-15.js @@ -6,10 +6,6 @@ es5id: 15.12.3-11-15 description: > Applying JSON.stringify with a replacer function to a function returns the replacer value. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(function() {}, function(k,v) {return 99}) === '99'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(function() {}, function(k,v) {return 99}), '99', 'JSON.stringify(function() {}, function(k,v) {return 99})'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-2.js b/test/built-ins/JSON/stringify/15.12.3-11-2.js index cfe9b629b2..f6dc5e8622 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-2.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-2.js @@ -6,10 +6,6 @@ es5id: 15.12.3-11-2 description: > A JSON.stringify replacer function works is applied to a top level undefined value. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(undefined, function(k, v) { return "replacement" }) === '"replacement"'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(undefined, function(k, v) { return "replacement" }), '"replacement"', 'JSON.stringify(undefined, function(k, v) { return "replacement" })'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-3.js b/test/built-ins/JSON/stringify/15.12.3-11-3.js index f82237319e..5d265a1469 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-3.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-3.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.3-11-3 description: A JSON.stringify correctly works on top level string values. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify("a string") === '"a string"'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify("a string"), '"a string"', 'JSON.stringify("a string")'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-4.js b/test/built-ins/JSON/stringify/15.12.3-11-4.js index 2fe1b25948..14286a1fe0 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-4.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-4.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.3-11-4 description: JSON.stringify correctly works on top level Number values. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(123) === '123'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(123), '123', 'JSON.stringify(123)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-5.js b/test/built-ins/JSON/stringify/15.12.3-11-5.js index 32f8cd6897..95e28dc58e 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-5.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-5.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.3-11-5 description: JSON.stringify correctly works on top level Boolean values. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(true) === 'true'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(true), 'true', 'JSON.stringify(true)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-6.js b/test/built-ins/JSON/stringify/15.12.3-11-6.js index 10665c4be0..b4426e9644 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-6.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-6.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.3-11-6 description: JSON.stringify correctly works on top level null values. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(null) === 'null'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(null), 'null', 'JSON.stringify(null)'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-7.js b/test/built-ins/JSON/stringify/15.12.3-11-7.js index 46ecc1c22a..cd922bcdd7 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-7.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-7.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.3-11-7 description: JSON.stringify correctly works on top level Number objects. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(new Number(42)) === '42'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(new Number(42)), '42', 'JSON.stringify(new Number(42))'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-8.js b/test/built-ins/JSON/stringify/15.12.3-11-8.js index 7fa9d3db0d..27bfa5c080 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-8.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-8.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.3-11-8 description: JSON.stringify correctly works on top level String objects. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(new String('wrappered')) === '"wrappered"'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(new String('wrappered')), '"wrappered"', 'JSON.stringify(new String(\'wrappered\'))'); diff --git a/test/built-ins/JSON/stringify/15.12.3-11-9.js b/test/built-ins/JSON/stringify/15.12.3-11-9.js index e451de11e4..ef5a84af96 100644 --- a/test/built-ins/JSON/stringify/15.12.3-11-9.js +++ b/test/built-ins/JSON/stringify/15.12.3-11-9.js @@ -4,10 +4,6 @@ /*--- es5id: 15.12.3-11-9 description: JSON.stringify correctly works on top level Boolean objects. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify(new Boolean(false)) === 'false'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify(new Boolean(false)), 'false', 'JSON.stringify(new Boolean(false))'); diff --git a/test/built-ins/JSON/stringify/15.12.3-4-1.js b/test/built-ins/JSON/stringify/15.12.3-4-1.js index 998083fad7..0f7eafd118 100644 --- a/test/built-ins/JSON/stringify/15.12.3-4-1.js +++ b/test/built-ins/JSON/stringify/15.12.3-4-1.js @@ -6,13 +6,6 @@ es5id: 15.12.3-4-1 description: > JSON.stringify ignores replacer aruguments that are not functions or arrays.. -includes: [runTestCase.js] ---*/ -function testcase() { - try { - return JSON.stringify([42],{})=== '[42]'; - } - catch (e) {return false} - } -runTestCase(testcase); +assert.sameValue(JSON.stringify([42],{}), '[42]', 'JSON.stringify([42],{})'); diff --git a/test/built-ins/JSON/stringify/15.12.3_2-3-a-1.js b/test/built-ins/JSON/stringify/15.12.3_2-3-a-1.js index eb1ce2fdb0..853acb01d6 100644 --- a/test/built-ins/JSON/stringify/15.12.3_2-3-a-1.js +++ b/test/built-ins/JSON/stringify/15.12.3_2-3-a-1.js @@ -6,10 +6,6 @@ es5id: 15.12.3_2-3-a-1 description: > JSON.stringify converts string wrapper objects returned from replacer functions to literal strings. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify([42], function(k,v) {return v===42? new String('fortytwo'):v}) === '["fortytwo"]'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify([42], function(k,v) {return v===42? new String('fortytwo'):v}), '["fortytwo"]', 'JSON.stringify([42], function(k,v) {return v===42? new String("fortytwo"):v})'); diff --git a/test/built-ins/JSON/stringify/15.12.3_2-3-a-2.js b/test/built-ins/JSON/stringify/15.12.3_2-3-a-2.js index 098c836ec0..7888996d77 100644 --- a/test/built-ins/JSON/stringify/15.12.3_2-3-a-2.js +++ b/test/built-ins/JSON/stringify/15.12.3_2-3-a-2.js @@ -6,10 +6,6 @@ es5id: 15.12.3_2-3-a-2 description: > JSON.stringify converts Number wrapper objects returned from replacer functions to literal numbers. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify([42], function(k,v) {return v===42? new Number(84):v}) === '[84]'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify([42], function(k,v) {return v===42? new Number(84):v}), '[84]', 'JSON.stringify([42], function(k,v) {return v===42? new Number(84):v})'); diff --git a/test/built-ins/JSON/stringify/15.12.3_2-3-a-3.js b/test/built-ins/JSON/stringify/15.12.3_2-3-a-3.js index 40dd2febd9..adb582fe20 100644 --- a/test/built-ins/JSON/stringify/15.12.3_2-3-a-3.js +++ b/test/built-ins/JSON/stringify/15.12.3_2-3-a-3.js @@ -6,10 +6,6 @@ es5id: 15.12.3_2-3-a-3 description: > JSON.stringify converts Boolean wrapper objects returned from replacer functions to literal numbers. -includes: [runTestCase.js] ---*/ -function testcase() { - return JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v}) === '[false]'; - } -runTestCase(testcase); +assert.sameValue(JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v}), '[false]', 'JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v})'); diff --git a/test/built-ins/Math/max/15.8.2.11-1.js b/test/built-ins/Math/max/15.8.2.11-1.js index 32848fa09d..f2b6e97c83 100644 --- a/test/built-ins/Math/max/15.8.2.11-1.js +++ b/test/built-ins/Math/max/15.8.2.11-1.js @@ -4,10 +4,6 @@ /*--- es5id: 15.8.2.11-1 description: Math.max({}) is NaN -includes: [runTestCase.js] ---*/ -function testcase() { - return isNaN(Math.max({})); -} -runTestCase(testcase); +assert(isNaN(Math.max({})), 'isNaN(Math.max({})) !== true'); diff --git a/test/built-ins/Math/min/15.8.2.12-1.js b/test/built-ins/Math/min/15.8.2.12-1.js index 5451ebae47..cc749e56d3 100644 --- a/test/built-ins/Math/min/15.8.2.12-1.js +++ b/test/built-ins/Math/min/15.8.2.12-1.js @@ -4,10 +4,6 @@ /*--- es5id: 15.8.2.12-1 description: Math.min({}) is NaN -includes: [runTestCase.js] ---*/ -function testcase() { - return isNaN(Math.min({})); -} -runTestCase(testcase); +assert(isNaN(Math.min({})), 'isNaN(Math.min({})) !== true'); diff --git a/test/built-ins/Number/isNaN/Number.isNaN_Boolean.js b/test/built-ins/Number/isNaN/Number.isNaN_Boolean.js index 3104972841..c4c16b0537 100644 --- a/test/built-ins/Number/isNaN/Number.isNaN_Boolean.js +++ b/test/built-ins/Number/isNaN/Number.isNaN_Boolean.js @@ -5,10 +5,6 @@ es6id: 20.1.2.4 author: Ryan Lewis description: Number.IsNaN should return false if called with a boolean. -includes: [runTestCase.js] ---*/ -function testcase() { - return Number.isNaN(true) === false; - } -runTestCase(testcase); +assert.sameValue(Number.isNaN(true), false, 'Number.isNaN(true)'); diff --git a/test/built-ins/Number/isNaN/Number.isNaN_NaN.js b/test/built-ins/Number/isNaN/Number.isNaN_NaN.js index a5b05d9d61..e70f01e23a 100644 --- a/test/built-ins/Number/isNaN/Number.isNaN_NaN.js +++ b/test/built-ins/Number/isNaN/Number.isNaN_NaN.js @@ -5,10 +5,6 @@ es6id: 20.1.2.4 author: Ryan Lewis description: Number.IsNaN should return true if called with NaN. -includes: [runTestCase.js] ---*/ -function testcase() { - return Number.isNaN(NaN) === true; - } -runTestCase(testcase); +assert.sameValue(Number.isNaN(NaN), true, 'Number.isNaN(NaN)'); diff --git a/test/built-ins/Number/isNaN/Number.isNaN_Object.js b/test/built-ins/Number/isNaN/Number.isNaN_Object.js index 4bbeed55cc..53ede9f324 100644 --- a/test/built-ins/Number/isNaN/Number.isNaN_Object.js +++ b/test/built-ins/Number/isNaN/Number.isNaN_Object.js @@ -7,10 +7,6 @@ author: Ryan Lewis description: > Number.IsNaN should return false if called with a non-number Object. -includes: [runTestCase.js] ---*/ -function testcase() { - return Number.isNaN(new Object()) === false; - } -runTestCase(testcase); +assert.sameValue(Number.isNaN(new Object()), false, 'Number.isNaN(new Object())'); diff --git a/test/built-ins/Number/isNaN/Number.isNaN_String.js b/test/built-ins/Number/isNaN/Number.isNaN_String.js index bc8336ca8e..4ad32bd28d 100644 --- a/test/built-ins/Number/isNaN/Number.isNaN_String.js +++ b/test/built-ins/Number/isNaN/Number.isNaN_String.js @@ -5,10 +5,6 @@ es6id: 20.1.2.4 author: Ryan Lewis description: Number.IsNaN should return false if called with a String. -includes: [runTestCase.js] ---*/ -function testcase() { - return Number.isNaN('string') === false; - } -runTestCase(testcase); +assert.sameValue(Number.isNaN('string'), false, 'Number.isNaN("string")'); diff --git a/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-1.js b/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-1.js index e30965517e..90e2f09b43 100644 --- a/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-1.js +++ b/test/built-ins/RegExp/prototype/lastIndex/15.10.7.5-1.js @@ -4,10 +4,6 @@ /*--- es5id: 15.10.7.5-1 description: RegExp.prototype.lastIndex is of type Undefined -includes: [runTestCase.js] ---*/ -function testcase() { - return (typeof(RegExp.prototype.lastIndex)) === 'undefined'; - } -runTestCase(testcase); +assert.sameValue(typeof(RegExp.prototype.lastIndex), 'undefined', 'typeof(RegExp.prototype.lastIndex)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-3.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-3.js index 8af334e608..f6eb8351b6 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-1-3.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-3.js @@ -4,17 +4,6 @@ /*--- es5id: 15.5.4.20-1-3 description: String.prototype.trim works for primitive type boolean -includes: [runTestCase.js] ---*/ -function testcase() { - try - { - if(String.prototype.trim.call(true) == "true") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(true), "true", 'String.prototype.trim.call(true)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-4.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-4.js index 65ece9dedb..ae609a55cb 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-1-4.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-4.js @@ -4,17 +4,6 @@ /*--- es5id: 15.5.4.20-1-4 description: String.prototype.trim works for primitive type number -includes: [runTestCase.js] ---*/ -function testcase() { - try - { - if(String.prototype.trim.call(0) == "0") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(0), "0", 'String.prototype.trim.call(0)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-5.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-5.js index 0d4539f9ba..fcfc270eba 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-1-5.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-5.js @@ -4,17 +4,6 @@ /*--- es5id: 15.5.4.20-1-5 description: String.prototype.trim works for an Object -includes: [runTestCase.js] ---*/ -function testcase() { - try - { - if(String.prototype.trim.call({})=="[object Object]") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call({}), "[object Object]", 'String.prototype.trim.call({})'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-6.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-6.js index d0bf2a218a..cd9994eee6 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-1-6.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-6.js @@ -4,17 +4,6 @@ /*--- es5id: 15.5.4.20-1-6 description: String.prototype.trim works for an String -includes: [runTestCase.js] ---*/ -function testcase() { - try - { - if(String.prototype.trim.call(new String()) == "") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(new String()), "", 'String.prototype.trim.call(new String())'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-1-7.js b/test/built-ins/String/prototype/trim/15.5.4.20-1-7.js index 084cf12b77..28ffc9805c 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-1-7.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-1-7.js @@ -4,17 +4,6 @@ /*--- es5id: 15.5.4.20-1-7 description: String.prototype.trim works for a primitive string -includes: [runTestCase.js] ---*/ -function testcase() { - try - { - if(String.prototype.trim.call("abc") === "abc") - return true; - } - catch(e) - { - } - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call("abc"), "abc", 'String.prototype.trim.call("abc")'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-1.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-1.js index f0dafc7816..0e3d17d8c7 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-1.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-1.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-1 description: > String.prototype.trim - argument 'this' is a boolean whose value is false -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(false) === "false"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(false), "false", 'String.prototype.trim.call(false)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-10.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-10.js index 85597ca39f..ef1b2de425 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-10.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-10.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-10 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is +Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(+Infinity) === "Infinity"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(+Infinity), "Infinity", 'String.prototype.trim.call(+Infinity)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-11.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-11.js index 845ef4a723..fbfdcbffca 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-11.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-11.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-11 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is -Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(-Infinity) === "-Infinity"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(-Infinity), "-Infinity", 'String.prototype.trim.call(-Infinity)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-12.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-12.js index ad4035cd0e..edd592e911 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-12.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-12.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-12 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 20 zeros)) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(100000000000000000000) === "100000000000000000000"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(100000000000000000000), "100000000000000000000", 'String.prototype.trim.call(100000000000000000000)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-13.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-13.js index a8c850b496..5b0f4d2aa7 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-13.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-13.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-13 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 21 zeros)) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(1000000000000000000000) === "1e+21"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(1000000000000000000000), "1e+21", 'String.prototype.trim.call(1000000000000000000000)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-14.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-14.js index 18ecc75e84..0f85c5b159 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-14.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-14.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-14 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 22 zeros)) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(10000000000000000000000) === "1e+22"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(10000000000000000000000), "1e+22", 'String.prototype.trim.call(10000000000000000000000)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-15.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-15.js index d613743dad..441d29f32d 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-15.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-15.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-15 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e+20) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(1e+20) === "100000000000000000000"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(1e+20), "100000000000000000000", 'String.prototype.trim.call(1e+20)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-16.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-16.js index 97f19de0e8..c029bf26ef 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-16.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-16.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-16 description: > String.prototype.trim - argument 'this' is a number that converts to string (value is 1e+21) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(1e+21) === "1e+21"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(1e+21), "1e+21", 'String.prototype.trim.call(1e+21)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-17.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-17.js index 9f770dabfd..c6cbcd387e 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-17.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-17.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-17 description: > String.prototype.trim - argument 'this' is a number that converts to string (value is 1e+22) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(1e+22) === "1e+22"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(1e+22), "1e+22", 'String.prototype.trim.call(1e+22)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-18.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-18.js index 0966a4cf0b..c643cd1841 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-18.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-18.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-18 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 0.000001) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(0.000001) === "0.000001"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(0.000001), "0.000001", 'String.prototype.trim.call(0.000001)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-19.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-19.js index 92ac98e924..1fab05cc22 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-19.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-19.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-19 description: > String.prototype.trim - argument argument 'this' is a number that converts to a string (value is 0.0000001) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(0.0000001) === "1e-7"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(0.0000001), "1e-7", 'String.prototype.trim.call(0.0000001)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-2.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-2.js index e473f1c39d..7c00e4690f 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-2.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-2.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-2 description: > String.prototype.trim - argument 'this' is a boolean whose value is true -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(true) === "true"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(true), "true", 'String.prototype.trim.call(true)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-20.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-20.js index b41403c083..0f8ee61f7d 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-20.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-20.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-20 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 0.00000001) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(0.00000001) === "1e-8"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(0.00000001), "1e-8", 'String.prototype.trim.call(0.00000001)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-21.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-21.js index a2bb7406b6..97657b3599 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-21.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-21.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-21 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e-7) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(1e-7) === "1e-7"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(1e-7), "1e-7", 'String.prototype.trim.call(1e-7)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-22.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-22.js index 2422196c50..b033fd7a60 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-22.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-22.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-22 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e-6) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(1e-6) === "0.000001"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(1e-6), "0.000001", 'String.prototype.trim.call(1e-6)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-23.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-23.js index 22ed0b242a..48a31e9b0c 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-23.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-23.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-23 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e-5) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(1e-5) === "0.00001"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(1e-5), "0.00001", 'String.prototype.trim.call(1e-5)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-24.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-24.js index f823368b08..495503cb40 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-24.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-24.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-24 description: > String.prototype.trim - argument 'this' is an integer that converts to a string (value is 123) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(123) === "123"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(123), "123", 'String.prototype.trim.call(123)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-25.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-25.js index 5086d5e504..dbfae2204e 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-25.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-25.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-25 description: > String.prototype.trim - argument 'this' is a decimal that converts to a string (value is 123.456) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(123.456) === "123.456"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(123.456), "123.456", 'String.prototype.trim.call(123.456)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-26.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-26.js index 36abc8ddde..4c9b973318 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-26.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-26.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-26 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 20 zeros).123) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(100000000000000000000.123) === "100000000000000000000"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(100000000000000000000.123), "100000000000000000000", 'String.prototype.trim.call(100000000000000000000.123)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-27.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-27.js index 81816c892a..3140ab3fec 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-27.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-27.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-27 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 123.1234567) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(123.1234567) === "123.1234567"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(123.1234567), "123.1234567", 'String.prototype.trim.call(123.1234567)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-28.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-28.js index bcdb567d1c..825b29355f 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-28.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-28.js @@ -4,10 +4,6 @@ /*--- es5id: 15.5.4.20-2-28 description: String.prototype.trim - argument 'this' is an empty string -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call("") === ""; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(""), "", 'String.prototype.trim.call("")'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-29.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-29.js index d88525bfa7..4562e8f0be 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-29.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-29.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-29 description: > String.prototype.trim - argument 'this' is a string(value is 'AB \cd') -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call("AB\n\\cd") === "AB\n\\cd"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call("AB\n\\cd"), "AB\n\\cd", 'String.prototype.trim.call("AB\n\\cd")'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-3.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-3.js index 44dafcfdf7..b2188b82f8 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-3.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-3.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-3 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is NaN) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(NaN) === "NaN"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(NaN), "NaN", 'String.prototype.trim.call(NaN)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-30.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-30.js index 26619f64b3..258a70c601 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-30.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-30.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-30 description: > String.prototype.trim - argument 'this' is a string(value is 'undefined') -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call("undefined") === "undefined"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call("undefined"), "undefined", 'String.prototype.trim.call("undefined")'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-31.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-31.js index bad3dfde1a..89c0ab51df 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-31.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-31.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-31 description: > String.prototype.trim - argument 'this' is a string(value is 'null') -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call("null") === "null"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call("null"), "null", 'String.prototype.trim.call("null")'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-32.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-32.js index 6c8fc7864b..7d2c6de184 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-32.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-32.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-32 description: > String.prototype.trim - argument 'this' is a string(value is '123#$%abc') -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call("123#$%abc") === "123#$%abc"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call("123#$%abc"), "123#$%abc", 'String.prototype.trim.call("123#$%abc")'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-33.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-33.js index 434b02015e..64fc61f7ec 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-33.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-33.js @@ -4,10 +4,6 @@ /*--- es5id: 15.5.4.20-2-33 description: String.prototype.trim - argument 'this' is a string(value is '1') -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call("1") === "1"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call("1"), "1", 'String.prototype.trim.call("1")'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-34.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-34.js index 10f9279cf1..b483e390d3 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-34.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-34.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-34 description: > String.prototype.trim - 'this' is an array that converts to a string -includes: [runTestCase.js] ---*/ -function testcase() { - return (String.prototype.trim.call([1]) === '1'); - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call([1]), '1', 'String.prototype.trim.call([1])'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-35.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-35.js index 13cdee1e19..93abde631a 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-35.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-35.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-35 description: > String.prototype.trim - 'this' is a String Object that converts to a string -includes: [runTestCase.js] ---*/ -function testcase() { - return (String.prototype.trim.call(new String("abc")) === "abc"); - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(new String("abc")), "abc", 'String.prototype.trim.call(new String("abc"))'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-36.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-36.js index 36e9f3bbea..df79aedac1 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-36.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-36.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-36 description: > String.prototype.trim - 'this' is a Boolean Object that converts to a string -includes: [runTestCase.js] ---*/ -function testcase() { - return (String.prototype.trim.call(new Boolean(false)) === "false"); - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(new Boolean(false)), "false", 'String.prototype.trim.call(new Boolean(false))'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-37.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-37.js index eda25f7b22..e2970253db 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-37.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-37.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-37 description: > String.prototype.trim - 'this' is a Number Object that converts to a string -includes: [runTestCase.js] ---*/ -function testcase() { - return (String.prototype.trim.call(new Number(123)) === "123"); - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(new Number(123)), "123", 'String.prototype.trim.call(new Number(123))'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-4.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-4.js index 66266ef532..a994d86d42 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-4.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-4.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-4 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is 0) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(0) === "0"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(0), "0", 'String.prototype.trim.call(0)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-47.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-47.js index 2a65e07f04..55d3871c93 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-47.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-47.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-47 description: > String.prototype.trim - 'this' is a object Object that converts to a string -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call({}) === "[object Object]"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call({}), "[object Object]", 'String.prototype.trim.call({})'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-5.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-5.js index 799af8bce8..1776a50bce 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-5.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-5.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-5 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is +0) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(+0) === "0"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(+0), "0", 'String.prototype.trim.call(+0)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-6.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-6.js index 32c41fc783..a2a8b34357 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-6.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-6.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-6 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is -0) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(-0) === "0"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(-0), "0", 'String.prototype.trim.call(-0)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-7.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-7.js index f1c20a4d05..fd72a3e7cf 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-7.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-7.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-7 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is positive number) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(30) === "30"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(30), "30", 'String.prototype.trim.call(30)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-8.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-8.js index 88618a67d3..da0f732038 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-8.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-8.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-8 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is negative number) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(-20) === "-20"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(-20), "-20", 'String.prototype.trim.call(-20)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-2-9.js b/test/built-ins/String/prototype/trim/15.5.4.20-2-9.js index 7deab2cd6f..f1607b830c 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-2-9.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-2-9.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-2-9 description: > String.prototype.trim - argument 'this' is a number that converts to a string (value is Infinity) -includes: [runTestCase.js] ---*/ -function testcase() { - return String.prototype.trim.call(Infinity) === "Infinity"; - } -runTestCase(testcase); +assert.sameValue(String.prototype.trim.call(Infinity), "Infinity", 'String.prototype.trim.call(Infinity)'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-10.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-10.js index 14f0c06e4f..3ab1caa197 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-3-10.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-10.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-3-10 description: > String.prototype.trim - 'S' is a string with null character ('\u0000') -includes: [runTestCase.js] ---*/ -function testcase() { - return "\u0000".trim() === "\u0000"; - } -runTestCase(testcase); +assert.sameValue("\u0000".trim(), "\u0000", '"\u0000".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-11.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-11.js index bc09490b25..bbc4758b9b 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-3-11.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-11.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-3-11 description: > String.prototype.trim - 'S' is a string that starts with null character -includes: [runTestCase.js] ---*/ -function testcase() { - return "\0\u0000abc".trim() === "\0\u0000abc"; - } -runTestCase(testcase); +assert.sameValue("\0\u0000abc".trim(), "\0\u0000abc", '"\0\u0000abc".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-12.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-12.js index c589b1c92d..8b4b66ca18 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-3-12.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-12.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-3-12 description: > String.prototype.trim - 'S' is a string that ends with null character -includes: [runTestCase.js] ---*/ -function testcase() { - return "abc\0\u0000".trim() === "abc\0\u0000"; - } -runTestCase(testcase); +assert.sameValue("abc\0\u0000".trim(), "abc\0\u0000", '"abc\0\u0000".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-13.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-13.js index e7e956610e..222c30fb53 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-3-13.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-13.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-3-13 description: > String.prototype.trim - 'S' is a string that starts with null character and ends with null character -includes: [runTestCase.js] ---*/ -function testcase() { - return "\0\u0000abc\0\u0000".trim() === "\0\u0000abc\0\u0000"; - } -runTestCase(testcase); +assert.sameValue("\0\u0000abc\0\u0000".trim(), "\0\u0000abc\0\u0000", '"\0\u0000abc\0\u0000".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-14.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-14.js index 28e139d06e..9d2833ac01 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-3-14.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-14.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-3-14 description: > String.prototype.trim - 'S' is a string that has null character in the middle -includes: [runTestCase.js] ---*/ -function testcase() { - return "a\0\u0000bc".trim() === "a\0\u0000bc"; - } -runTestCase(testcase); +assert.sameValue("a\0\u0000bc".trim(), "a\0\u0000bc", '"a\0\u0000bc".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-8.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-8.js index ce52db7e3b..405cceddf9 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-3-8.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-8.js @@ -4,10 +4,6 @@ /*--- es5id: 15.5.4.20-3-8 description: String.prototype.trim - 'S' is a string with all null character -includes: [runTestCase.js] ---*/ -function testcase() { - return "\0\u0000".trim() === "\0\u0000"; - } -runTestCase(testcase); +assert.sameValue("\0\u0000".trim(), "\0\u0000", '"\0\u0000".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-3-9.js b/test/built-ins/String/prototype/trim/15.5.4.20-3-9.js index 4492d2e89a..42b2e5a9e5 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-3-9.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-3-9.js @@ -4,10 +4,6 @@ /*--- es5id: 15.5.4.20-3-9 description: String.prototype.trim - 'S' is a string with null character ('\0') -includes: [runTestCase.js] ---*/ -function testcase() { - return "\0".trim() === "\0"; - } -runTestCase(testcase); +assert.sameValue("\0".trim(), "\0", '"\0".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-10.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-10.js index 9f38f7da90..94ece5e74a 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-4-10.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-10.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-4-10 description: > String.prototype.trim handles whitepace and lineterminators (\uFEFFabc) -includes: [runTestCase.js] ---*/ -function testcase() { - return "\uFEFFabc".trim() === "abc"; - } -runTestCase(testcase); +assert.sameValue("\uFEFFabc".trim(), "abc", '"\uFEFFabc".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-18.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-18.js index 204514c06a..c40700eb8b 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-4-18.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-18.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-4-18 description: > String.prototype.trim handles whitepace and lineterminators (abc\uFEFF) -includes: [runTestCase.js] ---*/ -function testcase() { - return "abc\uFEFF".trim() === "abc"; - } -runTestCase(testcase); +assert.sameValue("abc\uFEFF".trim(), "abc", '"abc\uFEFF".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-34.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-34.js index c376b39cdc..7fd87790e2 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-4-34.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-34.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-4-34 description: > String.prototype.trim handles whitepace and lineterminators (\uFEFF\uFEFF) -includes: [runTestCase.js] ---*/ -function testcase() { - return "\uFEFF\uFEFF".trim() === ""; - } -runTestCase(testcase); +assert.sameValue("\uFEFF\uFEFF".trim(), "", '"\uFEFF\uFEFF".trim()'); diff --git a/test/built-ins/String/prototype/trim/15.5.4.20-4-39.js b/test/built-ins/String/prototype/trim/15.5.4.20-4-39.js index 345894f2af..bbe24258f8 100644 --- a/test/built-ins/String/prototype/trim/15.5.4.20-4-39.js +++ b/test/built-ins/String/prototype/trim/15.5.4.20-4-39.js @@ -6,10 +6,6 @@ es5id: 15.5.4.20-4-39 description: > String.prototype.trim handles whitepace and lineterminators (ab\u0085c) -includes: [runTestCase.js] ---*/ -function testcase() { - return "ab\u0085c".trim() === "ab\u0085c"; - } -runTestCase(testcase); +assert.sameValue("ab\u0085c".trim(), "ab\u0085c", '"ab\u0085c".trim()'); diff --git a/test/built-ins/parseFloat/15.1.2.3-2-1.js b/test/built-ins/parseFloat/15.1.2.3-2-1.js index 856caddc39..ce12834c8f 100644 --- a/test/built-ins/parseFloat/15.1.2.3-2-1.js +++ b/test/built-ins/parseFloat/15.1.2.3-2-1.js @@ -6,10 +6,7 @@ es5id: 15.1.2.3-2-1 description: > pareseFloat - 'trimmedString' is the empty string when inputString does not contain any such characters -includes: [runTestCase.js] ---*/ -function testcase() { - return isNaN(parseFloat("")) && parseFloat("") !== parseFloat(""); - } -runTestCase(testcase); +assert(isNaN(parseFloat("")), 'isNaN(parseFloat("")) !== true'); +assert.sameValue(parseFloat(""), NaN, 'parseFloat("")'); diff --git a/test/built-ins/parseInt/15.1.2.2-2-1.js b/test/built-ins/parseInt/15.1.2.2-2-1.js index d34c54cddc..b87635ea9e 100644 --- a/test/built-ins/parseInt/15.1.2.2-2-1.js +++ b/test/built-ins/parseInt/15.1.2.2-2-1.js @@ -6,10 +6,7 @@ es5id: 15.1.2.2-2-1 description: > pareseInt - 'S' is the empty string when inputString does not contain any such characters -includes: [runTestCase.js] ---*/ -function testcase() { - return isNaN(parseInt("")) && parseInt("") !== parseInt(""); - } -runTestCase(testcase); +assert(isNaN(parseInt("")), 'isNaN(parseInt("")) !== true'); +assert.sameValue(parseInt(""), NaN, 'parseInt("")'); diff --git a/test/language/expressions/delete/11.4.1-2-1.js b/test/language/expressions/delete/11.4.1-2-1.js index 4d88210e5b..19a1de7fdd 100644 --- a/test/language/expressions/delete/11.4.1-2-1.js +++ b/test/language/expressions/delete/11.4.1-2-1.js @@ -4,13 +4,8 @@ /*--- es5id: 11.4.1-2-1 description: delete operator returns true when deleting a non-reference (number) -includes: [runTestCase.js] ---*/ -function testcase() { var d = delete 42; - if (d === true) { - return true; - } - } -runTestCase(testcase); + +assert.sameValue(d, true, 'd'); diff --git a/test/language/expressions/delete/11.4.1-4.a-17.js b/test/language/expressions/delete/11.4.1-4.a-17.js index b9a86cd8b0..6d441422e1 100644 --- a/test/language/expressions/delete/11.4.1-4.a-17.js +++ b/test/language/expressions/delete/11.4.1-4.a-17.js @@ -7,17 +7,12 @@ info: > language provides no way to directly exercise [[Delete]], the tests are placed here. es5id: 11.4.1-4.a-17 description: delete operator returns true on deleting a arguments element -includes: [runTestCase.js] ---*/ -function testcase() { function foo(a,b) { var d = delete arguments[0]; return (d === true && arguments[0] === undefined); } - if(foo(1,2) === true) - return true; - } -runTestCase(testcase); +assert.sameValue(foo(1,2), true, 'foo(1,2)'); diff --git a/test/language/expressions/unary-minus/11.4.7-4-1.js b/test/language/expressions/unary-minus/11.4.7-4-1.js index 170df2eebb..3c4f84373f 100644 --- a/test/language/expressions/unary-minus/11.4.7-4-1.js +++ b/test/language/expressions/unary-minus/11.4.7-4-1.js @@ -4,10 +4,6 @@ /*--- es5id: 11.4.7-4-1 description: -"" should be zero -includes: [runTestCase.js] ---*/ -function testcase() { - return -"" === 0; - } -runTestCase(testcase); +assert.sameValue(-"", -0, '-""'); diff --git a/test/language/expressions/unary-plus/11.4.6-2-1.js b/test/language/expressions/unary-plus/11.4.6-2-1.js index da6da3c7ab..d5ca55aea7 100644 --- a/test/language/expressions/unary-plus/11.4.6-2-1.js +++ b/test/language/expressions/unary-plus/11.4.6-2-1.js @@ -4,10 +4,6 @@ /*--- es5id: 11.4.6-2-1 description: +"" should be zero -includes: [runTestCase.js] ---*/ -function testcase() { - return +"" === 0; - } -runTestCase(testcase); +assert.sameValue(+"", 0, '+""');