From 08cf542e1b6590d8c3b7fa48ad830b9bfdf4e34f Mon Sep 17 00:00:00 2001 From: rwaldron Date: Wed, 11 Aug 2021 10:20:11 -0400 Subject: [PATCH 1/2] Remove "//CHECK#\d" --- test/built-ins/Array/S15.4.1_A1.1_T1.js | 1 - test/built-ins/Array/S15.4.1_A1.1_T2.js | 2 -- test/built-ins/Array/S15.4.1_A1.2_T1.js | 2 -- test/built-ins/Array/S15.4.1_A2.2_T1.js | 1 - test/built-ins/Array/S15.4.2.1_A1.1_T1.js | 1 - test/built-ins/Array/S15.4.2.1_A1.1_T2.js | 2 -- test/built-ins/Array/S15.4.2.1_A1.2_T1.js | 2 -- test/built-ins/Array/S15.4.2.1_A2.2_T1.js | 1 - test/built-ins/Array/S15.4.3_A1.1_T2.js | 1 - test/built-ins/Array/S15.4.5.1_A1.2_T2.js | 2 -- test/built-ins/Array/S15.4.5.1_A2.1_T1.js | 3 --- test/built-ins/Array/S15.4.5.1_A2.2_T1.js | 3 --- test/built-ins/Array/S15.4.5.1_A2.3_T1.js | 2 -- test/built-ins/Array/S15.4.5.2_A1_T1.js | 5 ----- test/built-ins/Array/S15.4.5.2_A1_T2.js | 2 -- test/built-ins/Array/S15.4.5.2_A2_T1.js | 4 ---- test/built-ins/Array/S15.4.5.2_A3_T1.js | 2 -- test/built-ins/Array/S15.4.5.2_A3_T2.js | 4 ---- test/built-ins/Array/S15.4.5.2_A3_T3.js | 2 -- test/built-ins/Array/S15.4_A1.1_T10.js | 1 - test/built-ins/Array/S15.4_A1.1_T4.js | 2 -- test/built-ins/Array/S15.4_A1.1_T5.js | 2 -- test/built-ins/Array/S15.4_A1.1_T6.js | 2 -- test/built-ins/Array/S15.4_A1.1_T7.js | 3 --- test/built-ins/Array/S15.4_A1.1_T8.js | 3 --- test/built-ins/Array/S15.4_A1.1_T9.js | 8 -------- .../Array/length/S15.4.2.2_A1.1_T1.js | 1 - .../Array/length/S15.4.2.2_A1.1_T2.js | 1 - .../Array/length/S15.4.2.2_A1.2_T1.js | 1 - .../Array/length/S15.4.2.2_A2.1_T1.js | 3 --- .../Array/length/S15.4.2.2_A2.2_T1.js | 3 --- .../Array/length/S15.4.2.2_A2.2_T2.js | 3 --- .../Array/length/S15.4.2.2_A2.2_T3.js | 3 --- .../Array/length/S15.4.5.1_A1.1_T1.js | 3 --- .../Array/length/S15.4.5.1_A1.1_T2.js | 4 ---- .../Array/length/S15.4.5.1_A1.2_T1.js | 2 -- .../Array/length/S15.4.5.1_A1.2_T3.js | 2 -- .../Array/length/S15.4.5.1_A1.3_T1.js | 6 ------ .../Array/length/S15.4.5.1_A1.3_T2.js | 8 -------- .../built-ins/Array/length/S15.4.5.2_A3_T4.js | 1 - .../Array/prototype/concat/S15.4.4.4_A1_T1.js | 1 - .../Array/prototype/concat/S15.4.4.4_A1_T2.js | 1 - .../Array/prototype/concat/S15.4.4.4_A1_T3.js | 1 - .../Array/prototype/concat/S15.4.4.4_A1_T4.js | 1 - .../Array/prototype/concat/S15.4.4.4_A2_T1.js | 1 - .../Array/prototype/concat/S15.4.4.4_A2_T2.js | 1 - .../Array/prototype/join/S15.4.4.5_A1.1_T1.js | 2 -- .../Array/prototype/join/S15.4.4.5_A1.2_T1.js | 3 --- .../Array/prototype/join/S15.4.4.5_A1.2_T2.js | 3 --- .../Array/prototype/join/S15.4.4.5_A1.3_T1.js | 3 --- .../Array/prototype/join/S15.4.4.5_A2_T1.js | 6 ------ .../Array/prototype/join/S15.4.4.5_A2_T2.js | 10 ---------- .../Array/prototype/join/S15.4.4.5_A2_T3.js | 6 ------ .../Array/prototype/join/S15.4.4.5_A2_T4.js | 8 -------- .../Array/prototype/join/S15.4.4.5_A3.1_T1.js | 8 -------- .../Array/prototype/join/S15.4.4.5_A3.1_T2.js | 9 --------- .../Array/prototype/join/S15.4.4.5_A3.2_T1.js | 8 -------- .../Array/prototype/join/S15.4.4.5_A3.2_T2.js | 8 -------- .../Array/prototype/join/S15.4.4.5_A4_T3.js | 2 -- .../Array/prototype/join/S15.4.4.5_A5_T1.js | 2 -- .../Array/prototype/join/S15.4.4.5_A6.6.js | 1 - .../Array/prototype/join/S15.4.4.5_A6.7.js | 1 - .../Array/prototype/pop/S15.4.4.6_A1.1_T1.js | 4 ---- .../Array/prototype/pop/S15.4.4.6_A1.2_T1.js | 10 ---------- .../Array/prototype/pop/S15.4.4.6_A2_T1.js | 6 ------ .../Array/prototype/pop/S15.4.4.6_A2_T2.js | 12 ----------- .../Array/prototype/pop/S15.4.4.6_A2_T3.js | 4 ---- .../Array/prototype/pop/S15.4.4.6_A2_T4.js | 8 -------- .../Array/prototype/pop/S15.4.4.6_A3_T1.js | 4 ---- .../Array/prototype/pop/S15.4.4.6_A3_T2.js | 4 ---- .../Array/prototype/pop/S15.4.4.6_A3_T3.js | 3 --- .../Array/prototype/pop/S15.4.4.6_A4_T1.js | 6 ------ .../Array/prototype/pop/S15.4.4.6_A4_T2.js | 6 ------ .../Array/prototype/pop/S15.4.4.6_A5.7.js | 1 - .../Array/prototype/push/S15.4.4.7_A1_T1.js | 7 ------- .../Array/prototype/push/S15.4.4.7_A1_T2.js | 9 --------- .../Array/prototype/push/S15.4.4.7_A2_T1.js | 9 --------- .../Array/prototype/push/S15.4.4.7_A2_T2.js | 18 ----------------- .../Array/prototype/push/S15.4.4.7_A2_T3.js | 8 -------- .../Array/prototype/push/S15.4.4.7_A3.js | 4 ---- .../Array/prototype/push/S15.4.4.7_A4_T1.js | 10 ---------- .../Array/prototype/push/S15.4.4.7_A4_T2.js | 5 ----- .../Array/prototype/push/S15.4.4.7_A4_T3.js | 8 -------- .../Array/prototype/push/S15.4.4.7_A5_T1.js | 5 ----- .../Array/prototype/push/S15.4.4.7_A6.7.js | 1 - .../prototype/reverse/S15.4.4.8_A1_T1.js | 6 ------ .../prototype/reverse/S15.4.4.8_A1_T2.js | 20 ------------------- .../prototype/reverse/S15.4.4.8_A2_T1.js | 20 ------------------- .../prototype/reverse/S15.4.4.8_A2_T2.js | 20 ------------------- .../prototype/reverse/S15.4.4.8_A2_T3.js | 20 ------------------- .../prototype/reverse/S15.4.4.8_A3_T3.js | 5 ----- .../prototype/reverse/S15.4.4.8_A4_T1.js | 8 -------- .../prototype/reverse/S15.4.4.8_A4_T2.js | 8 -------- .../Array/prototype/reverse/S15.4.4.8_A5.7.js | 1 - .../prototype/shift/S15.4.4.9_A1.1_T1.js | 4 ---- .../prototype/shift/S15.4.4.9_A1.2_T1.js | 10 ---------- .../Array/prototype/shift/S15.4.4.9_A2_T1.js | 6 ------ .../Array/prototype/shift/S15.4.4.9_A2_T2.js | 10 ---------- .../Array/prototype/shift/S15.4.4.9_A2_T3.js | 4 ---- .../Array/prototype/shift/S15.4.4.9_A2_T4.js | 6 ------ .../Array/prototype/shift/S15.4.4.9_A2_T5.js | 8 -------- .../Array/prototype/shift/S15.4.4.9_A3_T3.js | 4 ---- .../Array/prototype/shift/S15.4.4.9_A4_T1.js | 8 -------- .../Array/prototype/shift/S15.4.4.9_A4_T2.js | 8 -------- .../Array/prototype/shift/S15.4.4.9_A5.7.js | 1 - .../prototype/slice/S15.4.4.10_A1.1_T1.js | 6 ------ .../prototype/slice/S15.4.4.10_A1.1_T2.js | 3 --- .../prototype/slice/S15.4.4.10_A1.1_T3.js | 3 --- .../prototype/slice/S15.4.4.10_A1.1_T4.js | 3 --- .../prototype/slice/S15.4.4.10_A1.1_T5.js | 5 ----- .../prototype/slice/S15.4.4.10_A1.1_T6.js | 5 ----- .../prototype/slice/S15.4.4.10_A1.1_T7.js | 5 ----- .../prototype/slice/S15.4.4.10_A1.2_T1.js | 4 ---- .../prototype/slice/S15.4.4.10_A1.2_T2.js | 4 ---- .../prototype/slice/S15.4.4.10_A1.2_T3.js | 4 ---- .../prototype/slice/S15.4.4.10_A1.2_T4.js | 8 -------- .../prototype/slice/S15.4.4.10_A1.3_T1.js | 6 ------ .../prototype/slice/S15.4.4.10_A1.3_T2.js | 3 --- .../prototype/slice/S15.4.4.10_A1.3_T3.js | 3 --- .../prototype/slice/S15.4.4.10_A1.3_T4.js | 3 --- .../prototype/slice/S15.4.4.10_A1.4_T1.js | 6 ------ .../prototype/slice/S15.4.4.10_A1.4_T2.js | 5 ----- .../prototype/slice/S15.4.4.10_A1.4_T3.js | 7 ------- .../prototype/slice/S15.4.4.10_A1.4_T4.js | 3 --- .../prototype/slice/S15.4.4.10_A1.5_T1.js | 5 ----- .../prototype/slice/S15.4.4.10_A1.5_T2.js | 5 ----- .../prototype/slice/S15.4.4.10_A2.1_T1.js | 5 ----- .../prototype/slice/S15.4.4.10_A2.1_T2.js | 6 ------ .../prototype/slice/S15.4.4.10_A2.1_T3.js | 3 --- .../prototype/slice/S15.4.4.10_A2.1_T4.js | 6 ------ .../prototype/slice/S15.4.4.10_A2.1_T5.js | 6 ------ .../prototype/slice/S15.4.4.10_A2.2_T1.js | 5 ----- .../prototype/slice/S15.4.4.10_A2.2_T2.js | 3 --- .../prototype/slice/S15.4.4.10_A2.2_T3.js | 8 -------- .../prototype/slice/S15.4.4.10_A2.2_T4.js | 3 --- .../prototype/slice/S15.4.4.10_A2.2_T5.js | 6 ------ .../Array/prototype/slice/S15.4.4.10_A2_T1.js | 6 ------ .../Array/prototype/slice/S15.4.4.10_A2_T2.js | 6 ------ .../Array/prototype/slice/S15.4.4.10_A2_T3.js | 6 ------ .../Array/prototype/slice/S15.4.4.10_A2_T4.js | 6 ------ .../Array/prototype/slice/S15.4.4.10_A2_T5.js | 6 ------ .../Array/prototype/slice/S15.4.4.10_A2_T6.js | 6 ------ .../Array/prototype/slice/S15.4.4.10_A3_T3.js | 2 -- .../Array/prototype/slice/S15.4.4.10_A4_T1.js | 3 --- .../Array/prototype/slice/S15.4.4.10_A5.7.js | 1 - .../prototype/sort/S15.4.4.11_A1.1_T1.js | 3 --- .../prototype/sort/S15.4.4.11_A1.2_T1.js | 6 ------ .../prototype/sort/S15.4.4.11_A1.2_T2.js | 6 ------ .../prototype/sort/S15.4.4.11_A1.3_T1.js | 3 --- .../prototype/sort/S15.4.4.11_A1.4_T1.js | 6 ------ .../prototype/sort/S15.4.4.11_A1.4_T2.js | 6 ------ .../prototype/sort/S15.4.4.11_A1.5_T1.js | 6 ------ .../prototype/sort/S15.4.4.11_A2.1_T1.js | 1 - .../prototype/sort/S15.4.4.11_A2.1_T2.js | 1 - .../prototype/sort/S15.4.4.11_A2.1_T3.js | 1 - .../prototype/sort/S15.4.4.11_A2.2_T1.js | 1 - .../prototype/sort/S15.4.4.11_A2.2_T2.js | 1 - .../prototype/sort/S15.4.4.11_A2.2_T3.js | 1 - .../Array/prototype/sort/S15.4.4.11_A3_T1.js | 2 -- .../Array/prototype/sort/S15.4.4.11_A3_T2.js | 2 -- .../Array/prototype/sort/S15.4.4.11_A4_T3.js | 5 ----- .../Array/prototype/sort/S15.4.4.11_A5_T1.js | 1 - .../Array/prototype/sort/S15.4.4.11_A6_T2.js | 8 -------- .../Array/prototype/sort/S15.4.4.11_A7.7.js | 1 - .../prototype/splice/S15.4.4.12_A1.1_T1.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.1_T2.js | 9 --------- .../prototype/splice/S15.4.4.12_A1.1_T3.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.1_T4.js | 9 --------- .../prototype/splice/S15.4.4.12_A1.1_T5.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.1_T6.js | 9 --------- .../prototype/splice/S15.4.4.12_A1.2_T1.js | 5 ----- .../prototype/splice/S15.4.4.12_A1.2_T2.js | 5 ----- .../prototype/splice/S15.4.4.12_A1.2_T3.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.2_T4.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.2_T5.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.3_T1.js | 5 ----- .../prototype/splice/S15.4.4.12_A1.3_T2.js | 5 ----- .../prototype/splice/S15.4.4.12_A1.3_T3.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.3_T4.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.3_T5.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.4_T1.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.4_T2.js | 9 --------- .../prototype/splice/S15.4.4.12_A1.4_T3.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.4_T4.js | 9 --------- .../prototype/splice/S15.4.4.12_A1.4_T5.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.4_T6.js | 9 --------- .../prototype/splice/S15.4.4.12_A1.5_T1.js | 7 ------- .../prototype/splice/S15.4.4.12_A1.5_T2.js | 7 ------- .../prototype/splice/S15.4.4.12_A2.1_T1.js | 7 ------- .../prototype/splice/S15.4.4.12_A2.1_T2.js | 7 ------- .../prototype/splice/S15.4.4.12_A2.1_T3.js | 6 ------ .../prototype/splice/S15.4.4.12_A2.1_T4.js | 7 ------- .../prototype/splice/S15.4.4.12_A2.1_T5.js | 7 ------- .../prototype/splice/S15.4.4.12_A2.2_T1.js | 7 ------- .../prototype/splice/S15.4.4.12_A2.2_T2.js | 5 ----- .../prototype/splice/S15.4.4.12_A2.2_T3.js | 7 ------- .../prototype/splice/S15.4.4.12_A2.2_T4.js | 5 ----- .../prototype/splice/S15.4.4.12_A2.2_T5.js | 7 ------- .../prototype/splice/S15.4.4.12_A2_T1.js | 10 ---------- .../prototype/splice/S15.4.4.12_A2_T2.js | 8 -------- .../prototype/splice/S15.4.4.12_A2_T3.js | 8 -------- .../prototype/splice/S15.4.4.12_A2_T4.js | 10 ---------- .../prototype/splice/S15.4.4.12_A3_T1.js | 5 ----- .../prototype/splice/S15.4.4.12_A3_T3.js | 4 ---- .../prototype/splice/S15.4.4.12_A4_T1.js | 12 ----------- .../prototype/splice/S15.4.4.12_A4_T2.js | 12 ----------- .../prototype/splice/S15.4.4.12_A4_T3.js | 10 ---------- .../Array/prototype/splice/S15.4.4.12_A5.7.js | 1 - .../toLocaleString/S15.4.4.3_A1_T1.js | 1 - .../toLocaleString/S15.4.4.3_A3_T1.js | 1 - .../toLocaleString/S15.4.4.3_A4.7.js | 1 - .../prototype/toString/S15.4.4.2_A1_T1.js | 2 -- .../prototype/toString/S15.4.4.2_A1_T2.js | 4 ---- .../prototype/toString/S15.4.4.2_A1_T3.js | 8 -------- .../prototype/toString/S15.4.4.2_A1_T4.js | 8 -------- .../prototype/toString/S15.4.4.2_A3_T1.js | 1 - .../prototype/toString/S15.4.4.2_A4.7.js | 1 - .../prototype/unshift/S15.4.4.13_A1_T1.js | 8 -------- .../prototype/unshift/S15.4.4.13_A1_T2.js | 9 --------- .../prototype/unshift/S15.4.4.13_A2_T1.js | 15 +++----------- .../prototype/unshift/S15.4.4.13_A2_T2.js | 15 -------------- .../prototype/unshift/S15.4.4.13_A2_T3.js | 8 -------- .../prototype/unshift/S15.4.4.13_A3_T2.js | 6 ------ .../prototype/unshift/S15.4.4.13_A4_T1.js | 10 ---------- .../prototype/unshift/S15.4.4.13_A4_T2.js | 10 ---------- .../prototype/unshift/S15.4.4.13_A5.7.js | 1 - 226 files changed, 3 insertions(+), 1192 deletions(-) diff --git a/test/built-ins/Array/S15.4.1_A1.1_T1.js b/test/built-ins/Array/S15.4.1_A1.1_T1.js index bb3cef639c..086237ff76 100644 --- a/test/built-ins/Array/S15.4.1_A1.1_T1.js +++ b/test/built-ins/Array/S15.4.1_A1.1_T1.js @@ -12,7 +12,6 @@ description: > this property ---*/ -//CHECK#1 Array.prototype.myproperty = 42; var x = Array(); assert.sameValue(x.myproperty, 42, 'The value of x.myproperty is expected to be 42'); diff --git a/test/built-ins/Array/S15.4.1_A1.1_T2.js b/test/built-ins/Array/S15.4.1_A1.1_T2.js index 85cbc27b57..7a73bf74dc 100644 --- a/test/built-ins/Array/S15.4.1_A1.1_T2.js +++ b/test/built-ins/Array/S15.4.1_A1.1_T2.js @@ -10,12 +10,10 @@ es5id: 15.4.1_A1.1_T2 description: Array.prototype.toString = Object.prototype.toString ---*/ -//CHECK#1 Array.prototype.toString = Object.prototype.toString; var x = Array(); assert.sameValue(x.toString(), "[object Array]", 'x.toString() must return "[object Array]"'); -//CHECK#2 Array.prototype.toString = Object.prototype.toString; var x = Array(0, 1, 2); assert.sameValue(x.toString(), "[object Array]", 'x.toString() must return "[object Array]"'); diff --git a/test/built-ins/Array/S15.4.1_A1.2_T1.js b/test/built-ins/Array/S15.4.1_A1.2_T1.js index 2cbe462f61..e71cc63655 100644 --- a/test/built-ins/Array/S15.4.1_A1.2_T1.js +++ b/test/built-ins/Array/S15.4.1_A1.2_T1.js @@ -7,12 +7,10 @@ es5id: 15.4.1_A1.2_T1 description: Checking use Object.prototype.toString ---*/ -//CHECK#1 var x = Array(); x.getClass = Object.prototype.toString; assert.sameValue(x.getClass(), "[object Array]", 'x.getClass() must return "[object Array]"'); -//CHECK#2 var x = Array(0, 1, 2); x.getClass = Object.prototype.toString; assert.sameValue(x.getClass(), "[object Array]", 'x.getClass() must return "[object Array]"'); diff --git a/test/built-ins/Array/S15.4.1_A2.2_T1.js b/test/built-ins/Array/S15.4.1_A2.2_T1.js index f06603341f..8156623e14 100644 --- a/test/built-ins/Array/S15.4.1_A2.2_T1.js +++ b/test/built-ins/Array/S15.4.1_A2.2_T1.js @@ -12,7 +12,6 @@ es5id: 15.4.1_A2.2_T1 description: Checking correct work this algorithm ---*/ -//CHECK# var x = Array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, diff --git a/test/built-ins/Array/S15.4.2.1_A1.1_T1.js b/test/built-ins/Array/S15.4.2.1_A1.1_T1.js index 0237a68c51..35e5870577 100644 --- a/test/built-ins/Array/S15.4.2.1_A1.1_T1.js +++ b/test/built-ins/Array/S15.4.2.1_A1.1_T1.js @@ -12,7 +12,6 @@ description: > this property ---*/ -//CHECK#1 Array.prototype.myproperty = 1; var x = new Array(); assert.sameValue(x.myproperty, 1, 'The value of x.myproperty is expected to be 1'); diff --git a/test/built-ins/Array/S15.4.2.1_A1.1_T2.js b/test/built-ins/Array/S15.4.2.1_A1.1_T2.js index 61dff8e87f..7ecf5d2ba7 100644 --- a/test/built-ins/Array/S15.4.2.1_A1.1_T2.js +++ b/test/built-ins/Array/S15.4.2.1_A1.1_T2.js @@ -10,12 +10,10 @@ es5id: 15.4.2.1_A1.1_T2 description: Array.prototype.toString = Object.prototype.toString ---*/ -//CHECK#1 Array.prototype.toString = Object.prototype.toString; var x = new Array(); assert.sameValue(x.toString(), "[object Array]", 'x.toString() must return "[object Array]"'); -//CHECK#2 Array.prototype.toString = Object.prototype.toString; var x = new Array(0, 1, 2); assert.sameValue(x.toString(), "[object Array]", 'x.toString() must return "[object Array]"'); diff --git a/test/built-ins/Array/S15.4.2.1_A1.2_T1.js b/test/built-ins/Array/S15.4.2.1_A1.2_T1.js index a6f53cf277..42712bde71 100644 --- a/test/built-ins/Array/S15.4.2.1_A1.2_T1.js +++ b/test/built-ins/Array/S15.4.2.1_A1.2_T1.js @@ -7,12 +7,10 @@ es5id: 15.4.2.1_A1.2_T1 description: Checking use Object.prototype.toString ---*/ -//CHECK#1 var x = new Array(); x.getClass = Object.prototype.toString; assert.sameValue(x.getClass(), "[object Array]", 'x.getClass() must return "[object Array]"'); -//CHECK#2 var x = new Array(0, 1, 2); x.getClass = Object.prototype.toString; assert.sameValue(x.getClass(), "[object Array]", 'x.getClass() must return "[object Array]"'); diff --git a/test/built-ins/Array/S15.4.2.1_A2.2_T1.js b/test/built-ins/Array/S15.4.2.1_A2.2_T1.js index 3ee4c6f46d..a27b010ef6 100644 --- a/test/built-ins/Array/S15.4.2.1_A2.2_T1.js +++ b/test/built-ins/Array/S15.4.2.1_A2.2_T1.js @@ -12,7 +12,6 @@ es5id: 15.4.2.1_A2.2_T1 description: Checking correct work this algorithm ---*/ -//CHECK# var x = new Array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, diff --git a/test/built-ins/Array/S15.4.3_A1.1_T2.js b/test/built-ins/Array/S15.4.3_A1.1_T2.js index 3e5dfa605a..5cb996d32b 100644 --- a/test/built-ins/Array/S15.4.3_A1.1_T2.js +++ b/test/built-ins/Array/S15.4.3_A1.1_T2.js @@ -9,7 +9,6 @@ es5id: 15.4.3_A1.1_T2 description: Function.prototype.toString = Object.prototype.toString ---*/ -//CHECK#1 Function.prototype.toString = Object.prototype.toString; assert.sameValue( diff --git a/test/built-ins/Array/S15.4.5.1_A1.2_T2.js b/test/built-ins/Array/S15.4.5.1_A1.2_T2.js index b0c43932d8..9bae658bd7 100644 --- a/test/built-ins/Array/S15.4.5.1_A1.2_T2.js +++ b/test/built-ins/Array/S15.4.5.1_A1.2_T2.js @@ -11,11 +11,9 @@ es5id: 15.4.5.1_A1.2_T2 description: Checking an inherited property ---*/ -//CHECK#1 Array.prototype[2] = -1; var x = [0, 1, 2]; assert.sameValue(x[2], 2, 'The value of x[2] is expected to be 2'); -//CHECK#2 x.length = 2; assert.sameValue(x[2], -1, 'The value of x[2] is expected to be -1'); diff --git a/test/built-ins/Array/S15.4.5.1_A2.1_T1.js b/test/built-ins/Array/S15.4.5.1_A2.1_T1.js index 720470d820..1ced35a33d 100644 --- a/test/built-ins/Array/S15.4.5.1_A2.1_T1.js +++ b/test/built-ins/Array/S15.4.5.1_A2.1_T1.js @@ -9,19 +9,16 @@ es5id: 15.4.5.1_A2.1_T1 description: P in [4294967295, -1, true] ---*/ -//CHECK#1 var x = []; x[4294967295] = 1; assert.sameValue(x.length, 0, 'The value of x.length is expected to be 0'); assert.sameValue(x[4294967295], 1, 'The value of x[4294967295] is expected to be 1'); -//CHECK#2 x = []; x[-1] = 1; assert.sameValue(x.length, 0, 'The value of x.length is expected to be 0'); assert.sameValue(x[-1], 1, 'The value of x[-1] is expected to be 1'); -//CHECK#3 x = []; x[true] = 1; assert.sameValue(x.length, 0, 'The value of x.length is expected to be 0'); diff --git a/test/built-ins/Array/S15.4.5.1_A2.2_T1.js b/test/built-ins/Array/S15.4.5.1_A2.2_T1.js index 9df4c565e8..f17e86e765 100644 --- a/test/built-ins/Array/S15.4.5.1_A2.2_T1.js +++ b/test/built-ins/Array/S15.4.5.1_A2.2_T1.js @@ -9,15 +9,12 @@ es5id: 15.4.5.1_A2.2_T1 description: length === 100, P in [0, 98, 99] ---*/ -//CHECK#1 var x = Array(100); x[0] = 1; assert.sameValue(x.length, 100, 'The value of x.length is expected to be 100'); -//CHECK#2 x[98] = 1; assert.sameValue(x.length, 100, 'The value of x.length is expected to be 100'); -//CHECK#3 x[99] = 1; assert.sameValue(x.length, 100, 'The value of x.length is expected to be 100'); diff --git a/test/built-ins/Array/S15.4.5.1_A2.3_T1.js b/test/built-ins/Array/S15.4.5.1_A2.3_T1.js index 35a69e56de..eacbef6ef9 100644 --- a/test/built-ins/Array/S15.4.5.1_A2.3_T1.js +++ b/test/built-ins/Array/S15.4.5.1_A2.3_T1.js @@ -9,11 +9,9 @@ es5id: 15.4.5.1_A2.3_T1 description: length = 100, P in [100, 199] ---*/ -//CHECK#1 var x = Array(100); x[100] = 1; assert.sameValue(x.length, 101, 'The value of x.length is expected to be 101'); -//CHECK#2 x[199] = 1; assert.sameValue(x.length, 200, 'The value of x.length is expected to be 200'); diff --git a/test/built-ins/Array/S15.4.5.2_A1_T1.js b/test/built-ins/Array/S15.4.5.2_A1_T1.js index a8fc10e8bf..31a81e9d03 100644 --- a/test/built-ins/Array/S15.4.5.2_A1_T1.js +++ b/test/built-ins/Array/S15.4.5.2_A1_T1.js @@ -10,22 +10,17 @@ es5id: 15.4.5.2_A1_T1 description: Checking boundary points ---*/ -//CHECK#1 var x = []; assert.sameValue(x.length, 0, 'The value of x.length is expected to be 0'); -//CHECK#2 x[0] = 1; assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); -//CHECK#3 x[1] = 1; assert.sameValue(x.length, 2, 'The value of x.length is expected to be 2'); -//CHECK#4 x[2147483648] = 1; assert.sameValue(x.length, 2147483649, 'The value of x.length is expected to be 2147483649'); -//CHECK#5 x[4294967294] = 1; assert.sameValue(x.length, 4294967295, 'The value of x.length is expected to be 4294967295'); diff --git a/test/built-ins/Array/S15.4.5.2_A1_T2.js b/test/built-ins/Array/S15.4.5.2_A1_T2.js index 0666c2f830..1bd6ea3443 100644 --- a/test/built-ins/Array/S15.4.5.2_A1_T2.js +++ b/test/built-ins/Array/S15.4.5.2_A1_T2.js @@ -10,12 +10,10 @@ es5id: 15.4.5.2_A1_T2 description: P = "2^32 - 1" is not index array ---*/ -//CHECK#1 var x = []; x[4294967295] = 1; assert.sameValue(x.length, 0, 'The value of x.length is expected to be 0'); -//CHECK#2 var y = []; y[1] = 1; y[4294967295] = 1; diff --git a/test/built-ins/Array/S15.4.5.2_A2_T1.js b/test/built-ins/Array/S15.4.5.2_A2_T1.js index 81c2b7b837..593f099ce2 100644 --- a/test/built-ins/Array/S15.4.5.2_A2_T1.js +++ b/test/built-ins/Array/S15.4.5.2_A2_T1.js @@ -9,18 +9,14 @@ es5id: 15.4.5.2_A2_T1 description: Checking length property ---*/ -//CHECK#1 var x = []; assert.sameValue(x.length, 0, 'The value of x.length is expected to be 0'); -//CHECK#2 x[0] = 1; assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); -//CHECK#3 x[1] = 1; assert.sameValue(x.length, 2, 'The value of x.length is expected to be 2'); -//CHECK#4 x[9] = 1; assert.sameValue(x.length, 10, 'The value of x.length is expected to be 10'); diff --git a/test/built-ins/Array/S15.4.5.2_A3_T1.js b/test/built-ins/Array/S15.4.5.2_A3_T1.js index 703c074ba2..99a37a45e9 100644 --- a/test/built-ins/Array/S15.4.5.2_A3_T1.js +++ b/test/built-ins/Array/S15.4.5.2_A3_T1.js @@ -11,12 +11,10 @@ description: > is an array index ---*/ -//CHECK#1 var x = []; x.length = 1; assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); -//CHECK#2 x[5] = 1; x.length = 10; assert.sameValue(x.length, 10, 'The value of x.length is expected to be 10'); diff --git a/test/built-ins/Array/S15.4.5.2_A3_T2.js b/test/built-ins/Array/S15.4.5.2_A3_T2.js index c71f8abc9c..889c3bda96 100644 --- a/test/built-ins/Array/S15.4.5.2_A3_T2.js +++ b/test/built-ins/Array/S15.4.5.2_A3_T2.js @@ -11,7 +11,6 @@ description: > is an array index ---*/ -//CHECK#1 var x = []; x[1] = 1; x[3] = 3; @@ -21,14 +20,11 @@ assert.sameValue(x.length, 4, 'The value of x.length is expected to be 4'); assert.sameValue(x[5], undefined, 'The value of x[5] is expected to equal undefined'); assert.sameValue(x[3], 3, 'The value of x[3] is expected to be 3'); -//CHECK#4 x.length = new Number(6); assert.sameValue(x[5], undefined, 'The value of x[5] is expected to equal undefined'); -//CHECK#5 x.length = 0; assert.sameValue(x[0], undefined, 'The value of x[0] is expected to equal undefined'); -//CHECK#6 x.length = 1; assert.sameValue(x[1], undefined, 'The value of x[1] is expected to equal undefined'); diff --git a/test/built-ins/Array/S15.4.5.2_A3_T3.js b/test/built-ins/Array/S15.4.5.2_A3_T3.js index eb7d7ea67c..3bafb86793 100644 --- a/test/built-ins/Array/S15.4.5.2_A3_T3.js +++ b/test/built-ins/Array/S15.4.5.2_A3_T3.js @@ -9,12 +9,10 @@ es5id: 15.4.5.2_A3_T3 description: "[[Put]] (length, 4294967296)" ---*/ -//CHECK#1 var x = []; x.length = 4294967295; assert.sameValue(x.length, 4294967295, 'The value of x.length is expected to be 4294967295'); -//CHECK#2 try { x = []; x.length = 4294967296; diff --git a/test/built-ins/Array/S15.4_A1.1_T10.js b/test/built-ins/Array/S15.4_A1.1_T10.js index 521828b54b..770eafecd0 100644 --- a/test/built-ins/Array/S15.4_A1.1_T10.js +++ b/test/built-ins/Array/S15.4_A1.1_T10.js @@ -9,7 +9,6 @@ es5id: 15.4_A1.1_T10 description: Array index is power of two ---*/ -//CHECK# var x = []; var k = 1; for (var i = 0; i < 32; i++) { diff --git a/test/built-ins/Array/S15.4_A1.1_T4.js b/test/built-ins/Array/S15.4_A1.1_T4.js index efa4fe7d2b..06a81f52be 100644 --- a/test/built-ins/Array/S15.4_A1.1_T4.js +++ b/test/built-ins/Array/S15.4_A1.1_T4.js @@ -9,12 +9,10 @@ es5id: 15.4_A1.1_T4 description: Checking for string primitive ---*/ -//CHECK#1 var x = []; x["0"] = 0; assert.sameValue(x[0], 0, 'The value of x[0] is expected to be 0'); -//CHECK#2 var y = []; y["1"] = 1; assert.sameValue(y[1], 1, 'The value of y[1] is expected to be 1'); diff --git a/test/built-ins/Array/S15.4_A1.1_T5.js b/test/built-ins/Array/S15.4_A1.1_T5.js index 73ca7f35f6..f95004e772 100644 --- a/test/built-ins/Array/S15.4_A1.1_T5.js +++ b/test/built-ins/Array/S15.4_A1.1_T5.js @@ -9,13 +9,11 @@ es5id: 15.4_A1.1_T5 description: Checking for null and undefined ---*/ -//CHECK#1 var x = []; x[null] = 0; assert.sameValue(x[0], undefined, 'The value of x[0] is expected to equal undefined'); assert.sameValue(x["null"], 0, 'The value of x["null"] is expected to be 0'); -//CHECK#3 var y = []; y[undefined] = 0; assert.sameValue(y[0], undefined, 'The value of y[0] is expected to equal undefined'); diff --git a/test/built-ins/Array/S15.4_A1.1_T6.js b/test/built-ins/Array/S15.4_A1.1_T6.js index 0c6facf162..84f1f38463 100644 --- a/test/built-ins/Array/S15.4_A1.1_T6.js +++ b/test/built-ins/Array/S15.4_A1.1_T6.js @@ -9,13 +9,11 @@ es5id: 15.4_A1.1_T6 description: Checking for Boolean object ---*/ -//CHECK#1 var x = []; x[new Boolean(true)] = 1; assert.sameValue(x[1], undefined, 'The value of x[1] is expected to equal undefined'); assert.sameValue(x["true"], 1, 'The value of x["true"] is expected to be 1'); -//CHECK#3 x[new Boolean(false)] = 0; assert.sameValue(x[0], undefined, 'The value of x[0] is expected to equal undefined'); assert.sameValue(x["false"], 0, 'The value of x["false"] is expected to be 0'); diff --git a/test/built-ins/Array/S15.4_A1.1_T7.js b/test/built-ins/Array/S15.4_A1.1_T7.js index 011a5deeb9..3aed9d8876 100644 --- a/test/built-ins/Array/S15.4_A1.1_T7.js +++ b/test/built-ins/Array/S15.4_A1.1_T7.js @@ -9,17 +9,14 @@ es5id: 15.4_A1.1_T7 description: Checking for Number object ---*/ -//CHECK#1 var x = []; x[new Number(0)] = 0; assert.sameValue(x[0], 0, 'The value of x[0] is expected to be 0'); -//CHECK#2 var y = []; y[new Number(1)] = 1; assert.sameValue(y[1], 1, 'The value of y[1] is expected to be 1'); -//CHECK#3 var z = []; z[new Number(1.1)] = 1; assert.sameValue(z["1.1"], 1, 'The value of z["1.1"] is expected to be 1'); diff --git a/test/built-ins/Array/S15.4_A1.1_T8.js b/test/built-ins/Array/S15.4_A1.1_T8.js index 927ba0e72d..2d2efcf621 100644 --- a/test/built-ins/Array/S15.4_A1.1_T8.js +++ b/test/built-ins/Array/S15.4_A1.1_T8.js @@ -9,17 +9,14 @@ es5id: 15.4_A1.1_T8 description: Checking for Number object ---*/ -//CHECK#1 var x = []; x[new String("0")] = 0; assert.sameValue(x[0], 0, 'The value of x[0] is expected to be 0'); -//CHECK#2 var y = []; y[new String("1")] = 1; assert.sameValue(y[1], 1, 'The value of y[1] is expected to be 1'); -//CHECK#3 var z = []; z[new String("1.1")] = 1; assert.sameValue(z["1.1"], 1, 'The value of z["1.1"] is expected to be 1'); diff --git a/test/built-ins/Array/S15.4_A1.1_T9.js b/test/built-ins/Array/S15.4_A1.1_T9.js index ed65434240..ff641d762f 100644 --- a/test/built-ins/Array/S15.4_A1.1_T9.js +++ b/test/built-ins/Array/S15.4_A1.1_T9.js @@ -9,7 +9,6 @@ es5id: 15.4_A1.1_T9 description: If Type(value) is Object, evaluate ToPrimitive(value, String) ---*/ -//CHECK#1 var x = []; var object = { valueOf: function() { @@ -19,7 +18,6 @@ var object = { x[object] = 0; assert.sameValue(x["[object Object]"], 0, 'The value of x["[object Object]"] is expected to be 0'); -//CHECK#2 x = []; var object = { valueOf: function() { @@ -32,7 +30,6 @@ var object = { x[object] = 0; assert.sameValue(x[0], 0, 'The value of x[0] is expected to be 0'); -//CHECK#3 x = []; var object = { valueOf: function() { @@ -45,7 +42,6 @@ var object = { x[object] = 0; assert.sameValue(x[1], 0, 'The value of x[1] is expected to be 0'); -//CHECK#4 try { x = []; var object = { @@ -63,7 +59,6 @@ catch (e) { assert.notSameValue(e, "error", 'The value of e is not "error"'); } -//CHECK#5 x = []; var object = { toString: function() { @@ -73,7 +68,6 @@ var object = { x[object] = 0; assert.sameValue(x[1], 0, 'The value of x[1] is expected to be 0'); -//CHECK#6 x = []; var object = { valueOf: function() { @@ -86,7 +80,6 @@ var object = { x[object] = 0; assert.sameValue(x[1], 0, 'The value of x[1] is expected to be 0'); -//CHECK#7 try { x = []; var object = { @@ -104,7 +97,6 @@ catch (e) { assert.sameValue(e, "error", 'The value of e is expected to be "error"'); } -//CHECK#8 try { x = []; var object = { diff --git a/test/built-ins/Array/length/S15.4.2.2_A1.1_T1.js b/test/built-ins/Array/length/S15.4.2.2_A1.1_T1.js index dcb71efd62..815feefc66 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A1.1_T1.js +++ b/test/built-ins/Array/length/S15.4.2.2_A1.1_T1.js @@ -13,7 +13,6 @@ description: > this property ---*/ -//CHECK#1 Array.prototype.myproperty = 1; var x = new Array(0); assert.sameValue(x.myproperty, 1, 'The value of x.myproperty is expected to be 1'); diff --git a/test/built-ins/Array/length/S15.4.2.2_A1.1_T2.js b/test/built-ins/Array/length/S15.4.2.2_A1.1_T2.js index 67335367cd..aaa5bf01c2 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A1.1_T2.js +++ b/test/built-ins/Array/length/S15.4.2.2_A1.1_T2.js @@ -11,7 +11,6 @@ es5id: 15.4.2.2_A1.1_T2 description: Array.prototype.toString = Object.prototype.toString ---*/ -//CHECK#1 Array.prototype.toString = Object.prototype.toString; var x = new Array(0); assert.sameValue(x.toString(), "[object Array]", 'x.toString() must return "[object Array]"'); diff --git a/test/built-ins/Array/length/S15.4.2.2_A1.2_T1.js b/test/built-ins/Array/length/S15.4.2.2_A1.2_T1.js index e3e42f096f..e50d68215a 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A1.2_T1.js +++ b/test/built-ins/Array/length/S15.4.2.2_A1.2_T1.js @@ -8,6 +8,5 @@ es5id: 15.4.2.2_A1.2_T1 description: Checking use Object.prototype.toString ---*/ -//CHECK#1 var x = new Array(0); assert.sameValue(Object.prototype.toString.call(x), "[object Array]", 'Object.prototype.toString.call(new Array(0)) must return "[object Array]"'); diff --git a/test/built-ins/Array/length/S15.4.2.2_A2.1_T1.js b/test/built-ins/Array/length/S15.4.2.2_A2.1_T1.js index bb3d4b5dc6..aa64db5589 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A2.1_T1.js +++ b/test/built-ins/Array/length/S15.4.2.2_A2.1_T1.js @@ -10,14 +10,11 @@ es5id: 15.4.2.2_A2.1_T1 description: Array constructor is given one argument ---*/ -//CHECK#1 var x = new Array(0); assert.sameValue(x.length, 0, 'The value of x.length is expected to be 0'); -//CHECK#2 var x = new Array(1); assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); -//CHECK#3 var x = new Array(4294967295); assert.sameValue(x.length, 4294967295, 'The value of x.length is expected to be 4294967295'); diff --git a/test/built-ins/Array/length/S15.4.2.2_A2.2_T1.js b/test/built-ins/Array/length/S15.4.2.2_A2.2_T1.js index c2464d6b70..46a651ea7a 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A2.2_T1.js +++ b/test/built-ins/Array/length/S15.4.2.2_A2.2_T1.js @@ -10,7 +10,6 @@ es5id: 15.4.2.2_A2.2_T1 description: Use try statement. len = -1, 4294967296, 4294967297 ---*/ -//CHECK#1 try { new Array(-1); throw new Test262Error('#1.1: new Array(-1) throw RangeError. Actual: ' + (new Array(-1))); @@ -22,7 +21,6 @@ try { ); } -//CHECK#2 try { new Array(4294967296); throw new Test262Error('#2.1: new Array(4294967296) throw RangeError. Actual: ' + (new Array(4294967296))); @@ -34,7 +32,6 @@ try { ); } -//CHECK#3 try { new Array(4294967297); throw new Test262Error('#3.1: new Array(4294967297) throw RangeError. Actual: ' + (new Array(4294967297))); diff --git a/test/built-ins/Array/length/S15.4.2.2_A2.2_T2.js b/test/built-ins/Array/length/S15.4.2.2_A2.2_T2.js index f60205a1d5..7a3623d77f 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A2.2_T2.js +++ b/test/built-ins/Array/length/S15.4.2.2_A2.2_T2.js @@ -10,7 +10,6 @@ es5id: 15.4.2.2_A2.2_T2 description: Use try statement. len = NaN, +/-Infinity ---*/ -//CHECK#1 try { new Array(NaN); throw new Test262Error('#1.1: new Array(NaN) throw RangeError. Actual: ' + (new Array(NaN))); @@ -22,7 +21,6 @@ try { ); } -//CHECK#2 try { new Array(Number.POSITIVE_INFINITY); throw new Test262Error('#2.1: new Array(Number.POSITIVE_INFINITY) throw RangeError. Actual: ' + (new Array(Number.POSITIVE_INFINITY))); @@ -34,7 +32,6 @@ try { ); } -//CHECK#3 try { new Array(Number.NEGATIVE_INFINITY); throw new Test262Error('#3.1: new Array(Number.NEGATIVE_INFINITY) throw RangeError. Actual: ' + (new Array(Number.NEGATIVE_INFINITY))); diff --git a/test/built-ins/Array/length/S15.4.2.2_A2.2_T3.js b/test/built-ins/Array/length/S15.4.2.2_A2.2_T3.js index 3422a6e769..2b98cfda22 100644 --- a/test/built-ins/Array/length/S15.4.2.2_A2.2_T3.js +++ b/test/built-ins/Array/length/S15.4.2.2_A2.2_T3.js @@ -10,7 +10,6 @@ es5id: 15.4.2.2_A2.2_T3 description: Use try statement. len = 1.5, Number.MAX_VALUE, Number.MIN_VALUE ---*/ -//CHECK#1 try { new Array(1.5); throw new Test262Error('#1.1: new Array(1.5) throw RangeError. Actual: ' + (new Array(1.5))); @@ -22,7 +21,6 @@ try { ); } -//CHECK#2 try { new Array(Number.MAX_VALUE); throw new Test262Error('#2.1: new Array(Number.MAX_VALUE) throw RangeError. Actual: ' + (new Array(Number.MAX_VALUE))); @@ -34,7 +32,6 @@ try { ); } -//CHECK#3 try { new Array(Number.MIN_VALUE); throw new Test262Error('#3.1: new Array(Number.MIN_VALUE) throw RangeError. Actual: ' + (new Array(Number.MIN_VALUE))); diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.1_T1.js b/test/built-ins/Array/length/S15.4.5.1_A1.1_T1.js index 1e3ae76631..2fc6ca45d8 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.1_T1.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.1_T1.js @@ -8,7 +8,6 @@ es5id: 15.4.5.1_A1.1_T1 description: length in [4294967296, -1, 1.5] ---*/ -//CHECK#1 try { var x = []; x.length = 4294967296; @@ -21,7 +20,6 @@ try { ); } -//CHECK#2 try { x = []; x.length = -1; @@ -34,7 +32,6 @@ try { ); } -//CHECK#3 try { x = []; x.length = 1.5; diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.1_T2.js b/test/built-ins/Array/length/S15.4.5.1_A1.1_T2.js index 7d7e71c568..fd6e06e48a 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.1_T2.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.1_T2.js @@ -8,7 +8,6 @@ es5id: 15.4.5.1_A1.1_T2 description: length in [NaN, Infinity, -Infinity, undefined] ---*/ -//CHECK#1 try { var x = []; x.length = NaN; @@ -21,7 +20,6 @@ try { ); } -//CHECK#2 try { x = []; x.length = Number.POSITIVE_INFINITY; @@ -34,7 +32,6 @@ try { ); } -//CHECK#3 try { x = []; x.length = Number.NEGATIVE_INFINITY; @@ -47,7 +44,6 @@ try { ); } -//CHECK#4 try { x = []; x.length = undefined; diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.2_T1.js b/test/built-ins/Array/length/S15.4.5.1_A1.2_T1.js index 46c7f97378..2109b9edc4 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.2_T1.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.2_T1.js @@ -12,12 +12,10 @@ es5id: 15.4.5.1_A1.2_T1 description: Change length of array ---*/ -//CHECK#1 var x = [0, , 2, , 4]; x.length = 4; assert.sameValue(x[4], undefined, 'The value of x[4] is expected to equal undefined'); -//CHECK#2 x.length = 3; assert.sameValue(x[3], undefined, 'The value of x[3] is expected to equal undefined'); assert.sameValue(x[2], 2, 'The value of x[2] is expected to be 2'); diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.2_T3.js b/test/built-ins/Array/length/S15.4.5.1_A1.2_T3.js index e42006bc92..828f3967be 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.2_T3.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.2_T3.js @@ -12,12 +12,10 @@ es5id: 15.4.5.1_A1.2_T3 description: Checking an inherited property ---*/ -//CHECK#1 Array.prototype[2] = 2; var x = [0, 1]; x.length = 3; assert.sameValue(x.hasOwnProperty('2'), false, 'x.hasOwnProperty("2") must return false'); -//CHECK#2 x.length = 2; assert.sameValue(x[2], 2, 'The value of x[2] is expected to be 2'); diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.3_T1.js b/test/built-ins/Array/length/S15.4.5.1_A1.3_T1.js index b4dc799fe2..b5d3d2b2ac 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.3_T1.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.3_T1.js @@ -8,32 +8,26 @@ es5id: 15.4.5.1_A1.3_T1 description: length is object or primitve ---*/ -//CHECK#1 var x = []; x.length = true; assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); -//CHECK#2 x = [0]; x.length = null; assert.sameValue(x.length, 0, 'The value of x.length is expected to be 0'); -//CHECK#3 x = [0]; x.length = new Boolean(false); assert.sameValue(x.length, 0, 'The value of x.length is expected to be 0'); -//CHECK#4 x = []; x.length = new Number(1); assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); -//CHECK#5 x = []; x.length = "1"; assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); -//CHECK#6 x = []; x.length = new String("1"); assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); diff --git a/test/built-ins/Array/length/S15.4.5.1_A1.3_T2.js b/test/built-ins/Array/length/S15.4.5.1_A1.3_T2.js index 26261f2a19..478c3e1df1 100644 --- a/test/built-ins/Array/length/S15.4.5.1_A1.3_T2.js +++ b/test/built-ins/Array/length/S15.4.5.1_A1.3_T2.js @@ -8,7 +8,6 @@ es5id: 15.4.5.1_A1.3_T2 description: Uint32 use ToNumber and ToPrimitve ---*/ -//CHECK#1 var x = []; x.length = { valueOf: function() { @@ -17,7 +16,6 @@ x.length = { }; assert.sameValue(x.length, 2, 'The value of x.length is expected to be 2'); -//CHECK#2 x = []; x.length = { valueOf: function() { @@ -29,7 +27,6 @@ x.length = { }; assert.sameValue(x.length, 2, 'The value of x.length is expected to be 2'); -//CHECK#3 x = []; x.length = { valueOf: function() { @@ -41,7 +38,6 @@ x.length = { }; assert.sameValue(x.length, 2, 'The value of x.length is expected to be 2'); -//CHECK#4 try { x = []; x.length = { @@ -58,7 +54,6 @@ catch (e) { assert.notSameValue(e, "error", 'The value of e is not "error"'); } -//CHECK#5 x = []; x.length = { toString: function() { @@ -67,7 +62,6 @@ x.length = { }; assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); -//CHECK#6 x = []; x.length = { valueOf: function() { @@ -79,7 +73,6 @@ x.length = { } assert.sameValue(x.length, 1, 'The value of x.length is expected to be 1'); -//CHECK#7 try { x = []; x.length = { @@ -97,7 +90,6 @@ catch (e) { assert.sameValue(e, "error", 'The value of e is expected to be "error"'); } -//CHECK#8 try { x = []; x.length = { diff --git a/test/built-ins/Array/length/S15.4.5.2_A3_T4.js b/test/built-ins/Array/length/S15.4.5.2_A3_T4.js index e9f5b8c40c..392ece3d65 100644 --- a/test/built-ins/Array/length/S15.4.5.2_A3_T4.js +++ b/test/built-ins/Array/length/S15.4.5.2_A3_T4.js @@ -12,7 +12,6 @@ description: > is an array index ---*/ -//CHECK#1 var x = [0, 1, 2]; x[4294967294] = 4294967294; x.length = 2; diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T1.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T1.js index c1f617cace..ec97e6dbdb 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T1.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T1.js @@ -16,7 +16,6 @@ var y = new Array(0, 1); var z = new Array(2, 3, 4); var arr = x.concat(y, z); -//CHECK#0 arr.getClass = Object.prototype.toString; assert.sameValue(arr.getClass(), "[object Array]", 'arr.getClass() must return "[object Array]"'); assert.sameValue(arr[0], 0, 'The value of arr[0] is expected to be 0'); diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T2.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T2.js index 3a095865ef..0bbc1ef29b 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T2.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T2.js @@ -16,7 +16,6 @@ var y = new Object(); var z = new Array(1, 2); var arr = x.concat(y, z, -1, true, "NaN"); -//CHECK#0 arr.getClass = Object.prototype.toString; assert.sameValue(arr.getClass(), "[object Array]", 'arr.getClass() must return "[object Array]"'); assert.sameValue(arr[0], 0, 'The value of arr[0] is expected to be 0'); diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T3.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T3.js index 5331193a6c..839c94741b 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T3.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T3.js @@ -14,7 +14,6 @@ description: Checking this algorithm with no items var x = [0, 1]; var arr = x.concat(); -//CHECK#0 arr.getClass = Object.prototype.toString; assert.sameValue(arr.getClass(), "[object Array]", 'arr.getClass() must return "[object Array]"'); assert.sameValue(arr[0], 0, 'The value of arr[0] is expected to be 0'); diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T4.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T4.js index 082cc4a236..aa2a790702 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T4.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A1_T4.js @@ -14,7 +14,6 @@ description: Checking this algorithm, items are [], [,] var x = [, 1]; var arr = x.concat([], [, ]); -//CHECK#0 arr.getClass = Object.prototype.toString; assert.sameValue(arr.getClass(), "[object Array]", 'arr.getClass() must return "[object Array]"'); assert.sameValue(arr[0], undefined, 'The value of arr[0] is expected to equal undefined'); diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T1.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T1.js index aedd191070..23d297d80c 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T1.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T1.js @@ -16,7 +16,6 @@ var y = new Object(); var z = new Array(1, 2); var arr = x.concat(y, z, -1, true, "NaN"); -//CHECK#0 arr.getClass = Object.prototype.toString; assert.sameValue(arr.getClass(), "[object Array]", 'arr.getClass() must return "[object Array]"'); assert.sameValue(arr[0], x, 'The value of arr[0] is expected to equal the value of x'); diff --git a/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T2.js b/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T2.js index 3d172ac6ed..0692dce01c 100644 --- a/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T2.js +++ b/test/built-ins/Array/prototype/concat/S15.4.4.4_A2_T2.js @@ -14,7 +14,6 @@ var x = {}; x.concat = Array.prototype.concat; var arr = x.concat(); -//CHECK#0 arr.getClass = Object.prototype.toString; assert.sameValue(arr.getClass(), "[object Array]", 'arr.getClass() must return "[object Array]"'); assert.sameValue(arr[0], x, 'The value of arr[0] is expected to equal the value of x'); diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.1_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.1_T1.js index 8c570edd4b..2050654bdf 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.1_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.1_T1.js @@ -7,13 +7,11 @@ esid: sec-array.prototype.join description: Checking this use new Array() and [] ---*/ -//CHECK#1 var x = new Array(); if (x.join() !== "") { throw new Test262Error('#1: x = new Array(); x.join() === "". Actual: ' + (x.join())); } -//CHECK#2 x = []; x[0] = 1; x.length = 0; diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T1.js index 07482ee683..f7787c58d9 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T1.js @@ -7,13 +7,11 @@ esid: sec-array.prototype.join description: Checking this use new Array() and [] ---*/ -//CHECK#1 var x = new Array(0, 1, 2, 3); if (x.join() !== "0,1,2,3") { throw new Test262Error('#1: x = new Array(0,1,2,3); x.join() === "0,1,2,3". Actual: ' + (x.join())); } -//CHECK#2 x = []; x[0] = 0; x[3] = 3; @@ -21,7 +19,6 @@ if (x.join() !== "0,,,3") { throw new Test262Error('#2: x = []; x[0] = 0; x[3] = 3; x.join() === "0,,,3". Actual: ' + (x.join())); } -//CHECK#3 x = []; x[0] = 0; if (x.join() !== "0") { diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T2.js index 9f16fbd66b..cf690ff226 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.2_T2.js @@ -7,13 +7,11 @@ esid: sec-array.prototype.join description: Checking this use new Array() and [] ---*/ -//CHECK#1 var x = new Array(0, 1, 2, 3); if (x.join(undefined) !== "0,1,2,3") { throw new Test262Error('#1: x = new Array(0,1,2,3); x.join(undefined) === "0,1,2,3". Actual: ' + (x.join(undefined))); } -//CHECK#2 x = []; x[0] = 0; x[3] = 3; @@ -21,7 +19,6 @@ if (x.join(undefined) !== "0,,,3") { throw new Test262Error('#2: x = []; x[0] = 0; x[3] = 3; x.join(undefined) === "0,,,3". Actual: ' + (x.join(undefined))); } -//CHECK#3 x = []; x[0] = 0; if (x.join(undefined) !== "0") { diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.3_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.3_T1.js index bf72269807..99bd143f6f 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A1.3_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A1.3_T1.js @@ -7,21 +7,18 @@ esid: sec-array.prototype.join description: Checking this use new Array() and [] ---*/ -//CHECK#1 var x = []; x[0] = undefined; if (x.join() !== "") { throw new Test262Error('#1: x = []; x[0] = undefined; x.join() === "". Actual: ' + (x.join())); } -//CHECK#2 x = []; x[0] = null; if (x.join() !== "") { throw new Test262Error('#2: x = []; x[0] = null; x.join() === "". Actual: ' + (x.join())); } -//CHECK#3 x = Array(undefined, 1, null, 3); if (x.join() !== ",1,,3") { throw new Test262Error('#3: x = Array(undefined,1,null,3); x.join() === ",1,,3". Actual: ' + (x.join())); diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T1.js index 1d548fb382..191c665eb7 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T1.js @@ -15,34 +15,28 @@ obj.join = Array.prototype.join; if (obj.length !== undefined) { throw new Test262Error('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 if (obj.join() !== "") { throw new Test262Error('#1: var obj = {}; obj.join = Array.prototype.join; obj.join() === "". Actual: ' + (obj.join())); } - //CHECK#2 if (obj.length !== undefined) { throw new Test262Error('#2: var obj = {}; obj.join = Array.prototype.join; obj.join(); obj.length === undefined. Actual: ' + (obj.length)); } } -//CHECK#3 obj.length = undefined; if (obj.join() !== "") { throw new Test262Error('#3: var obj = {}; obj.length = undefined; obj.join = Array.prototype.join; obj.join() === ". Actual: ' + (obj.join())); } -//CHECK#4 if (obj.length !== undefined) { throw new Test262Error('#4: var obj = {}; obj.length = undefined; obj.join = Array.prototype.join; obj.join(); obj.length === undefined. Actual: ' + (obj.length)); } -//CHECK#5 obj.length = null if (obj.join() !== "") { throw new Test262Error('#5: var obj = {}; obj.length = null; obj.join = Array.prototype.join; obj.join() === "". Actual: ' + (obj.join())); } -//CHECK#6 if (obj.length !== null) { throw new Test262Error('#6: var obj = {}; obj.length = null; obj.join = Array.prototype.join; obj.join(); obj.length === null. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T2.js index 540b99bbc6..74be97b758 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T2.js @@ -12,33 +12,27 @@ description: If ToUint32(length) is zero, return the empty string var obj = {}; obj.join = Array.prototype.join; -//CHECK#1 obj.length = NaN; if (obj.join() !== "") { throw new Test262Error('#1: var obj = {}; obj.length = NaN; obj.join = Array.prototype.join; obj.join() === "". Actual: ' + (obj.join())); } -//CHECK#2 assert.sameValue(obj.length, NaN, "obj.length is NaN"); -//CHECK#5 obj.length = Number.NEGATIVE_INFINITY; if (obj.join() !== "") { throw new Test262Error('#5: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.join = Array.prototype.join; obj.join() === "". Actual: ' + (obj.join())); } -//CHECK#6 if (obj.length !== Number.NEGATIVE_INFINITY) { throw new Test262Error('#6: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.join = Array.prototype.join; obj.join(); obj.length === Number.NEGATIVE_INFINITY. Actual: ' + (obj.length)); } -//CHECK#7 obj.length = -0; if (obj.join() !== "") { throw new Test262Error('#7: var obj = {}; obj.length = -0; obj.join = Array.prototype.join; obj.join() === "". Actual: ' + (obj.join())); } -//CHECK#8 if (obj.length !== -0) { throw new Test262Error('#8: var obj = {}; obj.length = -0; obj.join = Array.prototype.join; obj.join(); obj.length === 0. Actual: ' + (obj.length)); } else { @@ -47,25 +41,21 @@ if (obj.length !== -0) { } } -//CHECK#9 obj.length = 0.5; if (obj.join() !== "") { throw new Test262Error('#9: var obj = {}; obj.length = 0.5; obj.join = Array.prototype.join; obj.join() === "". Actual: ' + (obj.join())); } -//CHECK#10 if (obj.length !== 0.5) { throw new Test262Error('#10: var obj = {}; obj.length = 0.5; obj.join = Array.prototype.join; obj.join(); obj.length === 0.5. Actual: ' + (obj.length)); } -//CHECK#11 var x = new Number(0); obj.length = x; if (obj.join() !== "") { throw new Test262Error('#11: var x = new Number(0); var obj = {}; obj.length = x; obj.join = Array.prototype.join; obj.join() === "". Actual: ' + (obj.join())); } -//CHECK#12 if (obj.length !== x) { throw new Test262Error('#12: var x = new Number(0); var obj = {}; obj.length = x; obj.join = Array.prototype.join; obj.join(); obj.length === x. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T3.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T3.js index f7d5925cec..368c08c6ac 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T3.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T3.js @@ -12,13 +12,11 @@ description: If ToUint32(length) is zero, return the empty string var obj = {}; obj.join = Array.prototype.join; -//CHECK#1 obj.length = 4.5; if (obj.join() !== ",,,") { throw new Test262Error('#1: var obj = {}; obj.length = 4.5; obj.join = Array.prototype.join; obj.join() === ",,,". Actual: ' + (obj.join())); } -//CHECK#2 obj[0] = undefined; obj[1] = 1; obj[2] = null; @@ -26,7 +24,6 @@ if (obj.join() !== ",1,,") { throw new Test262Error('#1: var obj = {}; obj.length = 4.5; obj[0] = undefined; obj[1] = 1; obj[2] = null; obj.join = Array.prototype.join; obj.join() === ",1,,". Actual: ' + (obj.join())); } -//CHECK#3 if (obj.length !== 4.5) { throw new Test262Error('#1: var obj = {}; obj.length = 4.5; obj[0] = undefined; obj[1] = 1; obj[2] = null; obj.join = Array.prototype.join; obj.join(); obj.length === 4.5. Actual: ' + (obj.length)); } @@ -34,14 +31,12 @@ if (obj.length !== 4.5) { var obj = {}; obj.join = Array.prototype.join; -//CHECK#4 var x = new Number(4.5); obj.length = x; if (obj.join() !== ",,,") { throw new Test262Error('#4: var obj = {}; var x = new Number(4.5); obj.length = x; obj.join = Array.prototype.join; obj.join() === ",,,". Actual: ' + (obj.join())); } -//CHECK#5 obj[0] = undefined; obj[1] = 1; obj[2] = null; @@ -49,7 +44,6 @@ if (obj.join() !== ",1,,") { throw new Test262Error('#5: var obj = {}; var x = new Number(4.5); obj.length = x; obj[0] = undefined; obj[1] = 1; obj[2] = null; obj.join = Array.prototype.join; obj.join() === ",1,,". Actual: ' + (obj.join())); } -//CHECK#6 if (obj.length !== x) { throw new Test262Error('#6: var obj = {}; var x = new Number(4.5); obj.length = x; obj[0] = undefined; obj[1] = 1; obj[2] = null; obj.join = Array.prototype.join; obj.join(); obj.length === x. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js index 72ab76e111..3c1fa2d431 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js @@ -14,7 +14,6 @@ description: > var obj = {}; obj.join = Array.prototype.join; -//CHECK#1 obj.length = { valueOf: function() { return 3 @@ -24,7 +23,6 @@ if (obj.join() !== ",,") { throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}} obj.join() === ",,". Actual: ' + (obj.join())); } -//CHECK#2 obj.length = { valueOf: function() { return 3 @@ -37,7 +35,6 @@ if (obj.join() !== ",,") { throw new Test262Error('#2: obj.length = {valueOf: function() {return 3}, toString: function() {return 2}} obj.join() === ",,". Actual: ' + (obj.join())); } -//CHECK#3 obj.length = { valueOf: function() { return 3 @@ -50,7 +47,6 @@ if (obj.join() !== ",,") { throw new Test262Error('#3: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.join() === ",,". Actual: ' + (obj.join())); } -//CHECK#4 try { obj.length = { valueOf: function() { @@ -72,7 +68,6 @@ catch (e) { } } -//CHECK#5 obj.length = { toString: function() { return 2 @@ -82,7 +77,6 @@ if (obj.join() !== ",") { throw new Test262Error('#5: obj.length = {toString: function() {return 2}} obj.join() === ",". Actual: ' + (obj.join())); } -//CHECK#6 obj.length = { valueOf: function() { return {} @@ -95,7 +89,6 @@ if (obj.join() !== ",") { throw new Test262Error('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 2}} obj.join() === ",". Actual: ' + (obj.join())); } -//CHECK#7 try { obj.length = { valueOf: function() { @@ -114,7 +107,6 @@ catch (e) { } } -//CHECK#8 try { obj.length = { valueOf: function() { diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T1.js index e627533eb7..7fa413374b 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T1.js @@ -9,44 +9,36 @@ description: > undefind, NaN] ---*/ -//CHECK#0 var x = new Array(0, 1, 2, 3); if (x.join("") !== "0123") { throw new Test262Error('#0: x = new Array(0,1,2,3); x.join("") === "0123". Actual: ' + (x.join(""))); } -//CHECK#1 x = new Array(0, 1, 2, 3); if (x.join("\\") !== "0\\1\\2\\3") { throw new Test262Error('#1: x = new Array(0,1,2,3); x.join("\\") === "0\\1\\2\\3". Actual: ' + (x.join("\\"))); } -//CHECK#2 if (x.join("&") !== "0&1&2&3") { throw new Test262Error('#2: x = new Array(0,1,2,3); x.join("&") === "0&1&2&3". Actual: ' + (x.join("&"))); } -//CHECK#3 if (x.join(true) !== "0true1true2true3") { throw new Test262Error('#3: x = new Array(0,1,2,3); x.join(true) === "0true1true2true3". Actual: ' + (x.join(true))); } -//CHECK#4 if (x.join(Infinity) !== "0Infinity1Infinity2Infinity3") { throw new Test262Error('#4: x = new Array(0,1,2,3); x.join(Infinity) === "0Infinity1Infinity2Infinity3". Actual: ' + (x.join(Infinity))); } -//CHECK#5 if (x.join(null) !== "0null1null2null3") { throw new Test262Error('#3: 5 = new Array(0,1,2,3); x.join(null) === "0null1null2null3". Actual: ' + (x.join(null))); } -//CHECK#6 if (x.join(undefined) !== "0,1,2,3") { throw new Test262Error('#6: x = new Array(0,1,2,3); x.join(undefined) === "0,1,2,3". Actual: ' + (x.join(undefined))); } -//CHECK#7 if (x.join(NaN) !== "0NaN1NaN2NaN3") { throw new Test262Error('#7: x = new Array(0,1,2,3); x.join(NaN) === "0NaN1NaN2NaN3". Actual: ' + (x.join(NaN))); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js index 116bdeddd9..c7ee77ad80 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js @@ -10,7 +10,6 @@ description: > ---*/ var x = new Array(0, 1, 2, 3); -//CHECK#1 var object = { valueOf: function() { return "+" @@ -20,7 +19,6 @@ if (x.join(object) !== "0[object Object]1[object Object]2[object Object]3") { throw new Test262Error('#1: var object = {valueOf: function() {return "+"}}; x.join(object) === "0[object Object]1[object Object]2[object Object]3". Actual: ' + (x.join(object))); } -//CHECK#2 var object = { valueOf: function() { return "+" @@ -33,7 +31,6 @@ if (x.join(object) !== "0*1*2*3") { throw new Test262Error('#2: var object = {valueOf: function() {return "+"}, toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); } -//CHECK#3 var object = { valueOf: function() { return "+" @@ -46,7 +43,6 @@ if (x.join(object) !== "0+1+2+3") { throw new Test262Error('#3: var object = {valueOf: function() {return "+"}, toString: function() {return {}}}; x.join(object) === "0+1+2+3". Actual: ' + (x.join(object))); } -//CHECK#4 try { var object = { valueOf: function() { @@ -68,7 +64,6 @@ catch (e) { } } -//CHECK#5 var object = { toString: function() { return "*" @@ -78,7 +73,6 @@ if (x.join(object) !== "0*1*2*3") { throw new Test262Error('#5: var object = {toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); } -//CHECK#6 var object = { valueOf: function() { return {} @@ -91,7 +85,6 @@ if (x.join(object) !== "0*1*2*3") { throw new Test262Error('#6: var object = {valueOf: function() {return {}}, toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); } -//CHECK#7 try { var object = { valueOf: function() { @@ -110,7 +103,6 @@ catch (e) { } } -//CHECK#8 try { var object = { valueOf: function() { @@ -129,7 +121,6 @@ catch (e) { } } -//CHECK#9 try { var object = { toString: function() { diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T1.js index f8875c5156..70336e7fbd 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T1.js @@ -9,49 +9,41 @@ description: > Infinity, null, undefind, NaN] ---*/ -//CHECK#0 var x = new Array("", "", ""); if (x.join("") !== "") { throw new Test262Error('#0: var x = new Array("","",""); x.join("") === "". Actual: ' + (x.join(""))); } -//CHECK#1 var x = new Array("\\", "\\", "\\"); if (x.join("\\") !== "\\\\\\\\\\") { throw new Test262Error('#1: var x = new Array("\\","\\","\\"); x.join("\\") === "\\\\\\\\\\". Actual: ' + (x.join("\\"))); } -//CHECK#2 var x = new Array("&", "&", "&"); if (x.join("&") !== "&&&&&") { throw new Test262Error('#2: var x = new Array("&", "&", "&"); x.join("&") === "&&&&&". Actual: ' + (x.join("&"))); } -//CHECK#3 var x = new Array(true, true, true); if (x.join() !== "true,true,true") { throw new Test262Error('#3: var x = new Array(true,true,true); x.join(true,true,true) === "true,true,true". Actual: ' + (x.join(true, true, true))); } -//CHECK#4 var x = new Array(null, null, null); if (x.join() !== ",,") { throw new Test262Error('#4: var x = new Array(null,null,null); x.join(null,null,null) === ",,". Actual: ' + (x.join(null, null, null))); } -//CHECK#5 var x = new Array(undefined, undefined, undefined); if (x.join() !== ",,") { throw new Test262Error('#5: var x = new Array(undefined,undefined,undefined); x.join(undefined,undefined,undefined) === ",,". Actual: ' + (x.join(undefined, undefined, undefined))); } -//CHECK#6 var x = new Array(Infinity, Infinity, Infinity); if (x.join() !== "Infinity,Infinity,Infinity") { throw new Test262Error('#6: var x = new Array(Infinity,Infinity,Infinity); x.join(Infinity,Infinity,Infinity) === "Infinity,Infinity,Infinity". Actual: ' + (x.join(Infinity, Infinity, Infinity))); } -//CHECK#7 var x = new Array(NaN, NaN, NaN); if (x.join() !== "NaN,NaN,NaN") { throw new Test262Error('#7: var x = new Array(NaN,NaN,NaN); x.join(NaN,NaN,NaN) === "NaN,NaN,NaN". Actual: ' + (x.join(NaN, NaN, NaN))); diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js index 6a077e902b..2ea887456b 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js @@ -7,7 +7,6 @@ esid: sec-array.prototype.join description: If Type(argument) is Object, evaluate ToPrimitive(argument, String) ---*/ -//CHECK#1 var object = { valueOf: function() { return "+" @@ -18,7 +17,6 @@ if (x.join() !== "[object Object]") { throw new Test262Error('#1: var object = {valueOf: function() {return "+"}} var x = new Array(object); x.join() === "[object Object]". Actual: ' + (x.join())); } -//CHECK#2 var object = { valueOf: function() { return "+" @@ -32,7 +30,6 @@ if (x.join() !== "*") { throw new Test262Error('#2: var object = {valueOf: function() {return "+"}, toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); } -//CHECK#3 var object = { valueOf: function() { return "+" @@ -46,7 +43,6 @@ if (x.join() !== "+") { throw new Test262Error('#3: var object = {valueOf: function() {return "+"}, toString: function() {return {}}} var x = new Array(object); x.join() === "+". Actual: ' + (x.join())); } -//CHECK#4 try { var object = { valueOf: function() { @@ -69,7 +65,6 @@ catch (e) { } } -//CHECK#5 var object = { toString: function() { return "*" @@ -80,7 +75,6 @@ if (x.join() !== "*") { throw new Test262Error('#5: var object = {toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); } -//CHECK#6 var object = { valueOf: function() { return {} @@ -94,7 +88,6 @@ if (x.join() !== "*") { throw new Test262Error('#6: var object = {valueOf: function() {return {}}, toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); } -//CHECK#7 try { var object = { valueOf: function() { @@ -114,7 +107,6 @@ catch (e) { } } -//CHECK#8 try { var object = { valueOf: function() { diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A4_T3.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A4_T3.js index b02dd3e060..034522e86e 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A4_T3.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A4_T3.js @@ -14,12 +14,10 @@ obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; -//CHECK#1 if (obj.join("") !== "") { throw new Test262Error('#1: var obj = {}; obj.join = Array.prototype.join; obj[0] = "x"; obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; obj.join("") === "". Actual: ' + (obj.join(""))); } -//CHECK#2 if (obj.length !== -4294967294) { throw new Test262Error('#2: var obj = {}; obj.join = Array.prototype.join; obj[0] = "x"; obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; obj.join(""); obj.length === -4294967294. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A5_T1.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A5_T1.js index dcca2ba18c..c4369b3246 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A5_T1.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A5_T1.js @@ -9,7 +9,6 @@ description: > of Array.prototype is Object.prototype ---*/ -//CHECK#1 Array.prototype[1] = 1; var x = [0]; x.length = 2; @@ -17,7 +16,6 @@ if (x.join() !== "0,1") { throw new Test262Error('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.join() === "0,1". Actual: ' + (x.join())); } -//CHECK#2 Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.join = Array.prototype.join; diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.6.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.6.js index e80fa2f7c1..9970727e01 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.6.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.6.js @@ -7,7 +7,6 @@ esid: sec-array.prototype.join description: Checking Array.prototype.join.prototype ---*/ -//CHECK#1 if (Array.prototype.join.prototype !== undefined) { throw new Test262Error('#1: Array.prototype.join.prototype === undefined. Actual: ' + (Array.prototype.join.prototype)); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.7.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.7.js index cc2f94e2dd..8559cbec7b 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.7.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.7.js @@ -9,7 +9,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.join(); diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.1_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.1_T1.js index 957639a279..9f5d014add 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.1_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.1_T1.js @@ -9,19 +9,16 @@ esid: sec-array.prototype.pop description: Checking this algorithm ---*/ -//CHECK#1 var x = new Array(); var pop = x.pop(); if (pop !== undefined) { throw new Test262Error('#1: var x = new Array(); x.pop() === undefined. Actual: ' + (pop)); } -//CHECK#2 if (x.length !== 0) { throw new Test262Error('#2: var x = new Array(); x.pop(); x.length === 0. Actual: ' + (x.length)); } -//CHECK#3 var x = Array(1, 2, 3); x.length = 0; var pop = x.pop(); @@ -29,7 +26,6 @@ if (pop !== undefined) { throw new Test262Error('#2: var x = Array(1,2,3); x.length = 0; x.pop() === undefined. Actual: ' + (pop)); } -//CHECK#4 if (x.length !== 0) { throw new Test262Error('#4: var x = new Array(1,2,3); x.length = 0; x.pop(); x.length === 0. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.2_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.2_T1.js index 7a53789e4f..99e7258a99 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.2_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A1.2_T1.js @@ -9,29 +9,24 @@ esid: sec-array.prototype.pop description: Checking this use new Array() and [] ---*/ -//CHECK#1 var x = new Array(0, 1, 2, 3); var pop = x.pop(); if (pop !== 3) { throw new Test262Error('#1: x = new Array(0,1,2,3); x.pop() === 3. Actual: ' + (pop)); } -//CHECK#2 if (x.length !== 3) { throw new Test262Error('#2: x = new Array(0,1,2,3); x.pop(); x.length == 3'); } -//CHECK#3 if (x[3] !== undefined) { throw new Test262Error('#3: x = new Array(0,1,2,3); x.pop(); x[3] == undefined'); } -//CHECK#4 if (x[2] !== 2) { throw new Test262Error('#4: x = new Array(0,1,2,3); x.pop(); x[2] == 2'); } -//CHECK#5 x = []; x[0] = 0; x[3] = 3; @@ -40,29 +35,24 @@ if (pop !== 3) { throw new Test262Error('#5: x = []; x[0] = 0; x[3] = 3; x.pop() === 3. Actual: ' + (pop)); } -//CHECK#6 if (x.length !== 3) { throw new Test262Error('#6: x = []; x[0] = 0; x[3] = 3; x.pop(); x.length == 3'); } -//CHECK#7 if (x[3] !== undefined) { throw new Test262Error('#7: x = []; x[0] = 0; x[3] = 3; x.pop(); x[3] == undefined'); } -//CHECK#8 if (x[2] !== undefined) { throw new Test262Error('#8: x = []; x[0] = 0; x[3] = 3; x.pop(); x[2] == undefined'); } -//CHECK#9 x.length = 1; var pop = x.pop(); if (pop !== 0) { throw new Test262Error('#9: x = []; x[0] = 0; x[3] = 3; x.pop(); x.length = 1; x.pop() === 0. Actual: ' + (pop)); } -//CHECK#10 if (x.length !== 0) { throw new Test262Error('#10: x = []; x[0] = 0; x[3] = 3; x.pop(); x.length = 1; x.pop(); x.length === 0. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T1.js index b7b49cd7fb..d336010d4c 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T1.js @@ -17,37 +17,31 @@ obj.pop = Array.prototype.pop; if (obj.length !== undefined) { throw new Test262Error('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#1: var obj = {}; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } - //CHECK#2 if (obj.length !== 0) { throw new Test262Error('#2: var obj = {}; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } } -//CHECK#3 obj.length = undefined; var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#3: var obj = {}; obj.length = undefined; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#4 if (obj.length !== 0) { throw new Test262Error('#4: var obj = {}; obj.length = undefined; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#5 obj.length = null var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#5: var obj = {}; obj.length = null; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#6 if (obj.length !== 0) { throw new Test262Error('#6: var obj = {}; obj.length = null; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T2.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T2.js index ce4008c23e..32db120401 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T2.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T2.js @@ -14,50 +14,42 @@ description: > var obj = {}; obj.pop = Array.prototype.pop; -//CHECK#1 obj.length = NaN; var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#1: var obj = {}; obj.length = NaN; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#2 if (obj.length !== 0) { throw new Test262Error('#2: var obj = {}; obj.length = NaN; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#3 obj.length = Number.POSITIVE_INFINITY; var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#3: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#4 if (obj.length !== 9007199254740990) { throw new Test262Error('#4: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 9007199254740990. Actual: ' + (obj.length)); } -//CHECK#5 obj.length = Number.NEGATIVE_INFINITY; var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#5: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#6 if (obj.length !== 0) { throw new Test262Error('#6: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#7 obj.length = -0; var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#7: var obj = {}; obj.length = -0; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#8 if (obj.length !== 0) { throw new Test262Error('#8: var obj = {}; obj.length = -0; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } else { @@ -66,26 +58,22 @@ if (obj.length !== 0) { } } -//CHECK#9 obj.length = 0.5; var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#9: var obj = {}; obj.length = 0.5; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#10 if (obj.length !== 0) { throw new Test262Error('#10: var obj = {}; obj.length = 0.5; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#11 obj.length = new Number(0); var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#11: var obj = {}; obj.length = new Number(0); obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#12 if (obj.length !== 0) { throw new Test262Error('#12: var obj = {}; obj.length = new Number(0); obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T3.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T3.js index 244056166d..8c20f5aa4c 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T3.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T3.js @@ -14,26 +14,22 @@ description: > var obj = {}; obj.pop = Array.prototype.pop; -//CHECK#1 obj.length = 2.5; var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#1: var obj = {}; obj.length = 2.5; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#2 if (obj.length !== 1) { throw new Test262Error('#2: var obj = {}; obj.length = 2.5; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#3 obj.length = new Number(2); var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#11: var obj = {}; obj.length = new Number(2); obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#3 if (obj.length !== 1) { throw new Test262Error('#12: var obj = {}; obj.length = new Number(2); obj.pop = Array.prototype.pop; obj.pop(); obj.length === 1. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js index fe9c60ab58..82b7c4dbd7 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js @@ -14,7 +14,6 @@ description: > var obj = {}; obj.pop = Array.prototype.pop; -//CHECK#1 obj[0] = -1; obj.length = { valueOf: function() { @@ -26,7 +25,6 @@ if (pop !== -1) { throw new Test262Error('#1: obj[0] = -1; obj.length = {valueOf: function() {return 1}} obj.pop() === -1. Actual: ' + (pop)); } -//CHECK#2 obj[0] = -1; obj.length = { valueOf: function() { @@ -41,7 +39,6 @@ if (pop !== -1) { throw new Test262Error('#0: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return 0}} obj.pop() === -1. Actual: ' + (pop)); } -//CHECK#3 obj[0] = -1; obj.length = { valueOf: function() { @@ -56,7 +53,6 @@ if (pop !== -1) { throw new Test262Error('#3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return {}}} obj.pop() === -1. Actual: ' + (pop)); } -//CHECK#4 try { obj[0] = -1; obj.length = { @@ -80,7 +76,6 @@ catch (e) { } } -//CHECK#5 obj[0] = -1; obj.length = { toString: function() { @@ -92,7 +87,6 @@ if (pop !== undefined) { throw new Test262Error('#5: obj[0] = -1; obj.length = {toString: function() {return 0}} obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#6 obj[0] = -1; obj.length = { valueOf: function() { @@ -107,7 +101,6 @@ if (pop !== undefined) { throw new Test262Error('#6: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#7 try { obj[0] = -1; obj.length = { @@ -127,7 +120,6 @@ catch (e) { } } -//CHECK#8 try { obj[0] = -1; obj.length = { diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T1.js index 625352c277..95b1bc90dc 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T1.js @@ -13,23 +13,19 @@ obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; -//CHECK#1 var pop = obj.pop(); if (pop !== "y") { throw new Test262Error('#1: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.pop() === "y". Actual: ' + (pop)); } -//CHECK#2 if (obj.length !== 4294967295) { throw new Test262Error('#2: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.pop(); obj.length === 4294967295. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== "x") { throw new Test262Error('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.pop(); obj[0] === "x". Actual: ' + (obj[0])); } -//CHECK#4 if (obj[4294967295] !== undefined) { throw new Test262Error('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; obj.pop(); obj[4294967295] === undefined. Actual: ' + (obj[4294967295])); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T2.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T2.js index b22cbc5787..bc61d7ad8c 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T2.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T2.js @@ -13,23 +13,19 @@ obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; -//CHECK#1 var pop = obj.pop(); if (pop !== "y") { throw new Test262Error('#1: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; obj.pop() === "y". Actual: ' + (pop)); } -//CHECK#2 if (obj.length !== 4294967296) { throw new Test262Error('#2: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; obj.pop(); obj.length === 4294967296. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== "x") { throw new Test262Error('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; obj.pop(); obj[0] === "x". Actual: ' + (obj[0])); } -//CHECK#4 if (obj[4294967296] !== undefined) { throw new Test262Error('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; obj.pop(); obj[4294967296] === undefined. Actual: ' + (obj[4294967296])); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js index 04152cf764..31055dcd86 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A3_T3.js @@ -12,18 +12,15 @@ obj.pop = Array.prototype.pop; obj[4294967294] = "x"; obj.length = -1; -//CHECK#1 var pop = obj.pop(); if (pop !== undefined) { throw new Test262Error('#1: var obj = {}; obj.pop = Array.prototype.pop; obj[4294967294] = "x"; obj.length = -1; obj.pop() === undefined. Actual: ' + (pop)); } -//CHECK#2 if (obj.length !== 0) { throw new Test262Error('#2: var obj = {}; obj.pop = Array.prototype.pop; obj[4294967294] = "x"; obj.length = -1; obj.pop(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[4294967294] !== "x") { throw new Test262Error('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[4294967294] = "x"; obj.length = -1; obj.pop(); obj[4294967294] === "x". Actual: ' + (obj[4294967294])); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js index 1093523873..f9ac9f08b7 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T1.js @@ -13,13 +13,11 @@ Array.prototype[1] = 1; var x = [0]; x.length = 2; -//CHECK#1 var pop = x.pop(); if (pop !== 1) { throw new Test262Error('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.pop() === 1. Actual: ' + (pop)); } -//CHECK#2 if (x[1] !== 1) { throw new Test262Error('#2: Array.prototype[1] = 1; x = [0]; x.length = 2; x.pop(); x[1] === 1. Actual: ' + (x[1])); } @@ -31,23 +29,19 @@ x = { 0: 0 }; -//CHECK#3 var pop = x.pop(); if (pop !== 1) { throw new Test262Error('#3: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0}; x.pop() === 1. Actual: ' + (pop)); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0}; x.pop(); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0}; x.pop(); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 delete x.length; if (x.length !== 2) { throw new Test262Error('#7: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0}; x.pop(); delete x; x.length === 2. Actual: ' + (x.length)); diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T2.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T2.js index 7b67047db5..a68e7629f4 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T2.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A4_T2.js @@ -13,13 +13,11 @@ Array.prototype[1] = -1; var x = [0, 1]; x.length = 2; -//CHECK#1 var pop = x.pop(); if (pop !== 1) { throw new Test262Error('#1: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.pop() === 1. Actual: ' + (pop)); } -//CHECK#2 if (x[1] !== -1) { throw new Test262Error('#2: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.pop(); x[1] === -1. Actual: ' + (x[1])); } @@ -32,23 +30,19 @@ x = { 1: 1 }; -//CHECK#3 var pop = x.pop(); if (pop !== 1) { throw new Test262Error('#3: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0,1:1}; x.pop() === 1. Actual: ' + (pop)); } -//CHECK#4 if (x[1] !== -1) { throw new Test262Error('#4: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0,1:1}; x.pop(); x[1] === -1. Actual: ' + (x[1])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0,1:1}; x.pop(); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 delete x.length; if (x.length !== 2) { throw new Test262Error('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0,1:1}; x.pop(); delete x; x.length === 2. Actual: ' + (x.length)); diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.7.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.7.js index 87e1761b4d..cd7b3967bc 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.7.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.7.js @@ -9,7 +9,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.pop(); diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A1_T1.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A1_T1.js index c0fd71a407..23859a7917 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A1_T1.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A1_T1.js @@ -10,41 +10,34 @@ esid: sec-array.prototype.push description: Checking case when push is given no arguments or one argument ---*/ -//CHECK#1 var x = new Array(); var push = x.push(1); if (push !== 1) { throw new Test262Error('#1: x = new Array(); x.push(1) === 1. Actual: ' + (push)); } -//CHECK#2 if (x[0] !== 1) { throw new Test262Error('#2: x = new Array(); x.push(1); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#3 var push = x.push(); if (push !== 1) { throw new Test262Error('#3: x = new Array(); x.push(1); x.push() === 1. Actual: ' + (push)); } -//CHECK#4 if (x[1] !== undefined) { throw new Test262Error('#4: x = new Array(); x.push(1); x.push(); x[1] === unedfined. Actual: ' + (x[1])); } -//CHECK#5 var push = x.push(-1); if (push !== 2) { throw new Test262Error('#5: x = new Array(); x.push(1); x.push(); x.push(-1) === 2. Actual: ' + (push)); } -//CHECK#6 if (x[1] !== -1) { throw new Test262Error('#6: x = new Array(); x.push(1); x.push(-1); x[1] === -1. Actual: ' + (x[1])); } -//CHECK#7 if (x.length !== 2) { throw new Test262Error('#7: x = new Array(); x.push(1); x.push(); x.push(-1); x.length === 2. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A1_T2.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A1_T2.js index abd0e4b541..bd8122576f 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A1_T2.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A1_T2.js @@ -10,50 +10,41 @@ esid: sec-array.prototype.push description: Checking case when push is given many arguments ---*/ -//CHECK#1 var x = []; if (x.length !== 0) { throw new Test262Error('#1: x = []; x.length === 0. Actual: ' + (x.length)); } -//CHECK#2 x[0] = 0; var push = x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); if (push !== 6) { throw new Test262Error('#2: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1) === 6. Actual: ' + (push)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== true) { throw new Test262Error('#4: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[1] === true. Actual: ' + (x[1])); } -//CHECK#5 if (x[2] !== Number.POSITIVE_INFINITY) { throw new Test262Error('#5: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[2] === Number.POSITIVE_INFINITY. Actual: ' + (x[2])); } -//CHECK#6 if (x[3] !== "NaN") { throw new Test262Error('#6: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[3] === "NaN". Actual: ' + (x[3])); } -//CHECK#7 if (x[4] !== "1") { throw new Test262Error('#7: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[4] === "1". Actual: ' + (x[4])); } -//CHECK#8 if (x[5] !== -1) { throw new Test262Error('#8: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[5] === -1. Actual: ' + (x[5])); } -//CHECK#9 if (x.length !== 6) { throw new Test262Error('#9: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x.length === 6. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T1.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T1.js index fa3b8a5a4e..6bccd0a7fd 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T1.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T1.js @@ -18,51 +18,42 @@ obj.push = Array.prototype.push; if (obj.length !== undefined) { throw new Test262Error('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 var push = obj.push(-1); if (push !== 1) { throw new Test262Error('#1: var obj = {}; obj.push = Array.prototype.push; obj.push(-1) === 1. Actual: ' + (push)); } - //CHECK#2 if (obj.length !== 1) { throw new Test262Error('#2: var obj = {}; obj.push = Array.prototype.push; obj.push(-1); obj.length === 1. Actual: ' + (obj.length)); } - //CHECK#3 if (obj["0"] !== -1) { throw new Test262Error('#3: var obj = {}; obj.push = Array.prototype.push; obj.push(-1); obj["0"] === -1. Actual: ' + (obj["0"])); } } -//CHECK#4 obj.length = undefined; var push = obj.push(-4); if (push !== 1) { throw new Test262Error('#4: var obj = {}; obj.length = undefined; obj.push = Array.prototype.push; obj.push(-4) === 1. Actual: ' + (push)); } -//CHECK#5 if (obj.length !== 1) { throw new Test262Error('#5: var obj = {}; obj.length = undefined; obj.push = Array.prototype.push; obj.push(-4); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#6 if (obj["0"] !== -4) { throw new Test262Error('#6: var obj = {}; obj.length = undefined; obj.push = Array.prototype.push; obj.push(-4); obj["0"] === -4. Actual: ' + (obj["0"])); } -//CHECK#7 obj.length = null var push = obj.push(-7); if (push !== 1) { throw new Test262Error('#7: var obj = {}; obj.length = null; obj.push = Array.prototype.push; obj.push(-7) === 1. Actual: ' + (push)); } -//CHECK#8 if (obj.length !== 1) { throw new Test262Error('#8: var obj = {}; obj.length = null; obj.push = Array.prototype.push; obj.push(-7); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#9 if (obj["0"] !== -7) { throw new Test262Error('#9: var obj = {}; obj.length = null; obj.push = Array.prototype.push; obj.push(-7); obj["0"] === -7. Actual: ' + (obj["0"])); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T2.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T2.js index 9ab76c8759..cafa15063a 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T2.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T2.js @@ -15,103 +15,85 @@ description: > var obj = {}; obj.push = Array.prototype.push; -//CHECK#1 obj.length = NaN; var push = obj.push(-1); if (push !== 1) { throw new Test262Error('#1: var obj = {}; obj.length = NaN; obj.push = Array.prototype.push; obj.push(-1) === 1. Actual: ' + (push)); } -//CHECK#2 if (obj.length !== 1) { throw new Test262Error('#2: var obj = {}; obj.length = NaN; obj.push = Array.prototype.push; obj.push(-1); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#3 if (obj["0"] !== -1) { throw new Test262Error('#3: var obj = {}; obj.length = NaN; obj.push = Array.prototype.push; obj.push(-1); obj["0"] === -1. Actual: ' + (obj["0"])); } -//CHECK#4 obj.length = Number.POSITIVE_INFINITY; assert.throws(TypeError, function() { obj.push(-4); }); -//CHECK#5 if (obj.length !== Number.POSITIVE_INFINITY) { throw new Test262Error('#6: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-4); obj.length === Number.POSITIVE_INFINITY. Actual: ' + (obj.length)); } -//CHECK#6 if (obj[9007199254740991] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-4); obj[9007199254740991] === undefined. Actual: ' + (obj["9007199254740991"])); } -//CHECK#7 obj.length = Number.NEGATIVE_INFINITY; var push = obj.push(-7); if (push !== 1) { throw new Test262Error('#7: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-7) === 1. Actual: ' + (push)); } -//CHECK#8 if (obj.length !== 1) { throw new Test262Error('#8: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-7); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#9 if (obj["0"] !== -7) { throw new Test262Error('#9: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-7); obj["0"] === -7. Actual: ' + (obj["0"])); } -//CHECK#10 obj.length = 0.5; var push = obj.push(-10); if (push !== 1) { throw new Test262Error('#10: var obj = {}; obj.length = 0.5; obj.push = Array.prototype.push; obj.push(-10) === 1. Actual: ' + (push)); } -//CHECK#11 if (obj.length !== 1) { throw new Test262Error('#11: var obj = {}; obj.length = 0.5; obj.push = Array.prototype.push; obj.push(-10); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#12 if (obj["0"] !== -10) { throw new Test262Error('#12: var obj = {}; obj.length = 0.5; obj.push = Array.prototype.push; obj.push(-10); obj["0"] === -10. Actual: ' + (obj["0"])); } -//CHECK#13 obj.length = 1.5; var push = obj.push(-13); if (push !== 2) { throw new Test262Error('#13: var obj = {}; obj.length = 1.5; obj.push = Array.prototype.push; obj.push(-13) === 2. Actual: ' + (push)); } -//CHECK#14 if (obj.length !== 2) { throw new Test262Error('#14: var obj = {}; obj.length = 1.5; obj.push = Array.prototype.push; obj.push(-13); obj.length === 2. Actual: ' + (obj.length)); } -//CHECK#15 if (obj["1"] !== -13) { throw new Test262Error('#15: var obj = {}; obj.length = 1.5; obj.push = Array.prototype.push; obj.push(-13); obj["1"] === -13. Actual: ' + (obj["1"])); } -//CHECK#16 obj.length = new Number(0); var push = obj.push(-16); if (push !== 1) { throw new Test262Error('#16: var obj = {}; obj.length = new Number(0); obj.push = Array.prototype.push; obj.push(-16) === 1. Actual: ' + (push)); } -//CHECK#17 if (obj.length !== 1) { throw new Test262Error('#17: var obj = {}; obj.length = new Number(0); obj.push = Array.prototype.push; obj.push(-16); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#18 if (obj["0"] !== -16) { throw new Test262Error('#18: var obj = {}; obj.length = new Number(0); obj.push = Array.prototype.push; obj.push(-16); obj["0"] === -16. Actual: ' + (obj["0"])); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js index 6e46aece1c..8e87c8bf67 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js @@ -14,7 +14,6 @@ description: > var obj = {}; obj.push = Array.prototype.push; -//CHECK#1 obj.length = { valueOf: function() { return 3 @@ -25,7 +24,6 @@ if (push !== 3) { throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}} obj.push() === 3. Actual: ' + (push)); } -//CHECK#2 obj.length = { valueOf: function() { return 3 @@ -39,7 +37,6 @@ if (push !== 3) { throw new Test262Error('#0: obj.length = {valueOf: function() {return 3}, toString: function() {return 1}} obj.push() === 3. Actual: ' + (push)); } -//CHECK#3 obj.length = { valueOf: function() { return 3 @@ -53,7 +50,6 @@ if (push !== 3) { throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.push() === 3. Actual: ' + (push)); } -//CHECK#4 try { obj.length = { @@ -77,7 +73,6 @@ catch (e) { } } -//CHECK#5 obj.length = { toString: function() { return 1 @@ -88,7 +83,6 @@ if (push !== 1) { throw new Test262Error('#5: obj.length = {toString: function() {return 1}} obj.push() === 1. Actual: ' + (push)); } -//CHECK#6 obj.length = { valueOf: function() { return {} @@ -102,7 +96,6 @@ if (push !== 1) { throw new Test262Error('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} obj.push() === 1. Actual: ' + (push)); } -//CHECK#7 try { obj.length = { @@ -122,7 +115,6 @@ catch (e) { } } -//CHECK#8 try { obj.length = { diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js index b11594dc8c..1d8f4f29a6 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js @@ -10,13 +10,11 @@ description: If ToUint32(length) !== length, throw RangeError var x = []; x.length = 4294967295; -//CHECK#1 var push = x.push(); if (push !== 4294967295) { throw new Test262Error('#1: x = []; x.length = 4294967295; x.push() === 4294967295. Actual: ' + (push)); } -//CHECK#2 try { x.push("x"); throw new Test262Error('#2.1: x = []; x.length = 4294967295; x.push("x") throw RangeError. Actual: ' + (push)); @@ -26,12 +24,10 @@ try { } } -//CHECK#3 if (x[4294967295] !== "x") { throw new Test262Error('#3: x = []; x.length = 4294967295; try {x.push("x")}catch(e){}; x[4294967295] === "x". Actual: ' + (x[4294967295])); } -//CHECK#4 if (x.length !== 4294967295) { throw new Test262Error('#4: x = []; x.length = 4294967295; try {x.push("x")}catch(e){}; x.length === 4294967295. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T1.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T1.js index 0804df589d..871d43cab9 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T1.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T1.js @@ -11,43 +11,35 @@ var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; -//CHECK#1 var push = obj.push("x", "y", "z"); if (push !== 4294967299) { throw new Test262Error('#1: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z") === 4294967299. Actual: ' + (push)); } -//CHECK#2 if (obj.length !== 4294967299) { throw new Test262Error('#2: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj.length === 4294967299. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== undefined) { throw new Test262Error('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[0] === undefined. Actual: ' + (obj[0])); } -//CHECK#4 if (obj[1] !== undefined) { throw new Test262Error('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[1] === undefined. Actual: ' + (obj[1])); } -//CHECK#5 if (obj[2] !== undefined) { throw new Test262Error('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[2] === undefined. Actual: ' + (obj[2])); } -//CHECK#6 if (obj[4294967296] !== "x") { throw new Test262Error('#6: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[4294967296] === "x". Actual: ' + (obj[4294967296])); } -//CHECK#7 if (obj[4294967297] !== "y") { throw new Test262Error('#7: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[4294967297] === "y". Actual: ' + (obj[4294967297])); } -//CHECK#8 if (obj[4294967298] !== "z") { throw new Test262Error('#8: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push("x", "y", "z"); obj[4294967298] === "z". Actual: ' + (obj[4294967298])); } @@ -56,13 +48,11 @@ var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; -//CHECK#9 var push = obj.push(); if (push !== 4294967296) { throw new Test262Error('#9: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push() === 4294967296. Actual: ' + (push)); } -//CHECK#10 if (obj.length !== 4294967296) { throw new Test262Error('#10: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push(); obj.length === 4294967296. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T2.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T2.js index e61f2d70ff..afcad58fcd 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T2.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T2.js @@ -11,28 +11,23 @@ var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; -//CHECK#1 var push = obj.push("x", "y", "z"); if (push !== 4294967298) { throw new Test262Error('#1: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z") === 4294967298. Actual: ' + (push)); } -//CHECK#2 if (obj.length !== 4294967298) { throw new Test262Error('#2: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj.length === 4294967298. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[4294967295] !== "x") { throw new Test262Error('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967295] === "x". Actual: ' + (obj[4294967295])); } -//CHECK#4 if (obj[4294967296] !== "y") { throw new Test262Error('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967296] === "y". Actual: ' + (obj[4294967296])); } -//CHECK#5 if (obj[4294967297] !== "z") { throw new Test262Error('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push("x", "y", "z"); obj[4294967297] === "z". Actual: ' + (obj[4294967297])); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js index d4f4c021a5..975be378b1 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A4_T3.js @@ -11,43 +11,35 @@ var obj = {}; obj.push = Array.prototype.push; obj.length = -1; -//CHECK#1 var push = obj.push("x", "y", "z"); if (push !== 3) { throw new Test262Error('#1: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z") === 3. Actual: ' + (push)); } -//CHECK#2 if (obj.length !== 3) { throw new Test262Error('#2: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj.length === 3. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[4294967295] !== undefined) { throw new Test262Error('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967295] === undefined. Actual: ' + (obj[4294967295])); } -//CHECK#4 if (obj[4294967296] !== undefined) { throw new Test262Error('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967296] === undefined. Actual: ' + (obj[4294967296])); } -//CHECK#5 if (obj[4294967297] !== undefined) { throw new Test262Error('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[4294967297] === undefined. Actual: ' + (obj[4294967297])); } -//CHECK#6 if (obj[0] !== "x") { throw new Test262Error('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[0] === "x". Actual: ' + (obj[0])); } -//CHECK#7 if (obj[1] !== "y") { throw new Test262Error('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[1] === "y". Actual: ' + (obj[1])); } -//CHECK#8 if (obj[2] !== "z") { throw new Test262Error('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push("x", "y", "z"); obj[2] === "z". Actual: ' + (obj[2])); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js index e85ef00af0..acfbc56550 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A5_T1.js @@ -16,29 +16,24 @@ var x = { 0: 0 }; -//CHECK#1 var push = x.push(1); if (push !== 2) { throw new Test262Error('#1: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; x.push(1) === 2. Actual: ' + (push)); } -//CHECK#2 if (x.length !== 2) { throw new Test262Error('#2: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; x.push(1); x.length === 2. Actual: ' + (x.length)); } -//CHECK#3 if (x[1] !== 1) { throw new Test262Error('#3: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; x.push(1); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#4 delete x[1]; if (x[1] !== -1) { throw new Test262Error('#4: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; x.push(1); delete x[1]; x[1] === -1. Actual: ' + (x[1])); } -//CHECK#5 delete x.length; if (x.length !== 1) { throw new Test262Error('#5: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; delete x; x.push(1); x.length === 1. Actual: ' + (x.length)); diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A6.7.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A6.7.js index 76bfa2b95a..4bb5f526fd 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A6.7.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A6.7.js @@ -9,7 +9,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.push(); diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T1.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T1.js index f8a866f870..453430b6ff 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T1.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T1.js @@ -9,14 +9,12 @@ esid: sec-array.prototype.reverse description: Checking case when reverse is given no arguments or one argument ---*/ -//CHECK#1 var x = []; var reverse = x.reverse(); if (reverse !== x) { throw new Test262Error('#1: x = []; x.reverse() === x. Actual: ' + (reverse)); } -//CHECK#2 x = []; x[0] = 1; var reverse = x.reverse(); @@ -24,24 +22,20 @@ if (reverse !== x) { throw new Test262Error('#2: x = []; x[0] = 1; x.reverse() === x. Actual: ' + (reverse)); } -//CHECK#3 x = new Array(1, 2); var reverse = x.reverse(); if (reverse !== x) { throw new Test262Error('#3: x = new Array(1,2); x.reverse() === x. Actual: ' + (reverse)); } -//CHECK#4 if (x[0] !== 2) { throw new Test262Error('#4: x = new Array(1,2); x.reverse(); x[0] === 2. Actual: ' + (x[0])); } -//CHECK#5 if (x[1] !== 1) { throw new Test262Error('#5: x = new Array(1,2); x.reverse(); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#6 if (x.length !== 2) { throw new Test262Error('#6: x = new Array(1,2); x.reverse(); x.length === 2. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T2.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T2.js index caacef2806..d31621c340 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T2.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A1_T2.js @@ -9,7 +9,6 @@ esid: sec-array.prototype.reverse description: Checking this algorithm, elements are objects and primitives ---*/ -//CHECK#1 var x = []; x[0] = true; x[2] = Infinity; @@ -23,52 +22,42 @@ if (reverse !== x) { throw new Test262Error('#1: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse() === x. Actual: ' + (reverse)); } -//CHECK#2 if (x[0] !== "-1") { throw new Test262Error('#2: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[0] === "-1". Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== "NaN") { throw new Test262Error('#3: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[1] === "NaN". Actual: ' + (x[1])); } -//CHECK#4 if (x[2] !== undefined) { throw new Test262Error('#4: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[2] === undefined. Actual: ' + (x[2])); } -//CHECK#5 if (x[3] !== undefined) { throw new Test262Error('#5: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[3] === undefined. Actual: ' + (x[3])); } -//CHECK#6 if (x[4] !== undefined) { throw new Test262Error('#6: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[4] === undefined. Actual: ' + (x[4])); } -//CHECK#7 if (x[5] !== undefined) { throw new Test262Error('#7: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[5] === undefined. Actual: ' + (x[5])); } -//CHECK#8 if (x[6] !== undefined) { throw new Test262Error('#8: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[6] === undefined. Actual: ' + (x[6])); } -//CHECK#9 if (x[7] !== Infinity) { throw new Test262Error('#9: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[7] === Infinity. Actual: ' + (x[7])); } -//CHECK#10 if (x[8] !== undefined) { throw new Test262Error('#10: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[8] === undefined. Actual: ' + (x[8])); } -//CHECK#11 if (x[9] !== true) { throw new Test262Error('#11: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x[9] === true. Actual: ' + (x[9])); } @@ -80,47 +69,38 @@ if (reverse !== x) { throw new Test262Error('#1: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse() === x. Actual: ' + (reverse)); } -//CHECK#12 if (x[0] !== undefined) { throw new Test262Error('#12: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[0] === undefined. Actual: ' + (x[0])); } -//CHECK#13 if (x[1] !== Infinity) { throw new Test262Error('#13: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[1] === Infinity. Actual: ' + (x[1])); } -//CHECK#14 if (x[2] !== undefined) { throw new Test262Error('#14: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[2] === undefined. Actual: ' + (x[2])); } -//CHECK#15 if (x[3] !== undefined) { throw new Test262Error('#15: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[3] === undefined. Actual: ' + (x[3])); } -//CHECK#16 if (x[4] !== undefined) { throw new Test262Error('#16: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[4] === undefined. Actual: ' + (x[4])); } -//CHECK#17 if (x[5] !== undefined) { throw new Test262Error('#17: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[5] === undefined. Actual: ' + (x[5])); } -//CHECK#18 if (x[6] !== undefined) { throw new Test262Error('#18: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[6] === undefined. Actual: ' + (x[6])); } -//CHECK#19 if (x[7] !== "NaN") { throw new Test262Error('#19: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[7] === "NaN". Actual: ' + (x[7])); } -//CHECK#20 if (x[8] !== "-1") { throw new Test262Error('#20: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = "NaN"; x[9] = "-1"; x.reverse(); x.length = 9; x.reverse(); x[8] === "-1". Actual: ' + (x[8])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T1.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T1.js index 0931f70166..cb4ead491e 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T1.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T1.js @@ -11,7 +11,6 @@ description: > primitives, length is integer ---*/ -//CHECK#1 var obj = {}; obj.length = 10; obj.reverse = Array.prototype.reverse; @@ -28,52 +27,42 @@ if (reverse !== obj) { throw new Test262Error('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse() === obj. Actual: ' + (reverse)); } -//CHECK#2 if (obj[0] !== "-1") { throw new Test262Error('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[0] === "-1". Actual: ' + (obj[0])); } -//CHECK#3 if (obj[1] !== "NaN") { throw new Test262Error('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[1] === "NaN". Actual: ' + (obj[1])); } -//CHECK#4 if (obj[2] !== undefined) { throw new Test262Error('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } -//CHECK#5 if (obj[3] !== undefined) { throw new Test262Error('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } -//CHECK#6 if (obj[4] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } -//CHECK#7 if (obj[5] !== undefined) { throw new Test262Error('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } -//CHECK#8 if (obj[6] !== undefined) { throw new Test262Error('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } -//CHECK#9 if (obj[7] !== Infinity) { throw new Test262Error('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7])); } -//CHECK#10 if (obj[8] !== undefined) { throw new Test262Error('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8])); } -//CHECK#11 if (obj[9] !== true) { throw new Test262Error('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9])); } @@ -85,47 +74,38 @@ if (reverse !== obj) { throw new Test262Error('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse() === obj. Actual: ' + (reverse)); } -//CHECK#12 if (obj[0] !== undefined) { throw new Test262Error('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0])); } -//CHECK#13 if (obj[1] !== Infinity) { throw new Test262Error('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1])); } -//CHECK#14 if (obj[2] !== undefined) { throw new Test262Error('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } -//CHECK#15 if (obj[3] !== undefined) { throw new Test262Error('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } -//CHECK#16 if (obj[4] !== undefined) { throw new Test262Error('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } -//CHECK#17 if (obj[5] !== undefined) { throw new Test262Error('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } -//CHECK#18 if (obj[6] !== undefined) { throw new Test262Error('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } -//CHECK#19 if (obj[7] !== "NaN") { throw new Test262Error('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[7] === "NaN". Actual: ' + (obj[7])); } -//CHECK#20 if (obj[8] !== "-1") { throw new Test262Error('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = 9; obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T2.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T2.js index 54672ccf2f..bfef04b5d9 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T2.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T2.js @@ -11,7 +11,6 @@ description: > primitives, length is not integer ---*/ -//CHECK#1 var obj = {}; obj.length = 10.5; obj.reverse = Array.prototype.reverse; @@ -28,52 +27,42 @@ if (reverse !== obj) { throw new Test262Error('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse() === obj. Actual: ' + (reverse)); } -//CHECK#2 if (obj[0] !== "-1") { throw new Test262Error('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[0] === "-1". Actual: ' + (obj[0])); } -//CHECK#3 if (obj[1] !== "NaN") { throw new Test262Error('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[1] === "NaN". Actual: ' + (obj[1])); } -//CHECK#4 if (obj[2] !== undefined) { throw new Test262Error('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } -//CHECK#5 if (obj[3] !== undefined) { throw new Test262Error('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } -//CHECK#6 if (obj[4] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } -//CHECK#7 if (obj[5] !== undefined) { throw new Test262Error('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } -//CHECK#8 if (obj[6] !== undefined) { throw new Test262Error('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } -//CHECK#9 if (obj[7] !== Infinity) { throw new Test262Error('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7])); } -//CHECK#10 if (obj[8] !== undefined) { throw new Test262Error('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8])); } -//CHECK#11 if (obj[9] !== true) { throw new Test262Error('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9])); } @@ -85,47 +74,38 @@ if (reverse !== obj) { throw new Test262Error('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse() === obj. Actual: ' + (reverse)); } -//CHECK#12 if (obj[0] !== undefined) { throw new Test262Error('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0])); } -//CHECK#13 if (obj[1] !== Infinity) { throw new Test262Error('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1])); } -//CHECK#14 if (obj[2] !== undefined) { throw new Test262Error('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } -//CHECK#15 if (obj[3] !== undefined) { throw new Test262Error('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } -//CHECK#16 if (obj[4] !== undefined) { throw new Test262Error('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } -//CHECK#17 if (obj[5] !== undefined) { throw new Test262Error('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } -//CHECK#18 if (obj[6] !== undefined) { throw new Test262Error('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } -//CHECK#19 if (obj[7] !== "NaN") { throw new Test262Error('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[7] === "NaN". Actual: ' + (obj[7])); } -//CHECK#20 if (obj[8] !== "-1") { throw new Test262Error('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T3.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T3.js index 6e49b6b5ad..e11646ba24 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T3.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A2_T3.js @@ -11,7 +11,6 @@ description: > primitives, length is string ---*/ -//CHECK#1 var obj = {}; obj.length = "10"; obj.reverse = Array.prototype.reverse; @@ -28,52 +27,42 @@ if (reverse !== obj) { throw new Test262Error('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse() === obj. Actual: ' + (reverse)); } -//CHECK#2 if (obj[0] !== "-1") { throw new Test262Error('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[0] === "-1". Actual: ' + (obj[0])); } -//CHECK#3 if (obj[1] !== "NaN") { throw new Test262Error('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[1] === "NaN". Actual: ' + (obj[1])); } -//CHECK#4 if (obj[2] !== undefined) { throw new Test262Error('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } -//CHECK#5 if (obj[3] !== undefined) { throw new Test262Error('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } -//CHECK#6 if (obj[4] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } -//CHECK#7 if (obj[5] !== undefined) { throw new Test262Error('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } -//CHECK#8 if (obj[6] !== undefined) { throw new Test262Error('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } -//CHECK#9 if (obj[7] !== Infinity) { throw new Test262Error('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7])); } -//CHECK#10 if (obj[8] !== undefined) { throw new Test262Error('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8])); } -//CHECK#11 if (obj[9] !== true) { throw new Test262Error('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9])); } @@ -85,47 +74,38 @@ if (reverse !== obj) { throw new Test262Error('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse() === obj. Actual: ' + (reverse)); } -//CHECK#12 if (obj[0] !== undefined) { throw new Test262Error('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0])); } -//CHECK#13 if (obj[1] !== Infinity) { throw new Test262Error('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1])); } -//CHECK#14 if (obj[2] !== undefined) { throw new Test262Error('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2])); } -//CHECK#15 if (obj[3] !== undefined) { throw new Test262Error('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3])); } -//CHECK#16 if (obj[4] !== undefined) { throw new Test262Error('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4])); } -//CHECK#17 if (obj[5] !== undefined) { throw new Test262Error('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5])); } -//CHECK#18 if (obj[6] !== undefined) { throw new Test262Error('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6])); } -//CHECK#19 if (obj[7] !== "NaN") { throw new Test262Error('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[7] === "NaN". Actual: ' + (obj[7])); } -//CHECK#20 if (obj[8] !== "-1") { throw new Test262Error('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = "10"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = "NaN"; obj[9] = "-1"; obj.reverse(); obj.length = new String("9"); obj.reverse(); obj[8] === "-1". Actual: ' + (obj[8])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A3_T3.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A3_T3.js index 15eab8b133..3e7d69e92d 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A3_T3.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A3_T3.js @@ -14,28 +14,23 @@ obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; -//CHECK#1 var reverse = obj.reverse(); if (reverse !== obj) { throw new Test262Error('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = "x"; obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; obj.reverse() === obj. Actual: ' + (reverse)); } -//CHECK#2 if (obj.length !== -4294967294) { throw new Test262Error('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = "x"; obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; obj.reverse(); obj.length === -4294967294. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== "x") { throw new Test262Error('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = "x"; obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; obj.reverse(); obj[0] === "x". Actual: ' + (obj[0])); } -//CHECK#4 if (obj[1] !== "y") { throw new Test262Error('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = "x"; obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; obj.reverse(); obj[1] === "y". Actual: ' + (obj[1])); } -//CHECK#5 if (obj[2] !== "z") { throw new Test262Error('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = "x"; obj[1] = "y"; obj[2] = "z"; obj.length = -4294967294; obj.reverse(); obj[2] === "z". Actual: ' + (obj[2])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js index 79bfe490fb..2b7b2de565 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T1.js @@ -14,24 +14,20 @@ var x = [0]; x.length = 2; x.reverse(); -//CHECK#1 if (x[0] !== 1) { throw new Test262Error('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.reverse(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#2 if (x[1] !== 0) { throw new Test262Error('#2: Array.prototype[1] = 1; x = [0]; x.length = 2; x.reverse(); x[1] === 0. Actual: ' + (x[1])); } x.length = 0; -//CHECK#3 if (x[0] !== undefined) { throw new Test262Error('#3: Array.prototype[1] = 1; x = [0]; x.length = 2; x.reverse(); x.length = 0; x[0] === undefined. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: Array.prototype[1] = 1; x = [0]; x.length = 2; x.reverse(); x.length = 0; x[1] === 1. Actual: ' + (x[1])); } @@ -44,12 +40,10 @@ x = { }; x.reverse(); -//CHECK#5 if (x[0] !== 1) { throw new Test262Error('#5: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0}; x.reverse(); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== 0) { throw new Test262Error('#6: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0}; x.reverse(); x[1] === 0. Actual: ' + (x[1])); } @@ -57,12 +51,10 @@ if (x[1] !== 0) { delete x[0]; delete x[1]; -//CHECK#7 if (x[0] !== undefined) { throw new Test262Error('#7: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0}; x.reverse(); delete x[0]; delete x[1]; x[0] === undefined. Actual: ' + (x[0])); } -//CHECK#8 if (x[1] !== 1) { throw new Test262Error('#8: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0}; x.reverse(); delete x[0]; delete x[1]; x[1] === 1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T2.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T2.js index f4fcd15e31..98a990b9dc 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T2.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A4_T2.js @@ -14,24 +14,20 @@ var x = [0, 1]; x.length = 2; x.reverse(); -//CHECK#1 if (x[0] !== 1) { throw new Test262Error('#1: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.reverse(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#2 if (x[1] !== 0) { throw new Test262Error('#2: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.reverse(); x[1] === 0. Actual: ' + (x[1])); } x.length = 0; -//CHECK#3 if (x[0] !== undefined) { throw new Test262Error('#3: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.reverse(); x.length = 0; x[0] === undefined. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== -1) { throw new Test262Error('#4: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.reverse(); x.length = 0; x[1] === -1. Actual: ' + (x[1])); } @@ -45,12 +41,10 @@ x = { }; x.reverse(); -//CHECK#5 if (x[0] !== 1) { throw new Test262Error('#5: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0,1:1}; x.reverse(); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== 0) { throw new Test262Error('#6: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0,1:1}; x.reverse(); x[1] === 0. Actual: ' + (x[1])); } @@ -58,12 +52,10 @@ if (x[1] !== 0) { delete x[0]; delete x[1]; -//CHECK#7 if (x[0] !== undefined) { throw new Test262Error('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0,1:1}; x.reverse(); delete x[0]; delete x[1]; x[0] === undefined. Actual: ' + (x[0])); } -//CHECK#8 if (x[1] !== -1) { throw new Test262Error('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0,1:1}; x.reverse(); delete x[0]; delete x[1]; x[1] === -1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.7.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.7.js index e54afb285c..d1ac302439 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.7.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.7.js @@ -9,7 +9,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.reverse(); diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.1_T1.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.1_T1.js index 89088feea6..5449a9b600 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.1_T1.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.1_T1.js @@ -9,19 +9,16 @@ esid: sec-array.prototype.shift description: Checking this algorithm ---*/ -//CHECK#1 var x = new Array(); var shift = x.shift(); if (shift !== undefined) { throw new Test262Error('#1: var x = new Array(); x.shift() === undefined. Actual: ' + (shift)); } -//CHECK#2 if (x.length !== 0) { throw new Test262Error('#2: var x = new Array(); x.shift(); x.length === 0. Actual: ' + (x.length)); } -//CHECK#3 var x = Array(1, 2, 3); x.length = 0; var shift = x.shift(); @@ -29,7 +26,6 @@ if (shift !== undefined) { throw new Test262Error('#2: var x = Array(1,2,3); x.length = 0; x.shift() === undefined. Actual: ' + (shift)); } -//CHECK#4 if (x.length !== 0) { throw new Test262Error('#4: var x = new Array(1,2,3); x.length = 0; x.shift(); x.length === 0. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.2_T1.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.2_T1.js index 037e969ef0..07b84da680 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.2_T1.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A1.2_T1.js @@ -9,29 +9,24 @@ esid: sec-array.prototype.shift description: Checking this use new Array() and [] ---*/ -//CHECK#1 var x = new Array(0, 1, 2, 3); var shift = x.shift(); if (shift !== 0) { throw new Test262Error('#1: x = new Array(0,1,2,3); x.shift() === 0. Actual: ' + (shift)); } -//CHECK#2 if (x.length !== 3) { throw new Test262Error('#2: x = new Array(0,1,2,3); x.shift(); x.length == 3'); } -//CHECK#3 if (x[0] !== 1) { throw new Test262Error('#3: x = new Array(0,1,2,3); x.shift(); x[0] == 1'); } -//CHECK#4 if (x[1] !== 2) { throw new Test262Error('#4: x = new Array(0,1,2,3); x.shift(); x[1] == 2'); } -//CHECK#5 x = []; x[0] = 0; x[3] = 3; @@ -40,29 +35,24 @@ if (shift !== 0) { throw new Test262Error('#5: x = []; x[0] = 0; x[3] = 3; x.shift() === 0. Actual: ' + (shift)); } -//CHECK#6 if (x.length !== 3) { throw new Test262Error('#6: x = []; x[0] = 0; x[3] = 3; x.shift(); x.length == 3'); } -//CHECK#7 if (x[0] !== undefined) { throw new Test262Error('#7: x = []; x[0] = 0; x[3] = 3; x.shift(); x[0] == undefined'); } -//CHECK#8 if (x[12] !== undefined) { throw new Test262Error('#8: x = []; x[0] = 0; x[3] = 3; x.shift(); x[1] == undefined'); } -//CHECK#9 x.length = 1; var shift = x.shift(); if (shift !== undefined) { throw new Test262Error('#9: x = []; x[0] = 0; x[3] = 3; x.shift(); x.length = 1; x.shift() === undefined. Actual: ' + (shift)); } -//CHECK#10 if (x.length !== 0) { throw new Test262Error('#10: x = []; x[0] = 0; x[3] = 3; x.shift(); x.length = 1; x.shift(); x.length === 0. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T1.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T1.js index c088064946..6f5434bc7d 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T1.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T1.js @@ -17,37 +17,31 @@ obj.shift = Array.prototype.shift; if (obj.length !== undefined) { throw new Test262Error('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#1: var obj = {}; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } - //CHECK#2 if (obj.length !== 0) { throw new Test262Error('#2: var obj = {}; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } } -//CHECK#3 obj.length = undefined; var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#3: var obj = {}; obj.length = undefined; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#4 if (obj.length !== 0) { throw new Test262Error('#4: var obj = {}; obj.length = undefined; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#5 obj.length = null var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#5: var obj = {}; obj.length = null; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#6 if (obj.length !== 0) { throw new Test262Error('#6: var obj = {}; obj.length = null; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T2.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T2.js index 2c6ece48c3..9f7fc836a0 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T2.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T2.js @@ -14,38 +14,32 @@ description: > var obj = {}; obj.shift = Array.prototype.shift; -//CHECK#1 obj.length = NaN; var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#1: var obj = {}; obj.length = NaN; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#2 if (obj.length !== 0) { throw new Test262Error('#2: var obj = {}; obj.length = NaN; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#5 obj.length = Number.NEGATIVE_INFINITY; var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#5: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#6 if (obj.length !== 0) { throw new Test262Error('#6: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#7 obj.length = -0; var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#7: var obj = {}; obj.length = -0; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#8 if (obj.length !== 0) { throw new Test262Error('#8: var obj = {}; obj.length = -0; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } else { @@ -54,26 +48,22 @@ if (obj.length !== 0) { } } -//CHECK#9 obj.length = 0.5; var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#9: var obj = {}; obj.length = 0.5; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#10 if (obj.length !== 0) { throw new Test262Error('#10: var obj = {}; obj.length = 0.5; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#11 obj.length = new Number(0); var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#11: var obj = {}; obj.length = new Number(0); obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#12 if (obj.length !== 0) { throw new Test262Error('#12: var obj = {}; obj.length = new Number(0); obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T3.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T3.js index a71164a223..6b10a0a06c 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T3.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T3.js @@ -14,26 +14,22 @@ description: > var obj = {}; obj.shift = Array.prototype.shift; -//CHECK#1 obj.length = 2.5; var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#1: var obj = {}; obj.length = 2.5; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#2 if (obj.length !== 1) { throw new Test262Error('#2: var obj = {}; obj.length = 2.5; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#3 obj.length = new Number(2); var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#11: var obj = {}; obj.length = new Number(2); obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#3 if (obj.length !== 1) { throw new Test262Error('#12: var obj = {}; obj.length = new Number(2); obj.shift = Array.prototype.shift; obj.shift(); obj.length === 1. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T4.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T4.js index 74cdfc979b..4259cc099c 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T4.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T4.js @@ -16,37 +16,31 @@ obj["0"] = 0; obj["3"] = 3; obj.shift = Array.prototype.shift; -//CHECK#1 obj.length = 4; var shift = obj.shift(); if (shift !== 0) { throw new Test262Error('#1: var obj = {}; obj["0"] = 0; obj["3"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift() === 0. Actual: ' + (shift)); } -//CHECK#2 if (obj.length !== 3) { throw new Test262Error('#2: var obj = {}; obj["0"] = 0; obj["3"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 3. Actual: ' + (obj.length)); } -//CHECK#3 var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#3: var obj = {}; obj["0"] = 0; obj["3"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#4 if (obj.length !== 2) { throw new Test262Error('#4: var obj = {}; obj["0"] = 0; obj["3"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.shift(); obj.length === 2. Actual: ' + (obj.length)); } -//CHECK#5 obj.length = 1; var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#5: var obj = {}; obj["0"] = 0; obj["3"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.shift(); obj.length = 1; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#6 if (obj.length !== 0) { throw new Test262Error('#6: var obj = {}; obj["0"] = 0; obj["3"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.shift(); obj.length = 1; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js index 27c5dca43a..3597f2c6ef 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js @@ -14,7 +14,6 @@ description: > var obj = {}; obj.shift = Array.prototype.shift; -//CHECK#1 obj[0] = -1; obj.length = { valueOf: function() { @@ -26,7 +25,6 @@ if (shift !== -1) { throw new Test262Error('#1: obj[0] = -1; obj.length = {valueOf: function() {return 1}} obj.shift() === -1. Actual: ' + (shift)); } -//CHECK#2 obj[0] = -1; obj.length = { valueOf: function() { @@ -41,7 +39,6 @@ if (shift !== -1) { throw new Test262Error('#0: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return 0}} obj.shift() === -1. Actual: ' + (shift)); } -//CHECK#3 obj[0] = -1; obj.length = { valueOf: function() { @@ -56,7 +53,6 @@ if (shift !== -1) { throw new Test262Error('#3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return {}}} obj.shift() === -1. Actual: ' + (shift)); } -//CHECK#4 try { obj[0] = -1; obj.length = { @@ -80,7 +76,6 @@ catch (e) { } } -//CHECK#5 obj[0] = -1; obj.length = { toString: function() { @@ -92,7 +87,6 @@ if (shift !== undefined) { throw new Test262Error('#5: obj[0] = -1; obj.length = {toString: function() {return 0}} obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#6 obj[0] = -1; obj.length = { valueOf: function() { @@ -107,7 +101,6 @@ if (shift !== undefined) { throw new Test262Error('#6: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#7 try { obj[0] = -1; obj.length = { @@ -127,7 +120,6 @@ catch (e) { } } -//CHECK#8 try { obj[0] = -1; obj.length = { diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js index 9d2e865844..e662e95852 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A3_T3.js @@ -13,23 +13,19 @@ obj[0] = "x"; obj[1] = "y"; obj.length = -4294967294; -//CHECK#1 var shift = obj.shift(); if (shift !== undefined) { throw new Test262Error('#1: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x"; obj[1] = "y"; obj.length = -4294967294; obj.shift() === undefined. Actual: ' + (shift)); } -//CHECK#2 if (obj.length !== 0) { throw new Test262Error('#2: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x"; obj[1] = "y"; obj.length = -4294967294; obj.shift(); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== "x") { throw new Test262Error('#3: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x"; obj[1] = "y"; obj.length = -4294967294; obj.shift(); obj[0] === "x". Actual: ' + (obj[0])); } -//CHECK#4 if (obj[1] !== "y") { throw new Test262Error('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = "x" obj[1] = "y"; obj.length = -4294967294; obj.shift(); obj[1] === "y". Actual: ' + (obj[1])); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js index 966f5eb72c..518b23174a 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T1.js @@ -13,18 +13,15 @@ Array.prototype[1] = 1; var x = [0]; x.length = 2; -//CHECK#1 var shift = x.shift(); if (shift !== 0) { throw new Test262Error('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.shift() === 0. Actual: ' + (shift)); } -//CHECK#2 if (x[0] !== 1) { throw new Test262Error('#2: Array.prototype[1] = 1; x = [0]; x.length = 2; x.shift(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== 1) { throw new Test262Error('#3: Array.prototype[1] = 1; x = [0]; x.length = 2; x.shift(); x[1] === 1. Actual: ' + (x[1])); } @@ -36,28 +33,23 @@ x = { 0: 0 }; -//CHECK#4 var shift = x.shift(); if (shift !== 0) { throw new Test262Error('#4: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift() === 0. Actual: ' + (shift)); } -//CHECK#5 if (x[0] !== 1) { throw new Test262Error('#5: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== 1) { throw new Test262Error('#6: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift(); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#7 if (x.length !== 1) { throw new Test262Error('#7: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift(); x.length === 1. Actual: ' + (x.length)); } -//CHECK#8 delete x.length; if (x.length !== 2) { throw new Test262Error('#8: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift(); delete x; x.length === 2. Actual: ' + (x.length)); diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T2.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T2.js index ae67003e85..8a7c8c06d9 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T2.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A4_T2.js @@ -13,18 +13,15 @@ Array.prototype[1] = -1; var x = [0, 1]; x.length = 2; -//CHECK#1 var shift = x.shift(); if (shift !== 0) { throw new Test262Error('#1: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.shift() === 0. Actual: ' + (shift)); } -//CHECK#2 if (x[0] !== 1) { throw new Test262Error('#2: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.shift(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== -1) { throw new Test262Error('#3: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.shift(); x[1] === -1. Actual: ' + (x[1])); } @@ -37,28 +34,23 @@ x = { 1: 1 }; -//CHECK#4 var shift = x.shift(); if (shift !== 0) { throw new Test262Error('#4: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift() === 0. Actual: ' + (shift)); } -//CHECK#5 if (x[0] !== 1) { throw new Test262Error('#5: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== -1) { throw new Test262Error('#6: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift(); x[1] === -1. Actual: ' + (x[1])); } -//CHECK#7 if (x.length !== 1) { throw new Test262Error('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift(); x.length === 1. Actual: ' + (x.length)); } -//CHECK#8 delete x.length; if (x.length !== 2) { throw new Test262Error('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift(); delete x; x.length === 2. Actual: ' + (x.length)); diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.7.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.7.js index 69f915bb1b..7b658bd2d8 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.7.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.7.js @@ -9,7 +9,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.shift(); diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T1.js index 356020c1d4..6376c8ec83 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T1.js @@ -12,33 +12,27 @@ description: length > end > start = 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(0, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T2.js index e3b044a242..43dccda45c 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T2.js @@ -12,18 +12,15 @@ description: length > end = start > 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(3, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(3,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(3,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(3,3); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T3.js index adcb5a5eb7..08bdca3a37 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T3.js @@ -12,18 +12,15 @@ description: length > start > end > 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(4, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(4,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(4,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(4,3); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T4.js index ba6d31987d..df67955566 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T4.js @@ -12,18 +12,15 @@ description: length = end = start > 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(5, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(5,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(5,5); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(5,5); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T5.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T5.js index 26f5a191cd..33a96f32cd 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T5.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T5.js @@ -12,28 +12,23 @@ description: length = end > start > 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(3, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 2) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr.length === 2. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 3) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr[0] === 3. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 4) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr[1] === 4. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[3] !== undefined) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T6.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T6.js index 0abde108c8..7fcf709a00 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T6.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T6.js @@ -12,28 +12,23 @@ description: length > end > start > 0; var x = [0, 1, 2, 3, 4]; var arr = x.slice(2, 4); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 2) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr.length === 2. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 2) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr[0] === 2. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 3) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr[1] === 3. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[3] !== undefined) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T7.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T7.js index a0d4e14afe..600c4cf11c 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T7.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.1_T7.js @@ -12,28 +12,23 @@ description: end > length > start > 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(3, 6); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 2) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr.length === 2. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 3) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr[0] === 3. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 4) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr[1] === 4. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[3] !== undefined) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T1.js index 85a13353fc..b7cfd15afb 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T1.js @@ -12,23 +12,19 @@ description: length > end = abs(start), start < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(-3, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 1) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 2) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr[0] === 2. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== undefined) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr[1] === undefined. Actual: ' + (arr[1])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T2.js index 5468bd6336..d1fde78b95 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T2.js @@ -12,23 +12,19 @@ description: length = end > abs(start), start < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(-1, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 1) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 4) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr[0] === 4. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== undefined) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr[1] === undefined. Actual: ' + (arr[1])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T3.js index cc0dab2fe9..72994a3cf6 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T3.js @@ -12,23 +12,19 @@ description: abs(start) = length > end > 0, start < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(-5, 1); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 1) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== undefined) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr[1] === undefined. Actual: ' + (arr[1])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T4.js index debd031e8a..b539f20f30 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.2_T4.js @@ -12,43 +12,35 @@ description: abs(start) > length = end > 0, start < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(-9, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 5) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr.length === 5. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== 3) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[3] === 3. Actual: ' + (arr[3])); } -//CHECK#7 if (arr[4] !== 4) { throw new Test262Error('#7: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[4] === 4. Actual: ' + (arr[4])); } -//CHECK#8 if (arr[5] !== undefined) { throw new Test262Error('#8: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[5] === undefined. Actual: ' + (arr[5])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T1.js index 13480dcb9a..396e591c26 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T1.js @@ -12,33 +12,27 @@ description: length > abs(end) > start = 0, end < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(0, -2); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T2.js index e83e0a8b59..33cce2c86d 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T2.js @@ -12,18 +12,15 @@ description: length > abs(end) > start > 0, end < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(1, -4); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(1,-4); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(1,-4); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(1,-4); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T3.js index 74990e57bb..1462784025 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T3.js @@ -12,18 +12,15 @@ description: length = abs(end) > start = 0, end < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(0, -5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,-5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,-5); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,-5); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T4.js index c3225fa536..c5c44b4abd 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.3_T4.js @@ -12,18 +12,15 @@ description: abs(end) > length > start > 0, end < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(4, -9); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(4,-9); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(4,-9); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(4,-9); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T1.js index 015aab5abf..10df0ea47d 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T1.js @@ -12,33 +12,27 @@ description: -length = start < end < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(-5, -2); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T2.js index 43191e4d9b..c48419af3b 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T2.js @@ -12,28 +12,23 @@ description: -length < start < end < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(-3, -1); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 2) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr.length === 2. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 2) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr[0] === 2. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 3) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr[1] === 3. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== undefined) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr[2] === undefined. Actual: ' + (arr[2])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T3.js index 2b3a5c556b..8d2435fda5 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T3.js @@ -12,38 +12,31 @@ description: start < -length < end < 0 var x = [0, 1, 2, 3, 4]; var arr = x.slice(-9, -1); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 4) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr.length === 4. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== 3) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[3] === 3. Actual: ' + (arr[3])); } -//CHECK#7 if (arr[4] !== undefined) { throw new Test262Error('#7: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[4] === undefined. Actual: ' + (arr[4])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T4.js index 03b0fefb7e..78d71ff0da 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.4_T4.js @@ -12,18 +12,15 @@ description: start = end < -length var x = [0, 1, 2, 3, 4]; var arr = x.slice(-6, -6); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T1.js index 9b579c5aed..595df135f4 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T1.js @@ -10,28 +10,23 @@ description: end === undefined var x = [0, 1, 2, 3, 4]; var arr = x.slice(3, undefined); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 2) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr.length === 2. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 3) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr[0] === 3. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 4) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr[1] === 4. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== undefined) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr[2] === undefined. Actual: ' + (arr[2])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T2.js index 0c401ef020..cd59cea582 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A1.5_T2.js @@ -10,28 +10,23 @@ description: end is absent var x = [0, 1, 2, 3, 4]; var arr = x.slice(-2); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 2) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr.length === 2. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 3) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr[0] === 3. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 4) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr[1] === 4. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== undefined) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr[2] === undefined. Actual: ' + (arr[2])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T1.js index 55e7f0d4a9..bf6114c29d 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T1.js @@ -10,28 +10,23 @@ description: start is not integer var x = [0, 1, 2, 3, 4]; var arr = x.slice(2.5, 4); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 2) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr.length === 2. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 2) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr[0] === 2. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 3) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr[1] === 3. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[3] !== undefined) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T2.js index 2541c16c26..a8b39a92aa 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T2.js @@ -10,33 +10,27 @@ description: start = NaN var x = [0, 1, 2, 3, 4]; var arr = x.slice(NaN, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T3.js index 1bea20fd86..31eb8482fa 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T3.js @@ -10,18 +10,15 @@ description: start = Infinity var x = [0, 1, 2, 3, 4]; var arr = x.slice(Number.POSITIVE_INFINITY, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(Number.POSITIVE_INFINITY,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(Number.POSITIVE_INFINITY,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(Number.POSITIVE_INFINITY,3); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T4.js index c6d0a008f5..af5929c06f 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T4.js @@ -10,33 +10,27 @@ description: start = -Infinity var x = [0, 1, 2, 3, 4]; var arr = x.slice(Number.NEGATIVE_INFINITY, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T5.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T5.js index 0502aae3dd..675a2422fb 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T5.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.1_T5.js @@ -17,33 +17,27 @@ var arr = x.slice({ } }, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T1.js index dfc004a60d..4938b34e71 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T1.js @@ -10,28 +10,23 @@ description: end is not integer var x = [0, 1, 2, 3, 4]; var arr = x.slice(2, 4.5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 2) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr.length === 2. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 2) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr[0] === 2. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 3) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr[1] === 3. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[3] !== undefined) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T2.js index 67afb72afb..fb567a1d67 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T2.js @@ -10,18 +10,15 @@ description: end = NaN var x = [0, 1, 2, 3, 4]; var arr = x.slice(0, NaN); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T3.js index 6e72c3e2eb..fd68f798c9 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T3.js @@ -10,43 +10,35 @@ description: end = Infinity var x = [0, 1, 2, 3, 4]; var arr = x.slice(0, Number.POSITIVE_INFINITY); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 5) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr.length === 5. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== 3) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[3] === 3. Actual: ' + (arr[3])); } -//CHECK#7 if (arr[4] !== 4) { throw new Test262Error('#7: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[4] === 4. Actual: ' + (arr[4])); } -//CHECK#8 if (arr[5] !== undefined) { throw new Test262Error('#8: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[5] === undefined. Actual: ' + (arr[5])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T4.js index 46dbad3e2a..ff61869fa3 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T4.js @@ -10,18 +10,15 @@ description: end = -Infinity var x = [0, 1, 2, 3, 4]; var arr = x.slice(0, Number.NEGATIVE_INFINITY); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.NEGATIVE_INFINITY); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.NEGATIVE_INFINITY); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.NEGATIVE_INFINITY); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T5.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T5.js index 15d55377b2..471303f9dc 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T5.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2.2_T5.js @@ -17,33 +17,27 @@ var arr = x.slice(0, { } }); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T1.js index 36e83d347a..dc5d175e6c 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T1.js @@ -21,33 +21,27 @@ obj[4] = 4; obj.length = 5; var arr = obj.slice(0, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T2.js index fb0a45fcea..d5eabe3113 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T2.js @@ -21,33 +21,27 @@ obj[4] = 4; obj.length = 5; var arr = obj.slice(-5, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T3.js index abb48f8996..ff7aaaa4df 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T3.js @@ -21,33 +21,27 @@ obj[4] = 4; obj.length = 5; var arr = obj.slice(0, -2); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T4.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T4.js index 7f0280ffdd..a69947c447 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T4.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T4.js @@ -21,33 +21,27 @@ obj[4] = 4; obj.length = 5; var arr = obj.slice(-5, -2); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T5.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T5.js index b732d8900a..0e56d955d8 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T5.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T5.js @@ -19,33 +19,27 @@ obj[4] = 4; obj.length = 5; var arr = obj.slice(2); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 2) { throw new Test262Error('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr[0] === 2. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 3) { throw new Test262Error('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr[1] === 3. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 4) { throw new Test262Error('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr[2] === 4. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T6.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T6.js index 0850054e03..5538bdf602 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T6.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A2_T6.js @@ -19,33 +19,27 @@ obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 2) { throw new Test262Error('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr[0] === 2. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 3) { throw new Test262Error('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr[1] === 3. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 4) { throw new Test262Error('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr[2] === 4. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr[3] === undefined. Actual: ' + (arr[3])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js index eb49a8810f..e2ba992ccc 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T3.js @@ -13,12 +13,10 @@ obj[4294967294] = "x"; obj.length = -1; var arr = obj.slice(4294967294, 4294967295); -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[4294967294] = "x"; obj.length = 4294967295; var arr = obj.slice(4294967294,4294967295); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== undefined) { throw new Test262Error('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[4294967294] = "x"; obj.length = 4294967295; var arr = obj.slice(4294967294,4294967295); arr[0] === undefined. Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A4_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A4_T1.js index 7fc6aba086..6cf9694c63 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A4_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A4_T1.js @@ -12,17 +12,14 @@ var x = [0]; x.length = 2; var arr = x.slice(); -//CHECK#1 if (arr[0] !== 0) { throw new Test262Error('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.slice(); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#2 if (arr[1] !== 1) { throw new Test262Error('#2: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.slice(); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#3 if (arr.hasOwnProperty('1') !== true) { throw new Test262Error('#3: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.slice(); arr.hasOwnProperty(\'1\') === true. Actual: ' + (arr.hasOwnProperty('1'))); } diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.7.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.7.js index a5cf4e12cf..a3c7162296 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.7.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.7.js @@ -9,7 +9,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.slice(); diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.1_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.1_T1.js index 7656978fa3..4396f22420 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.1_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.1_T1.js @@ -12,17 +12,14 @@ description: If comparefn is undefined, use SortCompare operator var x = new Array(2); x.sort(); -//CHECK#1 if (x.length !== 2) { throw new Test262Error('#1: var x = new Array(2); x.sort(); x.length === 2. Actual: ' + (x.length)); } -//CHECK#2 if (x[0] !== undefined) { throw new Test262Error('#2: var x = new Array(2); x.sort(); x[0] === undefined. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== undefined) { throw new Test262Error('#3: var x = new Array(2); x.sort(); x[1] === undefined. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T1.js index 1fa85373bf..52dbd2814d 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T1.js @@ -14,17 +14,14 @@ var x = new Array(2); x[1] = 1; x.sort(); -//CHECK#1 if (x.length !== 2) { throw new Test262Error('#1: var x = new Array(2); x[1] = 1; x.sort(); x.length === 2. Actual: ' + (x.length)); } -//CHECK#2 if (x[0] !== 1) { throw new Test262Error('#2: var x = new Array(2); x[1] = 1; x.sort(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== undefined) { throw new Test262Error('#3: var x = new Array(2); x[1] = 1; x.sort(); x[1] === undefined. Actual: ' + (x[1])); } @@ -33,17 +30,14 @@ var x = new Array(2); x[0] = 1; x.sort(); -//CHECK#4 if (x.length !== 2) { throw new Test262Error('#4: var x = new Array(2); x[0] = 1; x.sort(); x.length === 2. Actual: ' + (x.length)); } -//CHECK#5 if (x[0] !== 1) { throw new Test262Error('#5: var x = new Array(2); x[0] = 1; x.sort(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== undefined) { throw new Test262Error('#6: var x = new Array(2); x[0] = 1; x.sort(); x[1] === undefined. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T2.js index 0484017606..ddd2de8781 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.2_T2.js @@ -20,17 +20,14 @@ var x = new Array(2); x[1] = 1; x.sort(myComparefn); -//CHECK#1 if (x.length !== 2) { throw new Test262Error('#1: var x = new Array(2); x[1] = 1; x.sort(myComparefn); x.length === 2. Actual: ' + (x.length)); } -//CHECK#2 if (x[0] !== 1) { throw new Test262Error('#2: var x = new Array(2); x[1] = 1; x.sort(myComparefn); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== undefined) { throw new Test262Error('#3: var x = new Array(2); x[1] = 1; x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1])); } @@ -39,17 +36,14 @@ var x = new Array(2); x[0] = 1; x.sort(myComparefn); -//CHECK#4 if (x.length !== 2) { throw new Test262Error('#4: var x = new Array(2); x[0] = 1; x.sort(myComparefn); x.length === 2. Actual: ' + (x.length)); } -//CHECK#5 if (x[0] !== 1) { throw new Test262Error('#5: var x = new Array(2); x[0] = 1; x.sort(myComparefn); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== undefined) { throw new Test262Error('#6: var x = new Array(2); x[0] = 1; x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.3_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.3_T1.js index f6c6ca8e69..e41f56ef18 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.3_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.3_T1.js @@ -12,17 +12,14 @@ description: If comparefn is undefined, use SortCompare operator var x = new Array(undefined, undefined); x.sort(); -//CHECK#1 if (x.length !== 2) { throw new Test262Error('#1: var x = new Array(undefined, undefined); x.sort(); x.length === 2. Actual: ' + (x.length)); } -//CHECK#2 if (x[0] !== undefined) { throw new Test262Error('#2: var x = new Array(undefined, undefined); x.sort(); x[0] === undefined. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== undefined) { throw new Test262Error('#3: var x = new Array(undefined, undefined); x.sort(); x[1] === undefined. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T1.js index adb8de7f15..c03bbd7345 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T1.js @@ -12,17 +12,14 @@ description: If comparefn is undefined, use SortCompare operator var x = new Array(undefined, 1); x.sort(); -//CHECK#1 if (x.length !== 2) { throw new Test262Error('#1: var x = new Array(undefined, 1); x.sort(); x.length === 2. Actual: ' + (x.length)); } -//CHECK#2 if (x[0] !== 1) { throw new Test262Error('#2: var x = new Array(undefined, 1); x.sort(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== undefined) { throw new Test262Error('#3: var x = new Array(undefined, 1); x.sort(); x[1] === undefined. Actual: ' + (x[1])); } @@ -30,17 +27,14 @@ if (x[1] !== undefined) { var x = new Array(1, undefined); x.sort(); -//CHECK#4 if (x.length !== 2) { throw new Test262Error('#4: var x = new Array(1, undefined); x.sort(); x.length === 2. Actual: ' + (x.length)); } -//CHECK#5 if (x[0] !== 1) { throw new Test262Error('#5: var x = new Array(1, undefined); x.sort(); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== undefined) { throw new Test262Error('#6: var x = new Array(1, undefined); x.sort(); x[1] === undefined. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T2.js index c5aca94c77..d55be3196c 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.4_T2.js @@ -18,17 +18,14 @@ var myComparefn = function(x, y) { var x = new Array(undefined, 1); x.sort(myComparefn); -//CHECK#1 if (x.length !== 2) { throw new Test262Error('#1: var x = new Array(undefined, 1); x.sort(myComparefn); x.length === 2. Actual: ' + (x.length)); } -//CHECK#2 if (x[0] !== 1) { throw new Test262Error('#2: var x = new Array(undefined, 1); x.sort(myComparefn); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== undefined) { throw new Test262Error('#3: var x = new Array(undefined, 1); x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1])); } @@ -36,17 +33,14 @@ if (x[1] !== undefined) { var x = new Array(1, undefined); x.sort(myComparefn); -//CHECK#4 if (x.length !== 2) { throw new Test262Error('#4: var x = new Array(1, undefined); x.sort(myComparefn); x.length === 2. Actual: ' + (x.length)); } -//CHECK#5 if (x[0] !== 1) { throw new Test262Error('#5: var x = new Array(1, undefined); x.sort(myComparefn); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== undefined) { throw new Test262Error('#6: var x = new Array(1, undefined); x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.5_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.5_T1.js index f6d68dc5d5..514e9ca057 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.5_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A1.5_T1.js @@ -10,17 +10,14 @@ description: Checking sort() and sort(undefined) var x = new Array(1, 0); x.sort(); -//CHECK#1 if (x.length !== 2) { throw new Test262Error('#1: var x = new Array(1,0); x.sort(); x.length === 2. Actual: ' + (x.length)); } -//CHECK#2 if (x[0] !== 0) { throw new Test262Error('#2: var x = new Array(1,0); x.sort(); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== 1) { throw new Test262Error('#3: var x = new Array(1,0); x.sort(); x[1] === 1. Actual: ' + (x[1])); } @@ -28,17 +25,14 @@ if (x[1] !== 1) { var x = new Array(1, 0); x.sort(undefined); -//CHECK#4 if (x.length !== 2) { throw new Test262Error('#4: var x = new Array(1,0); x.sort(undefined); x.length === 2. Actual: ' + (x.length)); } -//CHECK#5 if (x[0] !== 0) { throw new Test262Error('#5: var x = new Array(1,0); x.sort(undefined); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== 1) { throw new Test262Error('#6: var x = new Array(1,0); x.sort(undefined); x[1] === 1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T1.js index 5debd359b2..991dc40a67 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T1.js @@ -13,7 +13,6 @@ description: Checking ENGLISH ALPHABET var alphabetR = ["z", "y", "x", "w", "v", "u", "t", "s", "r", "q", "p", "o", "n", "M", "L", "K", "J", "I", "H", "G", "F", "E", "D", "C", "B", "A"]; var alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]; -//CHECK#1 alphabetR.sort(); var result = true; for (var i = 0; i < 26; i++) { diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T2.js index 47b7e5469d..2452726c70 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T2.js @@ -13,7 +13,6 @@ description: Checking RUSSIAN ALPHABET var alphabetR = ["ё", "я", "ю", "э", "ь", "ы", "ъ", "щ", "ш", "ч", "ц", "х", "ф", "у", "т", "с", "р", "П", "О", "Н", "М", "Л", "К", "Й", "И", "З", "Ж", "Е", "Д", "Г", "В", "Б", "А"]; var alphabet = ["А", "Б", "В", "Г", "Д", "Е", "Ж", "З", "И", "Й", "К", "Л", "М", "Н", "О", "П", "р", "с", "т", "у", "ф", "х", "ц", "ч", "ш", "щ", "ъ", "ы", "ь", "э", "ю", "я", "ё"]; -//CHECK#1 alphabetR.sort(); var result = true; for (var i = 0; i < 26; i++) { diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T3.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T3.js index d1a4474862..3197e36f52 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T3.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.1_T3.js @@ -21,7 +21,6 @@ var obj = { var alphabetR = [undefined, 2, 1, "X", -1, "a", true, obj, NaN, Infinity]; var alphabet = [-1, obj, 1, 2, Infinity, NaN, "X", "a", true, undefined]; -//CHECK#1 alphabetR.sort(); var result = true; for (var i = 0; i < 10; i++) { diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T1.js index 9c058806a6..2e56943839 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T1.js @@ -18,7 +18,6 @@ var myComparefn = function(x, y) { return 0; } -//CHECK#1 alphabet.sort(myComparefn); var result = true; for (var i = 0; i < 26; i++) { diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T2.js index 5341f75f7c..8f4db0fc38 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T2.js @@ -18,7 +18,6 @@ var myComparefn = function(x, y) { return 0; } -//CHECK#1 alphabet.sort(myComparefn); var result = true; for (var i = 0; i < 26; i++) { diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T3.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T3.js index 49d13e3d92..3d878416f2 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T3.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A2.2_T3.js @@ -26,7 +26,6 @@ var myComparefn = function(x, y) { return 0; } -//CHECK#1 alphabetR.sort(myComparefn); var result = true; for (var i = 0; i < 10; i++) { diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T1.js index ba0ae2f0ba..b05acb3f70 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T1.js @@ -35,13 +35,11 @@ var alphabet = [-1, obj, 1, 2, Infinity, NaN, "X", "a", true, undefined]; alphabetR.sort(); -//CHECK#0 alphabetR.getClass = Object.prototype.toString; if (alphabetR.getClass() !== "[object " + "Object" + "]") { throw new Test262Error('#0: alphabetR.sort() is Object object, not Array object'); } -//CHECK#1 var result = true; for (var i = 0; i < 10; i++) { if (!(isNaN(alphabetR[i]) && isNaN(alphabet[i]))) { diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T2.js index ce9b4068c9..a222477cb2 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A3_T2.js @@ -43,13 +43,11 @@ var myComparefn = function(x, y) { alphabetR.sort(myComparefn); -//CHECK#0 alphabetR.getClass = Object.prototype.toString; if (alphabetR.getClass() !== "[object " + "Object" + "]") { throw new Test262Error('#0: alphabetR.sort() is Object object, not Array object'); } -//CHECK#1 var result = true; for (var i = 0; i < 10; i++) { if (!(isNaN(alphabetR[i]) && isNaN(alphabet[i]))) { diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A4_T3.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A4_T3.js index e44d4b9044..24133e1996 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A4_T3.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A4_T3.js @@ -14,27 +14,22 @@ obj[1] = "y"; obj[2] = "x"; obj.length = -4294967294; -//CHECK#1 if (obj.sort() !== obj) { throw new Test262Error('#1: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = "z"; obj[1] = "y"; obj[2] = "x"; obj.length = -4294967294; obj.sort() === obj. Actual: ' + (obj.sort())); } -//CHECK#2 if (obj.length !== -4294967294) { throw new Test262Error('#2: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = "z"; obj[1] = "y"; obj[2] = "x"; obj.length = -4294967294; obj.sort(); obj.length === -4294967294. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== "z") { throw new Test262Error('#3: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = "z"; obj[1] = "y"; obj[2] = "x"; obj.length = -4294967294; obj.sort(); obj[0] === "z". Actual: ' + (obj[0])); } -//CHECK#4 if (obj[1] !== "y") { throw new Test262Error('#4: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = "z"; obj[1] = "y"; obj[2] = "x"; obj.length = -4294967294; obj.sort(); obj[1] === "y". Actual: ' + (obj[1])); } -//CHECK#5 if (obj[2] !== "x") { throw new Test262Error('#5: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = "z"; obj[1] = "y"; obj[2] = "x"; obj.length = -4294967294; obj.sort(); obj[2] === "x". Actual: ' + (obj[2])); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js index f6de95062e..1c164af479 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js @@ -7,7 +7,6 @@ esid: sec-array.prototype.sort description: comparefn function throw "error" ---*/ -//CHECK#1 var myComparefn = function(x, y) { throw "error"; } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A6_T2.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A6_T2.js index 5431d98483..92433cf344 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A6_T2.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A6_T2.js @@ -14,24 +14,20 @@ var x = [1, 0]; x.length = 2; x.sort(); -//CHECK#1 if (x[0] !== 0) { throw new Test262Error('#1: Array.prototype[1] = -1; x = [1,0]; x.length = 2; x.sort(); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#2 if (x[1] !== 1) { throw new Test262Error('#2: Array.prototype[1] = -1; x = [1,0]; x.length = 2; x.sort(); x[1] === 1. Actual: ' + (x[1])); } x.length = 0; -//CHECK#3 if (x[0] !== undefined) { throw new Test262Error('#3: Array.prototype[1] = -1; x = [1,0]; x.length = 2; x.sort(); x.length = 0; x[0] === undefined. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== -1) { throw new Test262Error('#4: Array.prototype[1] = -1; x = [1,0]; x.length = 2; x.sort(); x.length = 0; x[1] === -1. Actual: ' + (x[1])); } @@ -45,12 +41,10 @@ x = { }; x.sort(); -//CHECK#5 if (x[0] !== 0) { throw new Test262Error('#5: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; x = {0:1,1:0}; x.sort(); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== 1) { throw new Test262Error('#6: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; x = {0:1,1:0}; x.sort(); x[1] === 1. Actual: ' + (x[1])); } @@ -58,12 +52,10 @@ if (x[1] !== 1) { delete x[0]; delete x[1]; -//CHECK#7 if (x[0] !== undefined) { throw new Test262Error('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; x = {0:1,1:0}; x.sort(); delete x[0]; delete x[1]; x[0] === undefined. Actual: ' + (x[0])); } -//CHECK#8 if (x[1] !== -1) { throw new Test262Error('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; x = {0:1,1:0}; x.sort(); delete x[0]; delete x[1]; x[1] === -1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.7.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.7.js index 65bc7bddda..7c7c3700a9 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.7.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.7.js @@ -9,7 +9,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.sort(); diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T1.js index fb8ba36f0f..a82952c731 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T1.js @@ -12,38 +12,31 @@ description: length > deleteCount > start = 0, itemCount = 0 var x = [0, 1, 2, 3]; var arr = x.splice(0, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(0,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(0,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(0,3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(0,3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(0,3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(0,3); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 3) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(0,3); x[0] === 3. Actual: ' + (x[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T2.js index 4c0a9f79b6..f5dd96655e 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T2.js @@ -12,48 +12,39 @@ description: length > deleteCount > start = 0, itemCount > 0 var x = [0, 1, 2, 3]; var arr = x.splice(0, 3, 4, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); x.length === 3. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 4) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); x[0] === 4. Actual: ' + (x[0])); } -//CHECK#8 if (x[1] !== 5) { throw new Test262Error('#8: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); x[1] === 5. Actual: ' + (x[1])); } -//CHECK#9 if (x[2] !== 3) { throw new Test262Error('#9: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); x[2] === 3. Actual: ' + (x[2])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T3.js index 95b4806a77..e8afde3e18 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T3.js @@ -12,38 +12,31 @@ description: length = deleteCount > start = 0 var x = [0, 1, 2, 3]; var arr = x.splice(0, 4); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(0,4); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 4) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(0,4); arr.length === 4. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(0,4); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(0,4); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(0,4); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(0,4); arr[3] === 3. Actual: ' + (arr[3])); } -//CHECK#7 if (x.length !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(0,4); x.length === 0. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T4.js index 804065cb9e..0691d393e1 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T4.js @@ -12,48 +12,39 @@ description: length > deleteCount > start > 0, itemCount > 0 var x = [0, 1, 2, 3]; var arr = x.splice(1, 3, 4, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 1) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 2) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr[1] === 2. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 3) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr[2] === 3. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); x.length === 3. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#8 if (x[1] !== 4) { throw new Test262Error('#8: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); x[1] === 4. Actual: ' + (x[1])); } -//CHECK#9 if (x[2] !== 5) { throw new Test262Error('#9: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); x[2] === 5. Actual: ' + (x[2])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T5.js index 501aa9977b..03e716908d 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T5.js @@ -12,38 +12,31 @@ description: deleteCount > length > start = 0, itemCount = 0 var x = [0, 1, 2, 3]; var arr = x.splice(0, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(0,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 4) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(0,5); arr.length === 4. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(0,5); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(0,5); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(0,5); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(0,5); arr[3] === 3. Actual: ' + (arr[3])); } -//CHECK#7 if (x.length !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(0,5); x.length === 0. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T6.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T6.js index 16196340dd..28f50fb59b 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T6.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.1_T6.js @@ -12,48 +12,39 @@ description: length = deleteCount > start > 0, itemCount > 0 var x = [0, 1, 2, 3]; var arr = x.splice(1, 4, 4, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 1) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 2) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr[1] === 2. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 3) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr[2] === 3. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); x.length === 3. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#8 if (x[1] !== 4) { throw new Test262Error('#8: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); x[1] === 4. Actual: ' + (x[1])); } -//CHECK#9 if (x[2] !== 5) { throw new Test262Error('#9: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); x[2] === 5. Actual: ' + (x[2])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T1.js index eb4890f255..b040f7a2df 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T1.js @@ -12,28 +12,23 @@ description: -length = start < deleteCount < 0, itemCount = 0 var x = [0, 1]; var arr = x.splice(-2, -1); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(-2,-1); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(-2,-1); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 2) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(-2,-1); x.length === 2. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(-2,-1); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(-2,-1); x[1] === 1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T2.js index 22b588579e..04cf397d9a 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T2.js @@ -12,28 +12,23 @@ description: -length < start = deleteCount < 0, itemCount = 0 var x = [0, 1]; var arr = x.splice(-1, -1); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(-1,-1); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(-1,-1); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 2) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(-1,-1); x.length === 2. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(-1,-1); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(-1,-1); x[1] === 1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T3.js index f2cfe6ee98..59c1a98922 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T3.js @@ -12,38 +12,31 @@ description: -length = start < deleteCount < 0, itemCount > 0 var x = [0, 1]; var arr = x.splice(-2, -1, 2, 3); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(-2,-1,2,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(-2,-1,2,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 4) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x.length === 4. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 2) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x[0] === 2. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 3) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x[1] === 3. Actual: ' + (x[1])); } -//CHECK#5 if (x[2] !== 0) { throw new Test262Error('#5: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x[2] === 0. Actual: ' + (x[2])); } -//CHECK#6 if (x[3] !== 1) { throw new Test262Error('#6: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x[3] === 1. Actual: ' + (x[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T4.js index 32c08f1753..e3e7229179 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T4.js @@ -12,38 +12,31 @@ description: -length < start = deleteCount < 0, itemCount > 0 var x = [0, 1]; var arr = x.splice(-1, -1, 2, 3); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(-1,-1,2,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(-1,-1,2,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 4) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x.length === 4. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 2) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x[1] === 2. Actual: ' + (x[1])); } -//CHECK#5 if (x[2] !== 3) { throw new Test262Error('#5: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x[2] === 3. Actual: ' + (x[2])); } -//CHECK#6 if (x[3] !== 1) { throw new Test262Error('#6: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x[3] === 1. Actual: ' + (x[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T5.js index b578a67ed2..fddd2f110e 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.2_T5.js @@ -12,38 +12,31 @@ description: start < -length < deleteCount < 0, itemCount > 0 var x = [0, 1]; var arr = x.splice(-3, -1, 2, 3); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(-3,-1,2,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(-3,-1,2,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 4) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x.length === 4. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 2) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x[0] === 2. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 3) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x[1] === 3. Actual: ' + (x[1])); } -//CHECK#5 if (x[2] !== 0) { throw new Test262Error('#5: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x[2] === 0. Actual: ' + (x[2])); } -//CHECK#6 if (x[3] !== 1) { throw new Test262Error('#6: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x[3] === 1. Actual: ' + (x[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T1.js index 6f9d5bf60f..cda596c3c3 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T1.js @@ -12,28 +12,23 @@ description: -length < deleteCount < start = 0, itemCount = 0 var x = [0, 1]; var arr = x.splice(0, -1); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(0,-1); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(0,-1); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 2) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(0,-1); x.length === 2. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(0,-1); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(0,-1); x[1] === 1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T2.js index 1bd26512dc..76005fc6e1 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T2.js @@ -12,28 +12,23 @@ description: -length = -start < deleteCount < 0, itemCount = 0 var x = [0, 1]; var arr = x.splice(2, -1); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(2,-1); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(2,-1); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 2) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(2,-1); x.length === 2. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(2,-1); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(2,-1); x[1] === 1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T3.js index 7159d95cac..2ceea42996 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T3.js @@ -12,38 +12,31 @@ description: -length < deleteCount < start = 0, itemCount > 0 var x = [0, 1]; var arr = x.splice(0, -1, 2, 3); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(0,-1,2,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(0,-1,2,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 4) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(0,-1,2,3); x.length === 4. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 2) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(0,-1,2,3); x[0] === 2. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 3) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(0,-1,2,3); x[1] === 3. Actual: ' + (x[1])); } -//CHECK#5 if (x[2] !== 0) { throw new Test262Error('#5: var x = [0,1]; var arr = x.splice(0,-1,2,3); x[2] === 0. Actual: ' + (x[2])); } -//CHECK#6 if (x[3] !== 1) { throw new Test262Error('#6: var x = [0,1]; var arr = x.splice(0,-1,2,3); x[3] === 1. Actual: ' + (x[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T4.js index 2245c04567..9269d0ff29 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T4.js @@ -12,38 +12,31 @@ description: -length = -start < deleteCount < 0, itemCount > 0 var x = [0, 1]; var arr = x.splice(2, -1, 2, 3); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(2,-1,2,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(2,-1,2,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 4) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(2,-1,2,3); x.length === 4. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(2,-1,2,3); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(2,-1,2,3); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#5 if (x[2] !== 2) { throw new Test262Error('#5: var x = [0,1]; var arr = x.splice(2,-1,2,3); x[2] === 2. Actual: ' + (x[2])); } -//CHECK#6 if (x[3] !== 3) { throw new Test262Error('#6: var x = [0,1]; var arr = x.splice(2,-1,2,3); x[3] === 3. Actual: ' + (x[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T5.js index beaf1c5bb0..53d0f5998a 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.3_T5.js @@ -12,38 +12,31 @@ description: -start < -length < deleteCount < 0, itemCount > 0 var x = [0, 1]; var arr = x.splice(3, -1, 2, 3); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(3,-1,2,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(3,-1,2,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 4) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(3,-1,2,3); x.length === 4. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(3,-1,2,3); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(3,-1,2,3); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#5 if (x[2] !== 2) { throw new Test262Error('#5: var x = [0,1]; var arr = x.splice(3,-1,2,3); x[2] === 2. Actual: ' + (x[2])); } -//CHECK#6 if (x[3] !== 3) { throw new Test262Error('#6: var x = [0,1]; var arr = x.splice(3,-1,2,3); x[3] === 3. Actual: ' + (x[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T1.js index f8bf425cf1..b4de359233 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T1.js @@ -12,38 +12,31 @@ description: length = -start > deleteCount > 0, itemCount = 0 var x = [0, 1, 2, 3]; var arr = x.splice(-4, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(-4,3); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 3) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(-4,3); x[0] === 3. Actual: ' + (x[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T2.js index e97b80f0a5..eec01a4dd6 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T2.js @@ -12,48 +12,39 @@ description: length = -start > deleteCount > 0, itemCount > 0 var x = [0, 1, 2, 3]; var arr = x.splice(-4, 3, 4, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); x.length === 3. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 4) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); x[0] === 4. Actual: ' + (x[0])); } -//CHECK#8 if (x[1] !== 5) { throw new Test262Error('#8: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); x[1] === 5. Actual: ' + (x[1])); } -//CHECK#9 if (x[2] !== 3) { throw new Test262Error('#9: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); x[2] === 3. Actual: ' + (x[2])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T3.js index 8438f6cc16..c26ea1620a 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T3.js @@ -12,38 +12,31 @@ description: -start > length = deleteCount > 0, itemCount = 0 var x = [0, 1, 2, 3]; var arr = x.splice(-5, 4); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 4) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr.length === 4. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr[3] === 3. Actual: ' + (arr[3])); } -//CHECK#7 if (x.length !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(-5,4); x.length === 0. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T4.js index 009bad2ad5..490bd1feb0 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T4.js @@ -12,48 +12,39 @@ description: length > -start = deleteCount > 0, itemCount > 0 var x = [0, 1, 2, 3]; var arr = x.splice(-3, 3, 4, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 1) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 2) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr[1] === 2. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 3) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr[2] === 3. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); x.length === 3. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#8 if (x[1] !== 4) { throw new Test262Error('#8: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); x[1] === 4. Actual: ' + (x[1])); } -//CHECK#9 if (x[2] !== 5) { throw new Test262Error('#9: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); x[2] === 5. Actual: ' + (x[2])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T5.js index 375a58ce92..b612e0a583 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T5.js @@ -12,38 +12,31 @@ description: -start > deleteCount > length > 0, itemCount = 0 var x = [0, 1, 2, 3]; var arr = x.splice(-9, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 4) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr.length === 4. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr[3] === 3. Actual: ' + (arr[3])); } -//CHECK#7 if (x.length !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(-9,5); x.length === 0. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T6.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T6.js index c83a06fec3..046d6a3a54 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T6.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.4_T6.js @@ -12,48 +12,39 @@ description: length = deleteCount > -start > 0, itemCount > 0 var x = [0, 1, 2, 3]; var arr = x.splice(-3, 4, 4, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 1) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 2) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr[1] === 2. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 3) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr[2] === 3. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); x.length === 3. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#8 if (x[1] !== 4) { throw new Test262Error('#8: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); x[1] === 4. Actual: ' + (x[1])); } -//CHECK#9 if (x[2] !== 5) { throw new Test262Error('#9: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); x[2] === 5. Actual: ' + (x[2])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T1.js index 33d548e49c..22af4cc443 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T1.js @@ -10,38 +10,31 @@ description: start === undefined, end === undefined var x = [0, 1, 2, 3]; var arr = x.splice(undefined, undefined); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (x.length !== 4) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x.length === 4. Actual: ' + (x.length)); } -//CHECK#4 if (x[0] !== 0) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#5 if (x[1] !== 1) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#6 if (x[2] !== 2) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x[2] === 2. Actual: ' + (x[2])); } -//CHECK#7 if (x[3] !== 3) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x[3] === 3. Actual: ' + (x[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T2.js index d795de3728..d7016a1710 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A1.5_T2.js @@ -10,38 +10,31 @@ description: end === undefined var x = [0, 1, 2, 3]; var arr = x.splice(1, undefined); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(1,undefined); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(1,undefined); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (x.length !== 4) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x.length === 4. Actual: ' + (x.length)); } -//CHECK#4 if (x[0] !== 0) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#5 if (x[1] !== 1) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#6 if (x[2] !== 2) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x[2] === 2. Actual: ' + (x[2])); } -//CHECK#7 if (x[3] !== 3) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x[3] === 3. Actual: ' + (x[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T1.js index cc36f7bd39..072c23012e 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T1.js @@ -10,38 +10,31 @@ description: start is not integer var x = [0, 1, 2, 3]; var arr = x.splice(1.5, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 1) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 2) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr[1] === 2. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 3) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr[2] === 3. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(1.5,3); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(1.5,3); x[0] === 0. Actual: ' + (x[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T2.js index 738880d2fa..ed33165593 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T2.js @@ -10,38 +10,31 @@ description: start = NaN var x = [0, 1, 2, 3]; var arr = x.splice(NaN, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(NaN,3); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 3) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(NaN,3); x[0] === 3. Actual: ' + (x[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T3.js index 4c642a8a79..63b69123f5 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T3.js @@ -10,33 +10,27 @@ description: start = Infinity var x = [0, 1, 2, 3]; var arr = x.splice(Number.POSITIVE_INFINITY, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(Number.POSITIVE_INFINITY,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 0) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(Number.POSITIVE_INFINITY,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var x = x.splice(Number.POSITIVE_INFINITY,3); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var x = x.splice(Number.POSITIVE_INFINITY,3); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#5 if (x[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var x = x.splice(Number.POSITIVE_INFINITY,3); x[2] === 2. Actual: ' + (x[2])); } -//CHECK#6 if (x[3] !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var x = x.splice(Number.POSITIVE_INFINITY,3); x[3] === 3. Actual: ' + (x[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T4.js index e7a7349553..36c97a1a63 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T4.js @@ -10,38 +10,31 @@ description: start = -Infinity var x = [0, 1, 2, 3]; var arr = x.splice(Number.NEGATIVE_INFINITY, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 3) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); x[0] === 3. Actual: ' + (x[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T5.js index 1d3d6588ce..c6254f30d4 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.1_T5.js @@ -17,38 +17,31 @@ var arr = x.splice({ } }, 3); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 3) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); x[0] === 3. Actual: ' + (x[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T1.js index 6c7dbe3e79..b4ec91312a 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T1.js @@ -10,38 +10,31 @@ description: deleteCount is not integer var x = [0, 1, 2, 3]; var arr = x.splice(1, 3.5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 1) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 2) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr[1] === 2. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 3) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr[2] === 3. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(1,3.5); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(1,3.5); x[0] === 0. Actual: ' + (x[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T2.js index 0917d0d6a3..7243b0fbf9 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T2.js @@ -10,28 +10,23 @@ description: deleteCount = NaN var x = [0, 1]; var arr = x.splice(0, NaN); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(0,NaN); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(0,NaN); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 2) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(0,NaN); x.length === 2. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(0,NaN); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(0,NaN); x[1] === 1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T3.js index c02ce5561f..c3867cbcd4 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T3.js @@ -10,38 +10,31 @@ description: deleteCount = Infinity var x = [0, 1, 2, 3]; var arr = x.splice(0, Number.POSITIVE_INFINITY); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 4) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr.length === 4. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (arr[3] !== 3) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr[3] === 3. Actual: ' + (arr[3])); } -//CHECK#7 if (x.length !== 0) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); x.length === 0. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T4.js index 108697b673..a84cc6fbe0 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T4.js @@ -10,28 +10,23 @@ description: deleteCount = -Infinity var x = [0, 1]; var arr = x.splice(0, Number.NEGATIVE_INFINITY); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (x.length !== 2) { throw new Test262Error('#2: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); x.length === 2. Actual: ' + (x.length)); } -//CHECK#3 if (x[0] !== 0) { throw new Test262Error('#3: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#4 if (x[1] !== 1) { throw new Test262Error('#4: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); x[1] === 1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T5.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T5.js index df4260668e..0f52e330cc 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T5.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2.2_T5.js @@ -17,38 +17,31 @@ var arr = x.splice(0, { } }); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (x.length !== 1) { throw new Test262Error('#6: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); x.length === 1. Actual: ' + (x.length)); } -//CHECK#7 if (x[0] !== 3) { throw new Test262Error('#7: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); x[0] === 3. Actual: ' + (x[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T1.js index b2f81b3ccc..00ba427c07 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T1.js @@ -21,53 +21,43 @@ obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0, 3, 4, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (obj.length !== 3) { throw new Test262Error('#6: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj.length === 3. Actual: ' + (obj.length)); } -//CHECK#7 if (obj[0] !== 4) { throw new Test262Error('#7: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj[0] === 4. Actual: ' + (obj[0])); } -//CHECK#8 if (obj[1] !== 5) { throw new Test262Error('#8: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj[1] === 5. Actual: ' + (obj[1])); } -//CHECK#9 if (obj[2] !== 3) { throw new Test262Error('#9: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj[2] === 3. Actual: ' + (obj[2])); } -//CHECK#10 if (obj[3] !== undefined) { throw new Test262Error('#10: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj[3] === undefined. Actual: ' + (obj[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T2.js index 18b0eede39..47dd9837ce 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T2.js @@ -19,43 +19,35 @@ obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2, -1, 2, 3); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (obj.length !== 4) { throw new Test262Error('#2: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj.length === 4. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== 2) { throw new Test262Error('#3: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[0] === 2. Actual: ' + (obj[0])); } -//CHECK#4 if (obj[1] !== 3) { throw new Test262Error('#4: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[1] === 3. Actual: ' + (obj[1])); } -//CHECK#5 if (obj[2] !== 0) { throw new Test262Error('#5: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[2] === 0. Actual: ' + (obj[2])); } -//CHECK#6 if (obj[3] !== 1) { throw new Test262Error('#6: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[3] === 1. Actual: ' + (obj[3])); } -//CHECK#7 if (obj[4] !== undefined) { throw new Test262Error('#7: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[4] === undefined. Actual: ' + (obj[4])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T3.js index 489baa0019..c930ee4aa7 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T3.js @@ -19,43 +19,35 @@ obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0, -1, 2, 3); -//CHECK#0 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#0: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (obj.length !== 4) { throw new Test262Error('#2: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj.length === 4. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== 2) { throw new Test262Error('#3: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[0] === 2. Actual: ' + (obj[0])); } -//CHECK#4 if (obj[1] !== 3) { throw new Test262Error('#4: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[1] === 3. Actual: ' + (obj[1])); } -//CHECK#5 if (obj[2] !== 0) { throw new Test262Error('#5: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[2] === 0. Actual: ' + (obj[2])); } -//CHECK#6 if (obj[3] !== 1) { throw new Test262Error('#6: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[3] === 1. Actual: ' + (obj[3])); } -//CHECK#7 if (obj[4] !== undefined) { throw new Test262Error('#7: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[4] === undefined. Actual: ' + (obj[4])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T4.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T4.js index 846fe5d702..9d3bc86f71 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T4.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A2_T4.js @@ -21,53 +21,43 @@ obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4, 3, 4, 5); -//CHECK#1 arr.getClass = Object.prototype.toString; if (arr.getClass() !== "[object " + "Array" + "]") { throw new Test262Error('#1: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr is Array object. Actual: ' + (arr.getClass())); } -//CHECK#2 if (arr.length !== 3) { throw new Test262Error('#2: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr.length === 3. Actual: ' + (arr.length)); } -//CHECK#3 if (arr[0] !== 0) { throw new Test262Error('#3: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr[0] === 0. Actual: ' + (arr[0])); } -//CHECK#4 if (arr[1] !== 1) { throw new Test262Error('#4: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr[1] === 1. Actual: ' + (arr[1])); } -//CHECK#5 if (arr[2] !== 2) { throw new Test262Error('#5: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr[2] === 2. Actual: ' + (arr[2])); } -//CHECK#6 if (obj.length !== 3) { throw new Test262Error('#6: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj.length === 3. Actual: ' + (obj.length)); } -//CHECK#7 if (obj[0] !== 4) { throw new Test262Error('#7: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj[0] === 4. Actual: ' + (obj[0])); } -//CHECK#8 if (obj[1] !== 5) { throw new Test262Error('#8: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj[1] === 5. Actual: ' + (obj[1])); } -//CHECK#9 if (obj[2] !== 3) { throw new Test262Error('#9: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj[2] === 3. Actual: ' + (obj[2])); } -//CHECK#10 if (obj[3] !== undefined) { throw new Test262Error('#10: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj[3] === undefined. Actual: ' + (obj[3])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js index 4a14a5c3d3..9d88358e52 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T1.js @@ -14,27 +14,22 @@ obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295, 1); -//CHECK#1 if (arr.length !== 1) { throw new Test262Error('#1: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#2 if (obj.length !== 4294967295) { throw new Test262Error('#2: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj.length === 4294967295. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== "x") { throw new Test262Error('#3: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj[0] === "x". Actual: ' + (obj[0])); } -//CHECK#4 if (obj[4294967295] !== undefined) { throw new Test262Error('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj[4294967295] === undefined. Actual: ' + (obj[4294967295])); } -//CHECK#5 if (arr[0] !== "y") { throw new Test262Error('#5: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); arr[0] === "y". Actual: ' + (arr[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js index 8fb19fe3cf..31dd2cff17 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A3_T3.js @@ -13,22 +13,18 @@ obj[4294967294] = "x"; obj.length = -1; var arr = obj.splice(4294967294, 1); -//CHECK#1 if (arr.length !== 0) { throw new Test262Error('#1: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = -1; var arr = obj.splice(4294967294,1); arr.length === 0. Actual: ' + (arr.length)); } -//CHECK#2 if (arr[0] !== undefined) { throw new Test262Error('#2: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); arr[0] === undefined. Actual: ' + (arr[0])); } -//CHECK#3 if (obj.length !== 0) { throw new Test262Error('#3: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); obj.length === 0. Actual: ' + (obj.length)); } -//CHECK#4 if (obj[4294967294] !== "x") { throw new Test262Error('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = "x"; obj.length = 1; var arr = obj.splice(4294967294,1); obj[4294967294] === "x". Actual: ' + (obj[4294967294])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js index edf2c75630..1f90370aa5 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T1.js @@ -13,32 +13,26 @@ Array.prototype[1] = -1; var x = [0, 1]; var arr = x.splice(1, 1); -//CHECK#1 if (arr.length !== 1) { throw new Test262Error('#1: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#2 if (arr[0] !== 1) { throw new Test262Error('#2: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#3 if (arr[1] !== -1) { throw new Test262Error('#3: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); arr[1] === -1. Actual: ' + (arr[1])); } -//CHECK#4 if (x.length !== 1) { throw new Test262Error('#4: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); x.length === 1. Actual: ' + (x.length)); } -//CHECK#5 if (x[0] !== 0) { throw new Test262Error('#5: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== -1) { throw new Test262Error('#6: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); x[1] === -1. Actual: ' + (x[1])); } @@ -53,32 +47,26 @@ x = { }; var arr = x.splice(1, 1); -//CHECK#7 if (arr.length !== 1) { throw new Test262Error('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#8 if (arr[0] !== 1) { throw new Test262Error('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#9 if (arr[1] !== -1) { throw new Test262Error('#9: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); arr[1] === -1. Actual: ' + (arr[1])); } -//CHECK#10 if (x.length !== 1) { throw new Test262Error('#10: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); x.length === 1. Actual: ' + (x.length)); } -//CHECK#11 if (x[0] !== 0) { throw new Test262Error('#11: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#12 if (x[1] !== -1) { throw new Test262Error('#12: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); x[1] === -1. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T2.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T2.js index 6c3017ff5b..f3c9693b78 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T2.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T2.js @@ -13,32 +13,26 @@ Array.prototype[1] = -1; var x = [0, 1]; var arr = x.splice(1, 1, 2); -//CHECK#1 if (arr.length !== 1) { throw new Test262Error('#1: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#2 if (arr[0] !== 1) { throw new Test262Error('#2: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#3 if (arr[1] !== -1) { throw new Test262Error('#3: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); arr[1] === -1. Actual: ' + (arr[1])); } -//CHECK#4 if (x.length !== 2) { throw new Test262Error('#4: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); x.length === 2. Actual: ' + (x.length)); } -//CHECK#5 if (x[0] !== 0) { throw new Test262Error('#5: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#6 if (x[1] !== 2) { throw new Test262Error('#6: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); x[1] === 2. Actual: ' + (x[1])); } @@ -53,32 +47,26 @@ x = { }; var arr = x.splice(1, 1, 2); -//CHECK#7 if (arr.length !== 1) { throw new Test262Error('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#8 if (arr[0] !== 1) { throw new Test262Error('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); arr[0] === 1. Actual: ' + (arr[0])); } -//CHECK#9 if (arr[1] !== -1) { throw new Test262Error('#9: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); arr[1] === -1. Actual: ' + (arr[1])); } -//CHECK#10 if (x.length !== 2) { throw new Test262Error('#10: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); x.length === 2. Actual: ' + (x.length)); } -//CHECK#11 if (x[0] !== 0) { throw new Test262Error('#11: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#12 if (x[1] !== 2) { throw new Test262Error('#12: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); x[1] === 2. Actual: ' + (x[1])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T3.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T3.js index 09e919ef44..d25151794f 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T3.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A4_T3.js @@ -14,29 +14,24 @@ var x = []; x.length = 1; var arr = x.splice(0, 1); -//CHECK#1 if (arr.length !== 1) { throw new Test262Error('#1: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#2 if (arr[0] !== -1) { throw new Test262Error('#2: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); arr[0] === -1. Actual: ' + (arr[0])); } delete arr[0]; -//CHECK#3 if (arr[0] !== -1) { throw new Test262Error('#3: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); delete arr[0]; arr[0] === -1. Actual: ' + (arr[0])); } -//CHECK#4 if (x.length !== 0) { throw new Test262Error('#4: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); x.length === 0. Actual: ' + (x.length)); } -//CHECK#5 if (x[0] !== -1) { throw new Test262Error('#5: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); x[0] === -1. Actual: ' + (x[0])); } @@ -47,29 +42,24 @@ Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0, 1); -//CHECK#6 if (arr.length !== 1) { throw new Test262Error('#6: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); arr.length === 1. Actual: ' + (arr.length)); } -//CHECK#7 if (arr[0] !== -1) { throw new Test262Error('#7: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); arr[0] === -1. Actual: ' + (arr[0])); } delete arr[0]; -//CHECK#8 if (arr[0] !== -1) { throw new Test262Error('#8: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); delete arr[0]; arr[0] === -1. Actual: ' + (arr[0])); } -//CHECK#9 if (x.length !== 0) { throw new Test262Error('#9: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); x.length === 0. Actual: ' + (x.length)); } -//CHECK#10 if (x[0] !== -1) { throw new Test262Error('#10: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); x[0] === -1. Actual: ' + (x[0])); } diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.7.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.7.js index 8f371d586a..9ab2d60c68 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.7.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.7.js @@ -9,7 +9,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.splice(); diff --git a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A1_T1.js b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A1_T1.js index 81e9153c06..6fd1064e6c 100644 --- a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A1_T1.js +++ b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A1_T1.js @@ -21,7 +21,6 @@ var obj = { var arr = [undefined, obj, null, obj, obj]; arr.toLocaleString(); -//CHECK#1 if (n !== 3) { throw new Test262Error('#1: var n = 0; var obj = {toLocaleString: function() {n++}}; var arr = [undefined, obj, null, obj, obj]; arr.toLocaleString(); n === 3. Actual: ' + (n)); } diff --git a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A3_T1.js b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A3_T1.js index d944bf2d14..454b9a92d1 100644 --- a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A3_T1.js +++ b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A3_T1.js @@ -8,7 +8,6 @@ es5id: 15.4.4.3_A3_T1 description: "[[Prototype]] of Array instance is Array.prototype" ---*/ -//CHECK#1 var n = 0; var obj = { toLocaleString: function() { diff --git a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.7.js b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.7.js index 79b666dafc..41957c8ab0 100644 --- a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.7.js +++ b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.7.js @@ -10,7 +10,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.toLocaleString(); diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T1.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T1.js index 3ae6fc4b9f..dc3c067dbd 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T1.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T1.js @@ -10,7 +10,6 @@ es5id: 15.4.4.2_A1_T1 description: If Result(2) is zero, return the empty string ---*/ -//CHECK#1 var x = new Array(); if (x.toString() !== x.join()) { throw new Test262Error('#1.1: x = new Array(); x.toString() === x.join(). Actual: ' + (x.toString())); @@ -20,7 +19,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#2 x = []; x[0] = 1; x.length = 0; diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T2.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T2.js index c823ae7fd2..f37c295967 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T2.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T2.js @@ -14,7 +14,6 @@ description: > the separator ---*/ -//CHECK#1 var x = new Array(0, 1, 2, 3); if (x.toString() !== x.join()) { throw new Test262Error('#1.1: x = new Array(0,1,2,3); x.toString() === x.join(). Actual: ' + (x.toString())); @@ -24,7 +23,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#2 x = []; x[0] = 0; x[3] = 3; @@ -36,7 +34,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#3 x = Array(undefined, 1, null, 3); if (x.toString() !== x.join()) { throw new Test262Error('#3.1: x = Array(undefined,1,null,3); x.toString() === x.join(). Actual: ' + (x.toString())); @@ -46,7 +43,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#4 x = []; x[0] = 0; if (x.toString() !== x.join()) { diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T3.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T3.js index 4ba9f86dee..63dbaef011 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T3.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T3.js @@ -10,7 +10,6 @@ es5id: 15.4.4.2_A1_T3 description: Operator use ToString from array arguments ---*/ -//CHECK#0 var x = new Array("", "", ""); if (x.toString() !== x.join()) { throw new Test262Error('#0.1: var x = new Array("","",""); x.toString() === x.join(). Actual: ' + (x.toString())); @@ -20,7 +19,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#1 var x = new Array("\\", "\\", "\\"); if (x.toString() !== x.join()) { throw new Test262Error('#1.1: var x = new Array("\\","\\","\\"); x.toString() === x.join(). Actual: ' + (x.toString())); @@ -30,7 +28,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#2 var x = new Array("&", "&", "&"); if (x.toString() !== x.join()) { throw new Test262Error('#2.1: var x = new Array("&", "&", "&"); x.toString() === x.join(). Actual: ' + (x.toString())); @@ -40,7 +37,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#3 var x = new Array(true, true, true); if (x.toString() !== x.join()) { throw new Test262Error('#3.1: var x = new Array(true,true,true); x.toString(true,true,true) === x.join(). Actual: ' + (x.toString(true, true, true))); @@ -50,7 +46,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#4 var x = new Array(null, null, null); if (x.toString() !== x.join()) { throw new Test262Error('#4.1: var x = new Array(null,null,null); x.toString(null,null,null) === x.join(). Actual: ' + (x.toString(null, null, null))); @@ -60,7 +55,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#5 var x = new Array(undefined, undefined, undefined); if (x.toString() !== x.join()) { throw new Test262Error('#5.1: var x = new Array(undefined,undefined,undefined); x.toString(undefined,undefined,undefined) === x.join(). Actual: ' + (x.toString(undefined, undefined, undefined))); @@ -70,7 +64,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#6 var x = new Array(Infinity, Infinity, Infinity); if (x.toString() !== x.join()) { throw new Test262Error('#6.1: var x = new Array(Infinity,Infinity,Infinity); x.toString(Infinity,Infinity,Infinity) === x.join(). Actual: ' + (x.toString(Infinity, Infinity, Infinity))); @@ -80,7 +73,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#7 var x = new Array(NaN, NaN, NaN); if (x.toString() !== x.join()) { throw new Test262Error('#7.1: var x = new Array(NaN,NaN,NaN); x.toString(NaN,NaN,NaN) === x.join(). Actual: ' + (x.toString(NaN, NaN, NaN))); diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js index e9a47390ce..dc564c901e 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js @@ -10,7 +10,6 @@ es5id: 15.4.4.2_A1_T4 description: If Type(value) is Object, evaluate ToPrimitive(value, String) ---*/ -//CHECK#1 var object = { valueOf: function() { return "+" @@ -25,7 +24,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#2 var object = { valueOf: function() { return "+" @@ -43,7 +41,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#3 var object = { valueOf: function() { return "+" @@ -61,7 +58,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#4 try { var object = { valueOf: function() { @@ -88,7 +84,6 @@ catch (e) { } } -//CHECK#5 var object = { toString: function() { return "*" @@ -103,7 +98,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#6 var object = { valueOf: function() { return {} @@ -121,7 +115,6 @@ if (x.toString() !== x.join()) { } } -//CHECK#7 try { var object = { valueOf: function() { @@ -141,7 +134,6 @@ catch (e) { } } -//CHECK#8 try { var object = { valueOf: function() { diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A3_T1.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A3_T1.js index a37cf4c575..98296a0ff8 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A3_T1.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A3_T1.js @@ -8,7 +8,6 @@ es5id: 15.4.4.2_A3_T1 description: "[[Prototype]] of Array instance is Array.prototype" ---*/ -//CHECK#1 Array.prototype[1] = 1; var x = [0]; x.length = 2; diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.7.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.7.js index e04240efb5..8922c434fd 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.7.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.7.js @@ -10,7 +10,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.toString(); diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A1_T1.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A1_T1.js index fb11e5138c..d28ec0536c 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A1_T1.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A1_T1.js @@ -10,46 +10,38 @@ esid: sec-array.prototype.unshift description: Checking case when unsift is given no arguments or one argument ---*/ -//CHECK#1 var x = new Array(); var unshift = x.unshift(1); if (unshift !== 1) { throw new Test262Error('#1: x = new Array(); x.unshift(1) === 1. Actual: ' + (unshift)); } -//CHECK#2 if (x[0] !== 1) { throw new Test262Error('#2: x = new Array(); x.unshift(1); x[0] === 1. Actual: ' + (x[0])); } -//CHECK#3 var unshift = x.unshift(); if (unshift !== 1) { throw new Test262Error('#3: x = new Array(); x.unshift(1); x.unshift() === 1. Actual: ' + (unshift)); } -//CHECK#4 if (x[1] !== undefined) { throw new Test262Error('#4: x = new Array(); x.unshift(1); x.unshift(); x[1] === unedfined. Actual: ' + (x[1])); } -//CHECK#5 var unshift = x.unshift(-1); if (unshift !== 2) { throw new Test262Error('#5: x = new Array(); x.unshift(1); x.unshift(); x.unshift(-1) === 2. Actual: ' + (unshift)); } -//CHECK#6 if (x[0] !== -1) { throw new Test262Error('#6: x = new Array(); x.unshift(1); x.unshift(-1); x[0] === -1. Actual: ' + (x[0])); } -//CHECK#7 if (x[1] !== 1) { throw new Test262Error('#7: x = new Array(); x.unshift(1); x.unshift(-1); x[1] === 1. Actual: ' + (x[1])); } -//CHECK#8 if (x.length !== 2) { throw new Test262Error('#8: x = new Array(); x.unshift(1); x.unshift(); x.unshift(-1); x.length === 2. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A1_T2.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A1_T2.js index 195acdfe9d..2fa77cc286 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A1_T2.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A1_T2.js @@ -10,50 +10,41 @@ esid: sec-array.prototype.unshift description: Checking case when unsift is given many arguments ---*/ -//CHECK#1 var x = []; if (x.length !== 0) { throw new Test262Error('#1: x = []; x.length === 0. Actual: ' + (x.length)); } -//CHECK#2 x[0] = 0; var unshift = x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); if (unshift !== 6) { throw new Test262Error('#2: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1) === 6. Actual: ' + (unshift)); } -//CHECK#3 if (x[5] !== 0) { throw new Test262Error('#3: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[5] === 0. Actual: ' + (x[5])); } -//CHECK#4 if (x[0] !== true) { throw new Test262Error('#4: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[0] === true. Actual: ' + (x[0])); } -//CHECK#5 if (x[1] !== Number.POSITIVE_INFINITY) { throw new Test262Error('#5: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[1] === Number.POSITIVE_INFINITY. Actual: ' + (x[1])); } -//CHECK#6 if (x[2] !== "NaN") { throw new Test262Error('#6: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[2] === "NaN". Actual: ' + (x[2])); } -//CHECK#7 if (x[3] !== "1") { throw new Test262Error('#7: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[3] === "1". Actual: ' + (x[3])); } -//CHECK#8 if (x[4] !== -1) { throw new Test262Error('#8: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x[4] === -1. Actual: ' + (x[4])); } -//CHECK#9 if (x.length !== 6) { throw new Test262Error('#9: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, "NaN", "1", -1); x.length === 6. Actual: ' + (x.length)); } diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T1.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T1.js index 2a2850f867..0b9f050201 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T1.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T1.js @@ -18,51 +18,42 @@ obj.unshift = Array.prototype.unshift; if (obj.length !== undefined) { throw new Test262Error('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length)); } else { - //CHECK#1 - var unshift = obj.unshift(-1); + var unshift = obj.unshift(-1); if (unshift !== 1) { throw new Test262Error('#1: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1) === 1. Actual: ' + (unshift)); } - //CHECK#2 - if (obj.length !== 1) { + if (obj.length !== 1) { throw new Test262Error('#2: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj.length === 1. Actual: ' + (obj.length)); } - //CHECK#3 - if (obj["0"] !== -1) { + if (obj["0"] !== -1) { throw new Test262Error('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj["0"] === -1. Actual: ' + (obj["0"])); } } -//CHECK#4 obj.length = undefined; var unshift = obj.unshift(-4); if (unshift !== 1) { throw new Test262Error('#4: var obj = {}; obj.length = undefined; obj.unshift = Array.prototype.unshift; obj.unshift(-4) === 1. Actual: ' + (unshift)); } -//CHECK#5 if (obj.length !== 1) { throw new Test262Error('#5: var obj = {}; obj.length = undefined; obj.unshift = Array.prototype.unshift; obj.unshift(-4); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#6 if (obj["0"] !== -4) { throw new Test262Error('#6: var obj = {}; obj.length = undefined; obj.unshift = Array.prototype.unshift; obj.unshift(-4); obj["0"] === -4. Actual: ' + (obj["0"])); } -//CHECK#7 obj.length = null var unshift = obj.unshift(-7); if (unshift !== 1) { throw new Test262Error('#7: var obj = {}; obj.length = null; obj.unshift = Array.prototype.unshift; obj.unshift(-7) === 1. Actual: ' + (unshift)); } -//CHECK#8 if (obj.length !== 1) { throw new Test262Error('#8: var obj = {}; obj.length = null; obj.unshift = Array.prototype.unshift; obj.unshift(-7); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#9 if (obj["0"] !== -7) { throw new Test262Error('#9: var obj = {}; obj.length = null; obj.unshift = Array.prototype.unshift; obj.unshift(-7); obj["0"] === -7. Actual: ' + (obj["0"])); } diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T2.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T2.js index 6482cc77ce..7698a2b785 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T2.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T2.js @@ -15,87 +15,72 @@ description: > var obj = {}; obj.unshift = Array.prototype.unshift; -//CHECK#1 obj.length = NaN; var unshift = obj.unshift(-1); if (unshift !== 1) { throw new Test262Error('#1: var obj = {}; obj.length = NaN; obj.unshift = Array.prototype.unshift; obj.unshift(-1) === 1. Actual: ' + (unshift)); } -//CHECK#2 if (obj.length !== 1) { throw new Test262Error('#2: var obj = {}; obj.length = NaN; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#3 if (obj["0"] !== -1) { throw new Test262Error('#3: var obj = {}; obj.length = NaN; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj["0"] === -1. Actual: ' + (obj["0"])); } -//CHECK#7 obj.length = Number.NEGATIVE_INFINITY; var unshift = obj.unshift(-7); if (unshift !== 1) { throw new Test262Error('#7: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.unshift = Array.prototype.unshift; obj.unshift(-7) === 1. Actual: ' + (unshift)); } -//CHECK#8 if (obj.length !== 1) { throw new Test262Error('#8: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.unshift = Array.prototype.unshift; obj.unshift(-7); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#9 if (obj["0"] !== -7) { throw new Test262Error('#9: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.unshift = Array.prototype.unshift; obj.unshift(-7); obj["0"] === -7. Actual: ' + (obj["0"])); } -//CHECK#10 obj.length = 0.5; var unshift = obj.unshift(-10); if (unshift !== 1) { throw new Test262Error('#10: var obj = {}; obj.length = 0.5; obj.unshift = Array.prototype.unshift; obj.unshift(-10) === 1. Actual: ' + (unshift)); } -//CHECK#11 if (obj.length !== 1) { throw new Test262Error('#11: var obj = {}; obj.length = 0.5; obj.unshift = Array.prototype.unshift; obj.unshift(-10); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#12 if (obj["0"] !== -10) { throw new Test262Error('#12: var obj = {}; obj.length = 0.5; obj.unshift = Array.prototype.unshift; obj.unshift(-10); obj["0"] === -10. Actual: ' + (obj["0"])); } -//CHECK#13 obj.length = 1.5; var unshift = obj.unshift(-13); if (unshift !== 2) { throw new Test262Error('#13: var obj = {}; obj.length = 1.5; obj.unshift = Array.prototype.unshift; obj.unshift(-13) === 2. Actual: ' + (unshift)); } -//CHECK#14 if (obj.length !== 2) { throw new Test262Error('#14: var obj = {}; obj.length = 1.5; obj.unshift = Array.prototype.unshift; obj.unshift(-13); obj.length === 2. Actual: ' + (obj.length)); } -//CHECK#15 if (obj["0"] !== -13) { throw new Test262Error('#15: var obj = {}; obj.length = 1.5; obj.unshift = Array.prototype.unshift; obj.unshift(-13); obj["0"] === -13. Actual: ' + (obj["0"])); } -//CHECK#16 obj.length = new Number(0); var unshift = obj.unshift(-16); if (unshift !== 1) { throw new Test262Error('#16: var obj = {}; obj.length = new Number(0); obj.unshift = Array.prototype.unshift; obj.unshift(-16) === 1. Actual: ' + (unshift)); } -//CHECK#17 if (obj.length !== 1) { throw new Test262Error('#17: var obj = {}; obj.length = new Number(0); obj.unshift = Array.prototype.unshift; obj.unshift(-16); obj.length === 1. Actual: ' + (obj.length)); } -//CHECK#18 if (obj["0"] !== -16) { throw new Test262Error('#18: var obj = {}; obj.length = new Number(0); obj.unshift = Array.prototype.unshift; obj.unshift(-16); obj["0"] === -16. Actual: ' + (obj["0"])); } diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js index 16028bea16..7a1da8898f 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js @@ -14,7 +14,6 @@ description: > var obj = {}; obj.unshift = Array.prototype.unshift; -//CHECK#1 obj.length = { valueOf: function() { return 3 @@ -25,7 +24,6 @@ if (unshift !== 3) { throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}} obj.unshift() === 3. Actual: ' + (unshift)); } -//CHECK#2 obj.length = { valueOf: function() { return 3 @@ -39,7 +37,6 @@ if (unshift !== 3) { throw new Test262Error('#0: obj.length = {valueOf: function() {return 3}, toString: function() {return 1}} obj.unshift() === 3. Actual: ' + (unshift)); } -//CHECK#3 obj.length = { valueOf: function() { return 3 @@ -53,7 +50,6 @@ if (unshift !== 3) { throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.unshift() === 3. Actual: ' + (unshift)); } -//CHECK#4 try { obj.length = { valueOf: function() { @@ -76,7 +72,6 @@ catch (e) { } } -//CHECK#5 obj.length = { toString: function() { return 1 @@ -87,7 +82,6 @@ if (unshift !== 1) { throw new Test262Error('#5: obj.length = {toString: function() {return 1}} obj.unshift() === 1. Actual: ' + (unshift)); } -//CHECK#6 obj.length = { valueOf: function() { return {} @@ -101,7 +95,6 @@ if (unshift !== 1) { throw new Test262Error('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} obj.unshift() === 1. Actual: ' + (unshift)); } -//CHECK#7 try { obj.length = { @@ -121,7 +114,6 @@ catch (e) { } } -//CHECK#8 try { obj.length = { diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js index 2016605a8c..f0061ec1df 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A3_T2.js @@ -12,33 +12,27 @@ obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; -//CHECK#1 var unshift = obj.unshift("x", "y", "z"); if (unshift !== 3) { throw new Test262Error('#1: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z") === 3. Actual: ' + (unshift)); } -//CHECK#2 if (obj.length !== 3) { throw new Test262Error('#2: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj.length === 3. Actual: ' + (obj.length)); } -//CHECK#3 if (obj[0] !== "x") { throw new Test262Error('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[0] === "x". Actual: ' + (obj[0])); } -//CHECK#4 if (obj[1] !== "y") { throw new Test262Error('#4: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[1] === "y". Actual: ' + (obj[1])); } -//CHECK#5 if (obj[2] !== "z") { throw new Test262Error('#5: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[2] === "z". Actual: ' + (obj[2])); } -//CHECK#6 if (obj[3] !== undefined) { throw new Test262Error('#6: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = ""; obj.length = -4294967295; obj.unshift("x", "y", "z"); obj[3] === undefined. Actual: ' + (obj[3])); } diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js index 540b2255dd..35576f1b61 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T1.js @@ -13,25 +13,21 @@ Array.prototype[0] = -1; var x = [1]; x.length = 1; -//CHECK#1 var unshift = x.unshift(0); if (unshift !== 2) { throw new Test262Error('#1: Array.prototype[0] = -1; x = [1]; x.length = 1; x.unshift(0) === 2. Actual: ' + (unshift)); } -//CHECK#2 if (x[0] !== 0) { throw new Test262Error('#2: Array.prototype[0] = -1; x = [1]; x.length = 1; x.unshift(0); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== 1) { throw new Test262Error('#3: Array.prototype[0] = -1; x = [1]; x.length = 1; x.unshift(0); x[1] === 1. Actual: ' + (x[1])); } delete x[0]; -//CHECK#4 if (x[0] !== -1) { throw new Test262Error('#4: Array.prototype[0] = -1; x = [1]; x.length = 1; x.unshift(0); delete x[0]; x[0] === -1. Actual: ' + (x[0])); } @@ -43,35 +39,29 @@ x = { 0: 1 }; -//CHECK#5 var unshift = x.unshift(0); if (unshift !== 2) { throw new Test262Error('#5: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0) === 2. Actual: ' + (unshift)); } -//CHECK#6 if (x[0] !== 0) { throw new Test262Error('#6: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#7 if (x[1] !== 1) { throw new Test262Error('#7: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); x[1] === 1. Actual: ' + (x[1])); } delete x[0]; -//CHECK#8 if (x[0] !== -1) { throw new Test262Error('#8: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); delete x[0]; x[0] === -1. Actual: ' + (x[0])); } -//CHECK#9 if (x.length !== 2) { throw new Test262Error('#9: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); x.length === 1. Actual: ' + (x.length)); } -//CHECK#10 delete x.length; if (x.length !== 1) { throw new Test262Error('#10: Object.prototype[1] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); delete x; x.length === 1. Actual: ' + (x.length)); diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T2.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T2.js index 33ea389ce9..09d57847bb 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T2.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A4_T2.js @@ -13,25 +13,21 @@ Array.prototype[0] = 1; var x = []; x.length = 1; -//CHECK#1 var unshift = x.unshift(0); if (unshift !== 2) { throw new Test262Error('#1: Array.prototype[0] = 1; x = []; x.length = 1; x.unshift(0) === 2. Actual: ' + (unshift)); } -//CHECK#2 if (x[0] !== 0) { throw new Test262Error('#2: Array.prototype[0] = 1; x = []; x.length = 1; x.unshift(0); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#3 if (x[1] !== 1) { throw new Test262Error('#3: Array.prototype[0] = 1; x = []; x.length = 1; x.unshift(0); x[1] === 1. Actual: ' + (x[1])); } delete x[0]; -//CHECK#4 if (x[0] !== 1) { throw new Test262Error('#4: Array.prototype[0] = 1; x = [1]; x.length = 1; x.unshift(0); delete x[0]; x[0] === 1. Actual: ' + (x[0])); } @@ -41,35 +37,29 @@ Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; -//CHECK#5 var unshift = x.unshift(0); if (unshift !== 2) { throw new Test262Error('#5: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0) === 2. Actual: ' + (unshift)); } -//CHECK#6 if (x[0] !== 0) { throw new Test262Error('#6: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); x[0] === 0. Actual: ' + (x[0])); } -//CHECK#7 if (x[1] !== 1) { throw new Test262Error('#7: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); x[1] === 1. Actual: ' + (x[1])); } delete x[0]; -//CHECK#8 if (x[0] !== 1) { throw new Test262Error('#8: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); delete x[0]; x[0] === 1. Actual: ' + (x[0])); } -//CHECK#9 if (x.length !== 2) { throw new Test262Error('#9: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); x.length === 1. Actual: ' + (x.length)); } -//CHECK#10 delete x.length; if (x.length !== 1) { throw new Test262Error('#10: Object.prototype[1] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); delete x; x.length === 1. Actual: ' + (x.length)); diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.7.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.7.js index 931e90b574..ed3bf22d78 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.7.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.7.js @@ -9,7 +9,6 @@ description: > throw a TypeError exception ---*/ -//CHECK#1 try { new Array.prototype.unshift(); From 21e627b35daa98ba7f725a3565cf54f31ab57b5e Mon Sep 17 00:00:00 2001 From: rwaldron Date: Wed, 11 Aug 2021 10:42:40 -0400 Subject: [PATCH 2/2] Transform legacy format to harness assertions --- .../Array/prototype/join/S15.4.4.5_A2_T4.js | 98 +++++--------- .../Array/prototype/join/S15.4.4.5_A3.1_T2.js | 107 ++++++++------- .../Array/prototype/join/S15.4.4.5_A3.2_T2.js | 42 ++---- .../Array/prototype/join/S15.4.4.5_A6.7.js | 11 +- .../Array/prototype/pop/S15.4.4.6_A2_T4.js | 74 ++++------- .../Array/prototype/pop/S15.4.4.6_A5.7.js | 11 +- .../Array/prototype/push/S15.4.4.7_A2_T3.js | 75 ++++------- .../Array/prototype/push/S15.4.4.7_A3.js | 21 ++- .../Array/prototype/push/S15.4.4.7_A6.7.js | 11 +- .../Array/prototype/reverse/S15.4.4.8_A5.7.js | 11 +- .../Array/prototype/shift/S15.4.4.9_A2_T5.js | 74 ++++------- .../Array/prototype/shift/S15.4.4.9_A5.7.js | 11 +- .../Array/prototype/slice/S15.4.4.10_A3_T1.js | 24 ++-- .../Array/prototype/slice/S15.4.4.10_A3_T2.js | 23 ++-- .../Array/prototype/slice/S15.4.4.10_A5.7.js | 11 +- .../Array/prototype/sort/S15.4.4.11_A5_T1.js | 17 +-- .../Array/prototype/sort/S15.4.4.11_A7.7.js | 11 +- .../Array/prototype/splice/S15.4.4.12_A5.7.js | 11 +- .../toLocaleString/S15.4.4.3_A4.7.js | 11 +- .../prototype/toString/S15.4.4.2_A1_T4.js | 125 +++++------------- .../prototype/toString/S15.4.4.2_A4.7.js | 11 +- .../prototype/unshift/S15.4.4.13_A2_T3.js | 74 ++++------- .../prototype/unshift/S15.4.4.13_A5.7.js | 11 +- 23 files changed, 320 insertions(+), 555 deletions(-) diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js index 3c1fa2d431..b84d697950 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A2_T4.js @@ -15,112 +15,80 @@ var obj = {}; obj.join = Array.prototype.join; obj.length = { - valueOf: function() { + valueOf() { return 3 } }; -if (obj.join() !== ",,") { - throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}} obj.join() === ",,". Actual: ' + (obj.join())); -} +assert.sameValue(obj.join(), ",,", 'obj.join() must return ",,"'); obj.length = { - valueOf: function() { + valueOf() { return 3 }, - toString: function() { + toString() { return 2 } }; -if (obj.join() !== ",,") { - throw new Test262Error('#2: obj.length = {valueOf: function() {return 3}, toString: function() {return 2}} obj.join() === ",,". Actual: ' + (obj.join())); -} +assert.sameValue(obj.join(), ",,", 'obj.join() must return ",,"'); obj.length = { - valueOf: function() { + valueOf() { return 3 }, - toString: function() { + toString() { return {} } }; -if (obj.join() !== ",,") { - throw new Test262Error('#3: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.join() === ",,". Actual: ' + (obj.join())); -} - -try { - obj.length = { - valueOf: function() { - return 3 - }, - toString: function() { - throw "error" - } - }; - if (obj.join() !== ",,") { - throw new Test262Error('#4.1: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.join() === ",". Actual: ' + (obj.join())); - } -} -catch (e) { - if (e === "error") { - throw new Test262Error('#4.2: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.join() not throw "error"'); - } else { - throw new Test262Error('#4.3: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.join() not throw Error. Actual: ' + (e)); - } -} +assert.sameValue(obj.join(), ",,", 'obj.join() must return ",,"'); obj.length = { - toString: function() { + valueOf() { + return 3 + }, + toString() { + throw new Test262Error(); + } +}; +assert.sameValue(obj.join(), ",,", 'obj.join() must return ",,"'); + +obj.length = { + toString() { return 2 } }; -if (obj.join() !== ",") { - throw new Test262Error('#5: obj.length = {toString: function() {return 2}} obj.join() === ",". Actual: ' + (obj.join())); -} +assert.sameValue(obj.join(), ",", 'obj.join() must return ","'); obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return 2 } } -if (obj.join() !== ",") { - throw new Test262Error('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 2}} obj.join() === ",". Actual: ' + (obj.join())); -} +assert.sameValue(obj.join(), ",", 'obj.join() must return ","'); -try { +assert.throws(Test262Error, () => { obj.length = { - valueOf: function() { - throw "error" + valueOf() { + throw new Test262Error(); }, - toString: function() { + toString() { return 2 } }; obj.join(); - throw new Test262Error('#7.1: obj.length = {valueOf: function() {throw "error"}, toString: function() {return 2}}; obj.join() throw "error". Actual: ' + (obj.join())); -} -catch (e) { - if (e !== "error") { - throw new Test262Error('#7.2: obj.length = {valueOf: function() {throw "error"}, toString: function() {return 2}}; obj.join() throw "error". Actual: ' + (e)); - } -} +}); -try { +assert.throws(TypeError, () => { obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return {} } }; obj.join(); - throw new Test262Error('#8.1: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.join() throw TypeError. Actual: ' + (obj.join())); -} -catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#8,2: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.join() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js index c7ee77ad80..213011db07 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.1_T2.js @@ -11,127 +11,134 @@ description: > var x = new Array(0, 1, 2, 3); var object = { - valueOf: function() { + valueOf() { return "+" } }; -if (x.join(object) !== "0[object Object]1[object Object]2[object Object]3") { - throw new Test262Error('#1: var object = {valueOf: function() {return "+"}}; x.join(object) === "0[object Object]1[object Object]2[object Object]3". Actual: ' + (x.join(object))); -} + +assert.sameValue( + x.join(object), + "0[object Object]1[object Object]2[object Object]3", + 'x.join({valueOf() {return "+"}}) must return "0[object Object]1[object Object]2[object Object]3"' +); var object = { - valueOf: function() { + valueOf() { return "+" }, - toString: function() { + toString() { return "*" } }; -if (x.join(object) !== "0*1*2*3") { - throw new Test262Error('#2: var object = {valueOf: function() {return "+"}, toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); -} + +assert.sameValue( + x.join(object), + "0*1*2*3", + 'x.join("{valueOf() {return "+"}, toString() {return "*"}}) must return "0*1*2*3"' +); var object = { - valueOf: function() { + valueOf() { return "+" }, - toString: function() { + toString() { return {} } }; -if (x.join(object) !== "0+1+2+3") { - throw new Test262Error('#3: var object = {valueOf: function() {return "+"}, toString: function() {return {}}}; x.join(object) === "0+1+2+3". Actual: ' + (x.join(object))); -} + +assert.sameValue( + x.join(object), + "0+1+2+3", + 'x.join({valueOf() {return "+"}, toString() {return {}}}) must return "0+1+2+3"' +); try { var object = { - valueOf: function() { + valueOf() { throw "error" }, - toString: function() { + toString() { return "*" } }; - if (x.join(object) !== "0*1*2*3") { - throw new Test262Error('#4.1: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); - } + + assert.sameValue( + x.join(object), + "0*1*2*3", + 'x.join("{valueOf() {throw "error"}, toString() {return "*"}}) must return "0*1*2*3"' + ); } catch (e) { - if (e === "error") { - throw new Test262Error('#4.2: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}}; x.join(object) not throw "error"'); - } else { - throw new Test262Error('#4.3: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}}; x.join(object) not throw Error. Actual: ' + (e)); - } + assert.notSameValue(e, "error", 'The value of e is not "error"'); } var object = { - toString: function() { + toString() { return "*" } }; -if (x.join(object) !== "0*1*2*3") { - throw new Test262Error('#5: var object = {toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); -} +assert.sameValue(x.join(object), "0*1*2*3", 'x.join({toString() {return "*"}}) must return "0*1*2*3"'); var object = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return "*" } } -if (x.join(object) !== "0*1*2*3") { - throw new Test262Error('#6: var object = {valueOf: function() {return {}}, toString: function() {return "*"}}; x.join(object) === "0*1*2*3". Actual: ' + (x.join(object))); -} + +assert.sameValue( + x.join(object), + "0*1*2*3", + 'x.join({valueOf() {return {}}, toString() {return "*"}}) must return "0*1*2*3"' +); try { var object = { - valueOf: function() { + valueOf() { return "+" }, - toString: function() { + toString() { throw "error" } }; x.join(object); - throw new Test262Error('#7.1: var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}}; x.join(object) throw "error". Actual: ' + (x.join(object))); + throw new Test262Error('#7.1: var object = {valueOf() {return "+"}, toString() {throw "error"}}; x.join(object) throw "error". Actual: ' + (x.join(object))); } catch (e) { - if (e !== "error") { - throw new Test262Error('#7.2: var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}}; x.join(object) throw "error". Actual: ' + (e)); - } + assert.sameValue(e, "error", 'The value of e is expected to be "error"'); } try { var object = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return {} } }; x.join(object); - throw new Test262Error('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x.join(object) throw TypeError. Actual: ' + (x.join(object))); + throw new Test262Error('#8.1: var object = {valueOf() {return {}}, toString() {return {}}}; x.join(object) throw TypeError. Actual: ' + (x.join(object))); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x.join(object) throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } try { var object = { - toString: function() { + toString() { throw "error" } }; [].join(object); - throw new Test262Error('#9.1: var object = {toString: function() {throw "error"}}; [].join(object) throw "error". Actual: ' + ([].join(object))); + throw new Test262Error('#9.1: var object = {toString() {throw "error"}}; [].join(object) throw "error". Actual: ' + ([].join(object))); } catch (e) { - if (e !== "error") { - throw new Test262Error('#9.2: var object = {toString: function() {throw "error"}}; [].join(object) throw "error". Actual: ' + (e)); - } + assert.sameValue(e, "error", 'The value of e is expected to be "error"'); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js index 2ea887456b..b6575d611d 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A3.2_T2.js @@ -13,9 +13,7 @@ var object = { } }; var x = new Array(object); -if (x.join() !== "[object Object]") { - throw new Test262Error('#1: var object = {valueOf: function() {return "+"}} var x = new Array(object); x.join() === "[object Object]". Actual: ' + (x.join())); -} +assert.sameValue(x.join(), "[object Object]", 'x.join() must return "[object Object]"'); var object = { valueOf: function() { @@ -26,9 +24,7 @@ var object = { } }; var x = new Array(object); -if (x.join() !== "*") { - throw new Test262Error('#2: var object = {valueOf: function() {return "+"}, toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); -} +assert.sameValue(x.join(), "*", 'x.join() must return "*"'); var object = { valueOf: function() { @@ -39,9 +35,7 @@ var object = { } }; var x = new Array(object); -if (x.join() !== "+") { - throw new Test262Error('#3: var object = {valueOf: function() {return "+"}, toString: function() {return {}}} var x = new Array(object); x.join() === "+". Actual: ' + (x.join())); -} +assert.sameValue(x.join(), "+", 'x.join() must return "+"'); try { var object = { @@ -53,16 +47,10 @@ try { } }; var x = new Array(object); - if (x.join() !== "*") { - throw new Test262Error('#4.1: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); - } + assert.sameValue(x.join(), "*", 'x.join() must return "*"'); } catch (e) { - if (e === "error") { - throw new Test262Error('#4.2: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}} var x = new Array(object); x.join() not throw "error"'); - } else { - throw new Test262Error('#4.3: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}} var x = new Array(object); x.join() not throw Error. Actual: ' + (e)); - } + assert.notSameValue(e, "error", 'The value of e is not "error"'); } var object = { @@ -71,9 +59,7 @@ var object = { } }; var x = new Array(object); -if (x.join() !== "*") { - throw new Test262Error('#5: var object = {toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); -} +assert.sameValue(x.join(), "*", 'x.join() must return "*"'); var object = { valueOf: function() { @@ -84,9 +70,7 @@ var object = { } } var x = new Array(object); -if (x.join() !== "*") { - throw new Test262Error('#6: var object = {valueOf: function() {return {}}, toString: function() {return "*"}} var x = new Array(object); x.join() === "*". Actual: ' + (x.join())); -} +assert.sameValue(x.join(), "*", 'x.join() must return "*"'); try { var object = { @@ -102,9 +86,7 @@ try { throw new Test262Error('#7.1: var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}} var x = new Array(object); x.join() throw "error". Actual: ' + (x.join())); } catch (e) { - if (e !== "error") { - throw new Test262Error('#7.2: var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}} var x = new Array(object); x.join() throw "error". Actual: ' + (e)); - } + assert.sameValue(e, "error", 'The value of e is expected to be "error"'); } try { @@ -121,7 +103,9 @@ try { throw new Test262Error('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.join() throw TypeError. Actual: ' + (x.join())); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.join() throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } diff --git a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.7.js b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.7.js index 8559cbec7b..8ff58d4dfb 100644 --- a/test/built-ins/Array/prototype/join/S15.4.4.5_A6.7.js +++ b/test/built-ins/Array/prototype/join/S15.4.4.5_A6.7.js @@ -9,12 +9,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.join(); - throw new Test262Error('#1.1: new Array.prototype.join() throw TypeError. Actual: ' + (new Array.prototype.join())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.join() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js index 82b7c4dbd7..e372029475 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A2_T4.js @@ -16,125 +16,109 @@ obj.pop = Array.prototype.pop; obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return 1 } }; var pop = obj.pop(); -if (pop !== -1) { - throw new Test262Error('#1: obj[0] = -1; obj.length = {valueOf: function() {return 1}} obj.pop() === -1. Actual: ' + (pop)); -} +assert.sameValue(pop, -1, 'The value of pop is expected to be -1'); obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return 1 }, - toString: function() { + toString() { return 0 } }; var pop = obj.pop(); -if (pop !== -1) { - throw new Test262Error('#0: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return 0}} obj.pop() === -1. Actual: ' + (pop)); -} +assert.sameValue(pop, -1, 'The value of pop is expected to be -1'); obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return 1 }, - toString: function() { + toString() { return {} } }; var pop = obj.pop(); -if (pop !== -1) { - throw new Test262Error('#3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return {}}} obj.pop() === -1. Actual: ' + (pop)); -} +assert.sameValue(pop, -1, 'The value of pop is expected to be -1'); try { obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return 1 }, - toString: function() { + toString() { throw "error" } }; var pop = obj.pop(); - if (pop !== -1) { - throw new Test262Error('#4.1: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; obj.pop() === ",". Actual: ' + (pop)); - } + assert.sameValue(pop, -1, 'The value of pop is expected to be -1'); } catch (e) { - if (e === "error") { - throw new Test262Error('#4.2: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; obj.pop() not throw "error"'); - } else { - throw new Test262Error('#4.3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; obj.pop() not throw Error. Actual: ' + (e)); - } + assert.notSameValue(e, "error", 'The value of e is not "error"'); } obj[0] = -1; obj.length = { - toString: function() { + toString() { return 0 } }; var pop = obj.pop(); -if (pop !== undefined) { - throw new Test262Error('#5: obj[0] = -1; obj.length = {toString: function() {return 0}} obj.pop() === undefined. Actual: ' + (pop)); -} +assert.sameValue(pop, undefined, 'The value of pop is expected to equal undefined'); obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return 0 } } var pop = obj.pop(); -if (pop !== undefined) { - throw new Test262Error('#6: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} obj.pop() === undefined. Actual: ' + (pop)); -} +assert.sameValue(pop, undefined, 'The value of pop is expected to equal undefined'); try { obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { throw "error" }, - toString: function() { + toString() { return 0 } }; var pop = obj.pop(); - throw new Test262Error('#7.1: obj[0] = -1; obj.length = {valueOf: function() {throw "error"}, toString: function() {return 0}}; obj.pop() throw "error". Actual: ' + (pop)); + throw new Test262Error('#7.1: obj[0] = -1; obj.length = {valueOf() {throw "error"}, toString() {return 0}}; obj.pop() throw "error". Actual: ' + (pop)); } catch (e) { - if (e !== "error") { - throw new Test262Error('#7.2: obj[0] = -1; obj.length = {valueOf: function() {throw "error"}, toString: function() {return 0}}; obj.pop() throw "error". Actual: ' + (e)); - } + assert.sameValue(e, "error", 'The value of e is expected to be "error"'); } try { obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return {} } }; var pop = obj.pop(); - throw new Test262Error('#8.1: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.pop() throw TypeError. Actual: ' + (pop)); + throw new Test262Error('#8.1: obj[0] = -1; obj.length = {valueOf() {return {}}, toString() {return {}}} obj.pop() throw TypeError. Actual: ' + (pop)); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#8.2: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.pop() throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } diff --git a/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.7.js b/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.7.js index cd7b3967bc..e1cb815a31 100644 --- a/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.7.js +++ b/test/built-ins/Array/prototype/pop/S15.4.4.6_A5.7.js @@ -9,12 +9,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.pop(); - throw new Test262Error('#1.1: new Array.prototype.pop() throw TypeError. Actual: ' + (new Array.prototype.pop())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.pop() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js index 8e87c8bf67..b4183bb05d 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A2_T3.js @@ -15,121 +15,104 @@ var obj = {}; obj.push = Array.prototype.push; obj.length = { - valueOf: function() { + valueOf() { return 3 } }; var push = obj.push(); -if (push !== 3) { - throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}} obj.push() === 3. Actual: ' + (push)); -} +assert.sameValue(push, 3, 'The value of push is expected to be 3'); obj.length = { - valueOf: function() { + valueOf() { return 3 }, - toString: function() { + toString() { return 1 } }; var push = obj.push(); -if (push !== 3) { - throw new Test262Error('#0: obj.length = {valueOf: function() {return 3}, toString: function() {return 1}} obj.push() === 3. Actual: ' + (push)); -} +assert.sameValue(push, 3, 'The value of push is expected to be 3'); obj.length = { - valueOf: function() { + valueOf() { return 3 }, - toString: function() { + toString() { return {} } }; var push = obj.push(); -if (push !== 3) { - throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.push() === 3. Actual: ' + (push)); -} +assert.sameValue(push, 3, 'The value of push is expected to be 3'); try { - obj.length = { - valueOf: function() { + valueOf() { return 3 }, - toString: function() { + toString() { throw "error" } }; var push = obj.push(); - if (push !== 3) { - throw new Test262Error('#4.1: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.push() === ",". Actual: ' + (push)); - } + assert.sameValue(push, 3, 'The value of push is expected to be 3'); } catch (e) { - if (e === "error") { - throw new Test262Error('#4.2: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.push() not throw "error"'); - } else { - throw new Test262Error('#4.3: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.push() not throw Error. Actual: ' + (e)); - } + assert.notSameValue(e, "error", 'The value of e is not "error"'); } obj.length = { - toString: function() { + toString() { return 1 } }; var push = obj.push(); -if (push !== 1) { - throw new Test262Error('#5: obj.length = {toString: function() {return 1}} obj.push() === 1. Actual: ' + (push)); -} +assert.sameValue(push, 1, 'The value of push is expected to be 1'); obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return 1 } } var push = obj.push(); -if (push !== 1) { - throw new Test262Error('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} obj.push() === 1. Actual: ' + (push)); -} +assert.sameValue(push, 1, 'The value of push is expected to be 1'); try { obj.length = { - valueOf: function() { + valueOf() { throw "error" }, - toString: function() { + toString() { return 1 } }; var push = obj.push(); - throw new Test262Error('#7.1: obj.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; obj.push() throw "error". Actual: ' + (push)); + throw new Test262Error('#7.1: obj.length = {valueOf() {throw "error"}, toString() {return 1}}; obj.push() throw "error". Actual: ' + (push)); } catch (e) { - if (e !== "error") { - throw new Test262Error('#7.2: obj.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; obj.push() throw "error". Actual: ' + (e)); - } + assert.sameValue(e, "error", 'The value of e is expected to be "error"'); } try { obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return {} } }; var push = obj.push(); - throw new Test262Error('#8.1: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.push() throw TypeError. Actual: ' + (push)); + throw new Test262Error('#8.1: obj.length = {valueOf() {return {}}, toString() {return {}}} obj.push() throw TypeError. Actual: ' + (push)); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#8.2: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.push() throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js index 1d8f4f29a6..1bcd57ef0c 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A3.js @@ -11,23 +11,18 @@ var x = []; x.length = 4294967295; var push = x.push(); -if (push !== 4294967295) { - throw new Test262Error('#1: x = []; x.length = 4294967295; x.push() === 4294967295. Actual: ' + (push)); -} +assert.sameValue(push, 4294967295, 'The value of push is expected to be 4294967295'); try { x.push("x"); throw new Test262Error('#2.1: x = []; x.length = 4294967295; x.push("x") throw RangeError. Actual: ' + (push)); } catch (e) { - if ((e instanceof RangeError) !== true) { - throw new Test262Error('#2.2: x = []; x.length = 4294967295; x.push("x") throw RangeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof RangeError, + true, + 'The result of evaluating (e instanceof RangeError) is expected to be true' + ); } -if (x[4294967295] !== "x") { - throw new Test262Error('#3: x = []; x.length = 4294967295; try {x.push("x")}catch(e){}; x[4294967295] === "x". Actual: ' + (x[4294967295])); -} - -if (x.length !== 4294967295) { - throw new Test262Error('#4: x = []; x.length = 4294967295; try {x.push("x")}catch(e){}; x.length === 4294967295. Actual: ' + (x.length)); -} +assert.sameValue(x[4294967295], "x", 'The value of x[4294967295] is expected to be "x"'); +assert.sameValue(x.length, 4294967295, 'The value of x.length is expected to be 4294967295'); diff --git a/test/built-ins/Array/prototype/push/S15.4.4.7_A6.7.js b/test/built-ins/Array/prototype/push/S15.4.4.7_A6.7.js index 4bb5f526fd..3eacb84df3 100644 --- a/test/built-ins/Array/prototype/push/S15.4.4.7_A6.7.js +++ b/test/built-ins/Array/prototype/push/S15.4.4.7_A6.7.js @@ -9,12 +9,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.push(); - throw new Test262Error('#1.1: new Array.prototype.push() throw TypeError. Actual: ' + (new Array.prototype.push())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.push() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.7.js b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.7.js index d1ac302439..e17bc4d5c8 100644 --- a/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.7.js +++ b/test/built-ins/Array/prototype/reverse/S15.4.4.8_A5.7.js @@ -9,12 +9,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.reverse(); - throw new Test262Error('#1.1: new Array.prototype.reverse() throw TypeError. Actual: ' + (new Array.prototype.reverse())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.reverse() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js index 3597f2c6ef..9a5fa3eb4d 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A2_T5.js @@ -16,125 +16,109 @@ obj.shift = Array.prototype.shift; obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return 1 } }; var shift = obj.shift(); -if (shift !== -1) { - throw new Test262Error('#1: obj[0] = -1; obj.length = {valueOf: function() {return 1}} obj.shift() === -1. Actual: ' + (shift)); -} +assert.sameValue(shift, -1, 'The value of shift is expected to be -1'); obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return 1 }, - toString: function() { + toString() { return 0 } }; var shift = obj.shift(); -if (shift !== -1) { - throw new Test262Error('#0: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return 0}} obj.shift() === -1. Actual: ' + (shift)); -} +assert.sameValue(shift, -1, 'The value of shift is expected to be -1'); obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return 1 }, - toString: function() { + toString() { return {} } }; var shift = obj.shift(); -if (shift !== -1) { - throw new Test262Error('#3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return {}}} obj.shift() === -1. Actual: ' + (shift)); -} +assert.sameValue(shift, -1, 'The value of shift is expected to be -1'); try { obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return 1 }, - toString: function() { + toString() { throw "error" } }; var shift = obj.shift(); - if (shift !== -1) { - throw new Test262Error('#4.1: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; obj.shift() === ",". Actual: ' + (shift)); - } + assert.sameValue(shift, -1, 'The value of shift is expected to be -1'); } catch (e) { - if (e === "error") { - throw new Test262Error('#4.2: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; obj.shift() not throw "error"'); - } else { - throw new Test262Error('#4.3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw "error"}}; obj.shift() not throw Error. Actual: ' + (e)); - } + assert.notSameValue(e, "error", 'The value of e is not "error"'); } obj[0] = -1; obj.length = { - toString: function() { + toString() { return 0 } }; var shift = obj.shift(); -if (shift !== undefined) { - throw new Test262Error('#5: obj[0] = -1; obj.length = {toString: function() {return 0}} obj.shift() === undefined. Actual: ' + (shift)); -} +assert.sameValue(shift, undefined, 'The value of shift is expected to equal undefined'); obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return 0 } } var shift = obj.shift(); -if (shift !== undefined) { - throw new Test262Error('#6: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} obj.shift() === undefined. Actual: ' + (shift)); -} +assert.sameValue(shift, undefined, 'The value of shift is expected to equal undefined'); try { obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { throw "error" }, - toString: function() { + toString() { return 0 } }; var shift = obj.shift(); - throw new Test262Error('#7.1: obj[0] = -1; obj.length = {valueOf: function() {throw "error"}, toString: function() {return 0}}; obj.shift() throw "error". Actual: ' + (shift)); + throw new Test262Error('#7.1: obj[0] = -1; obj.length = {valueOf() {throw "error"}, toString() {return 0}}; obj.shift() throw "error". Actual: ' + (shift)); } catch (e) { - if (e !== "error") { - throw new Test262Error('#7.2: obj[0] = -1; obj.length = {valueOf: function() {throw "error"}, toString: function() {return 0}}; obj.shift() throw "error". Actual: ' + (e)); - } + assert.sameValue(e, "error", 'The value of e is expected to be "error"'); } try { obj[0] = -1; obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return {} } }; var shift = obj.shift(); - throw new Test262Error('#8.1: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.shift() throw TypeError. Actual: ' + (shift)); + throw new Test262Error('#8.1: obj[0] = -1; obj.length = {valueOf() {return {}}, toString() {return {}}} obj.shift() throw TypeError. Actual: ' + (shift)); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#8.2: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.shift() throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } diff --git a/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.7.js b/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.7.js index 7b658bd2d8..ca94cddd2d 100644 --- a/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.7.js +++ b/test/built-ins/Array/prototype/shift/S15.4.4.9_A5.7.js @@ -9,12 +9,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.shift(); - throw new Test262Error('#1.1: new Array.prototype.shift() throw TypeError. Actual: ' + (new Array.prototype.shift())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.shift() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T1.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T1.js index 98d72af7a7..41df4336fd 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T1.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T1.js @@ -7,17 +7,13 @@ esid: sec-array.prototype.slice description: length = 4294967296 ---*/ -var obj = {}; -obj.slice = Array.prototype.slice; -obj[0] = "x"; -obj[4294967295] = "y"; -obj.length = 4294967296; - -try { - var arr = obj.slice(0, 4294967296); - throw new Test262Error('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); lead to throwing exception.'); -} catch (e) { - if (!(e instanceof RangeError)) { - throw new Test262Error('#1.1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); lead to throwing exception. Exception is instance of RangeError. Actual: exception is ' + e); - } -} +assert.throws(RangeError, () => { + var obj = {}; + obj.slice = Array.prototype.slice; + obj[0] = "x"; + obj[4294967295] = "y"; + obj.length = 4294967296; + obj.slice(0, 4294967296); + new Array.prototype.toLocaleString(); + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T2.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T2.js index 0358fd0e1d..ac5d83ba18 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T2.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A3_T2.js @@ -7,17 +7,12 @@ esid: sec-array.prototype.slice description: length = 4294967297 ---*/ -var obj = {}; -obj.slice = Array.prototype.slice; -obj[0] = "x"; -obj[4294967296] = "y"; -obj.length = 4294967297; - -try { - var arr = obj.slice(0, 4294967297); - throw new Test262Error('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); lead to throwing exception.'); -} catch (e) { - if (!(e instanceof RangeError)) { - throw new Test262Error('#1.1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); lead to throwing exception. Exception is instance of RangeError. Actual: exception is ' + e); - } -} +assert.throws(RangeError, () => { + var obj = {}; + obj.slice = Array.prototype.slice; + obj[0] = "x"; + obj[4294967296] = "y"; + obj.length = 4294967297; + obj.slice(0, 4294967297); + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.7.js b/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.7.js index a3c7162296..2e65c0c075 100644 --- a/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.7.js +++ b/test/built-ins/Array/prototype/slice/S15.4.4.10_A5.7.js @@ -9,12 +9,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.slice(); - throw new Test262Error('#1.1: new Array.prototype.slice() throw TypeError. Actual: ' + (new Array.prototype.slice())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.slice() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js index 1c164af479..8e0a401de1 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A5_T1.js @@ -7,15 +7,10 @@ esid: sec-array.prototype.sort description: comparefn function throw "error" ---*/ -var myComparefn = function(x, y) { - throw "error"; -} -var x = [1, 0]; -try { - x.sort(myComparefn) - throw new Test262Error('#1.1: Array.sort should not eat exceptions'); -} catch (e) { - if (e !== "error") { - throw new Test262Error('#1.2: Array.sort should not eat exceptions'); +assert.throws(Test262Error, () => { + var myComparefn = function(x, y) { + throw new Test262Error(); } -} + var x = [1, 0]; + x.sort(myComparefn); +}); diff --git a/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.7.js b/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.7.js index 7c7c3700a9..91b1d21453 100644 --- a/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.7.js +++ b/test/built-ins/Array/prototype/sort/S15.4.4.11_A7.7.js @@ -9,12 +9,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.sort(); - throw new Test262Error('#1.1: new Array.prototype.sort() throw TypeError. Actual: ' + (new Array.prototype.sort())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.sort() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.7.js b/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.7.js index 9ab2d60c68..f4ab5911b5 100644 --- a/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.7.js +++ b/test/built-ins/Array/prototype/splice/S15.4.4.12_A5.7.js @@ -9,12 +9,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.splice(); - throw new Test262Error('#1.1: new Array.prototype.splice() throw TypeError. Actual: ' + (new Array.prototype.splice())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.splice() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.7.js b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.7.js index 41957c8ab0..1354e95aa9 100644 --- a/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.7.js +++ b/test/built-ins/Array/prototype/toLocaleString/S15.4.4.3_A4.7.js @@ -10,12 +10,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.toLocaleString(); - throw new Test262Error('#1.1: new Array.prototype.toLocaleString() throw TypeError. Actual: ' + (new Array.prototype.toLocaleString())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.toLocaleString() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js index dc564c901e..661499cec4 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A1_T4.js @@ -11,144 +11,89 @@ description: If Type(value) is Object, evaluate ToPrimitive(value, String) ---*/ var object = { - valueOf: function() { + valueOf() { return "+" } }; var x = new Array(object); -if (x.toString() !== x.join()) { - throw new Test262Error('#1.1: var object = {valueOf: function() {return "+"}} var x = new Array(object); x.toString() === x.join(). Actual: ' + (x.toString())); -} else { - if (x.toString() !== "[object Object]") { - throw new Test262Error('#1.2: var object = {valueOf: function() {return "+"}} var x = new Array(object); x.toString() === "[object Object]". Actual: ' + (x.toString())); - } -} +assert.sameValue(x.toString(), x.join(), 'x.toString() must return the same value returned by x.join()'); var object = { - valueOf: function() { + valueOf() { return "+" }, - toString: function() { + toString() { return "*" } }; var x = new Array(object); -if (x.toString() !== x.join()) { - throw new Test262Error('#2.1: var object = {valueOf: function() {return "+"}, toString: function() {return x.join()}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); -} else { - if (x.toString() !== "*") { - throw new Test262Error('#2.2: var object = {valueOf: function() {return "+"}, toString: function() {return "*"}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); - } -} +assert.sameValue(x.toString(), x.join(), 'x.toString() must return the same value returned by x.join()'); var object = { - valueOf: function() { + valueOf() { return "+" }, - toString: function() { + toString() { return {} } }; var x = new Array(object); -if (x.toString() !== x.join()) { - throw new Test262Error('#3.1: var object = {valueOf: function() {return x.join()}, toString: function() {return {}}} var x = new Array(object); x.toString() === "+". Actual: ' + (x.toString())); -} else { - if (x.toString() !== "+") { - throw new Test262Error('#3.2: var object = {valueOf: function() {return "+"}, toString: function() {return {}}} var x = new Array(object); x.toString() === "+". Actual: ' + (x.toString())); - } -} - -try { - var object = { - valueOf: function() { - throw "error" - }, - toString: function() { - return "*" - } - }; - var x = new Array(object); - if (x.toString() !== x.join()) { - throw new Test262Error('#4.1: var object = {valueOf: function() {throw "error"}, toString: function() {return x.join()}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); - } else { - if (x.toString() !== "*") { - throw new Test262Error('#4.2: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); - } - } -} -catch (e) { - if (e === "error") { - throw new Test262Error('#4.3: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}} var x = new Array(object); x.toString() not throw "error"'); - } else { - throw new Test262Error('#4.4: var object = {valueOf: function() {throw "error"}, toString: function() {return "*"}} var x = new Array(object); x.toString() not throw Error. Actual: ' + (e)); - } -} +assert.sameValue(x.toString(), x.join(), 'x.toString() must return the same value returned by x.join()'); var object = { - toString: function() { + valueOf() { + throw "error" + }, + toString() { return "*" } }; var x = new Array(object); -if (x.toString() !== x.join()) { - throw new Test262Error('#5.1: var object = {toString: function() {return x.join()}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); -} else { - if (x.toString() !== "*") { - throw new Test262Error('#5.2: var object = {toString: function() {return "*"}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); - } -} +assert.sameValue(x.toString(), x.join(), 'x.toString() must return the same value returned by x.join()'); + var object = { - valueOf: function() { + toString() { + return "*" + } +}; +var x = new Array(object); +assert.sameValue(x.toString(), x.join(), 'x.toString() must return the same value returned by x.join()'); + +var object = { + valueOf() { return {} }, - toString: function() { + toString() { return "*" } } var x = new Array(object); -if (x.toString() !== x.join()) { - throw new Test262Error('#6.1: var object = {valueOf: function() {return {}}, toString: function() {return x.join()}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); -} else { - if (x.toString() !== "*") { - throw new Test262Error('#6.2: var object = {valueOf: function() {return {}}, toString: function() {return "*"}} var x = new Array(object); x.toString() === "*". Actual: ' + (x.toString())); - } -} +assert.sameValue(x.toString(), x.join(), 'x.toString() must return the same value returned by x.join()'); -try { +assert.throws(Test262Error, () => { var object = { - valueOf: function() { + valueOf() { return "+" }, - toString: function() { - throw "error" + toString() { + throw new Test262Error(); } }; var x = new Array(object); x.toString(); - throw new Test262Error('#7.1: var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}} var x = new Array(object); x.toString() throw "error". Actual: ' + (x.toString())); -} -catch (e) { - if (e !== "error") { - throw new Test262Error('#7.2: var object = {valueOf: function() {return "+"}, toString: function() {throw "error"}} var x = new Array(object); x.toString() throw "error". Actual: ' + (e)); - } -} +}); -try { +assert.throws(TypeError, () => { var object = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return {} } }; var x = new Array(object); x.toString(); - throw new Test262Error('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.toString() throw TypeError. Actual: ' + (x.toString())); -} -catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.toString() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.7.js b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.7.js index 8922c434fd..4cb290b049 100644 --- a/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.7.js +++ b/test/built-ins/Array/prototype/toString/S15.4.4.2_A4.7.js @@ -10,12 +10,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.toString(); - throw new Test262Error('#1.1: new Array.prototype.toString() throw TypeError. Actual: ' + (new Array.prototype.toString())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.toString() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +}); diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js index 7a1da8898f..7f9ed4e247 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A2_T3.js @@ -15,120 +15,104 @@ var obj = {}; obj.unshift = Array.prototype.unshift; obj.length = { - valueOf: function() { + valueOf() { return 3 } }; var unshift = obj.unshift(); -if (unshift !== 3) { - throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}} obj.unshift() === 3. Actual: ' + (unshift)); -} +assert.sameValue(unshift, 3, 'The value of unshift is expected to be 3'); obj.length = { - valueOf: function() { + valueOf() { return 3 }, - toString: function() { + toString() { return 1 } }; var unshift = obj.unshift(); -if (unshift !== 3) { - throw new Test262Error('#0: obj.length = {valueOf: function() {return 3}, toString: function() {return 1}} obj.unshift() === 3. Actual: ' + (unshift)); -} +assert.sameValue(unshift, 3, 'The value of unshift is expected to be 3'); obj.length = { - valueOf: function() { + valueOf() { return 3 }, - toString: function() { + toString() { return {} } }; var unshift = obj.unshift(); -if (unshift !== 3) { - throw new Test262Error('#1: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.unshift() === 3. Actual: ' + (unshift)); -} +assert.sameValue(unshift, 3, 'The value of unshift is expected to be 3'); try { obj.length = { - valueOf: function() { + valueOf() { return 3 }, - toString: function() { + toString() { throw "error" } }; var unshift = obj.unshift(); - if (unshift !== 3) { - throw new Test262Error('#4.1: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.unshift() === ",". Actual: ' + (unshift)); - } + assert.sameValue(unshift, 3, 'The value of unshift is expected to be 3'); } catch (e) { - if (e === "error") { - throw new Test262Error('#4.2: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.unshift() not throw "error"'); - } else { - throw new Test262Error('#4.3: obj.length = {valueOf: function() {return 3}, toString: function() {throw "error"}}; obj.unshift() not throw Error. Actual: ' + (e)); - } + assert.notSameValue(e, "error", 'The value of e is not "error"'); } obj.length = { - toString: function() { + toString() { return 1 } }; var unshift = obj.unshift(); -if (unshift !== 1) { - throw new Test262Error('#5: obj.length = {toString: function() {return 1}} obj.unshift() === 1. Actual: ' + (unshift)); -} +assert.sameValue(unshift, 1, 'The value of unshift is expected to be 1'); obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return 1 } } var unshift = obj.unshift(); -if (unshift !== 1) { - throw new Test262Error('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} obj.unshift() === 1. Actual: ' + (unshift)); -} +assert.sameValue(unshift, 1, 'The value of unshift is expected to be 1'); try { obj.length = { - valueOf: function() { + valueOf() { throw "error" }, - toString: function() { + toString() { return 1 } }; var unshift = obj.unshift(); - throw new Test262Error('#7.1: obj.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; obj.unshift() throw "error". Actual: ' + (unshift)); + throw new Test262Error('#7.1: obj.length = {valueOf() {throw "error"}, toString() {return 1}}; obj.unshift() throw "error". Actual: ' + (unshift)); } catch (e) { - if (e !== "error") { - throw new Test262Error('#7.2: obj.length = {valueOf: function() {throw "error"}, toString: function() {return 1}}; obj.unshift() throw "error". Actual: ' + (e)); - } + assert.sameValue(e, "error", 'The value of e is expected to be "error"'); } try { obj.length = { - valueOf: function() { + valueOf() { return {} }, - toString: function() { + toString() { return {} } }; var unshift = obj.unshift(); - throw new Test262Error('#8.1: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.unshift() throw TypeError. Actual: ' + (unshift)); + throw new Test262Error('#8.1: obj.length = {valueOf() {return {}}, toString() {return {}}} obj.unshift() throw TypeError. Actual: ' + (unshift)); } catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#8.2: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.unshift() throw TypeError. Actual: ' + (e)); - } + assert.sameValue( + e instanceof TypeError, + true, + 'The result of evaluating (e instanceof TypeError) is expected to be true' + ); } diff --git a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.7.js b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.7.js index ed3bf22d78..b133386118 100644 --- a/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.7.js +++ b/test/built-ins/Array/prototype/unshift/S15.4.4.13_A5.7.js @@ -9,12 +9,7 @@ description: > throw a TypeError exception ---*/ - -try { +assert.throws(TypeError, () => { new Array.prototype.unshift(); - throw new Test262Error('#1.1: new Array.prototype.unshift() throw TypeError. Actual: ' + (new Array.prototype.unshift())); -} catch (e) { - if ((e instanceof TypeError) !== true) { - throw new Test262Error('#1.2: new Array.prototype.unshift() throw TypeError. Actual: ' + (e)); - } -} + throw new Test262Error(); +});