diff options
Diffstat (limited to 'test/suite/ch15/15.4/15.4.4/15.4.4.10')
49 files changed, 313 insertions, 429 deletions
diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js index 75630b888..1b6f22211 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js @@ -1,27 +1,29 @@ -/// Copyright (c) 2012 Ecma International. All rights reserved.
-/// Ecma International makes this code available under the terms and conditions set
-/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
-/// "Use Terms"). Any redistribution of this code must retain the above
-/// copyright and this notice and otherwise comply with the Use Terms.
-/**
- * @path ch15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js
- * @description Array.prototype.slice will slice a string from start to end when index property (read-only) exists in Array.prototype (Step 10.c.ii)
- */
-
-
-function testcase() {
- var arrObj = [1, 2, 3];
- try {
- Object.defineProperty(Array.prototype, "0", {
- value: "test",
- writable: false,
- configurable: true
- });
-
- var newArr = arrObj.slice(0, 1);
- return newArr.hasOwnProperty("0") && newArr[0] === 1 && typeof newArr[1] === "undefined";
- } finally {
- delete Array.prototype[0];
- }
- }
-runTestCase(testcase);
+// Copyright (c) 2012 Ecma International. All rights reserved. +// Ecma International makes this code available under the terms and conditions set +// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the +// "Use Terms"). Any redistribution of this code must retain the above +// copyright and this notice and otherwise comply with the Use Terms. + +/*--- +description: > + Array.prototype.slice will slice a string from start to end when + index property (read-only) exists in Array.prototype (Step 10.c.ii) +includes: [runTestCase.js] +---*/ + +function testcase() { + var arrObj = [1, 2, 3]; + try { + Object.defineProperty(Array.prototype, "0", { + value: "test", + writable: false, + configurable: true + }); + + var newArr = arrObj.slice(0, 1); + return newArr.hasOwnProperty("0") && newArr[0] === 1 && typeof newArr[1] === "undefined"; + } finally { + delete Array.prototype[0]; + } + } +runTestCase(testcase); diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js index 21b48b7d9..0beb08fbd 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T1.js - * @description length > end > start = 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +description: length > end > start = 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,3); @@ -41,5 +40,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js index 1a1bf27c0..d967b8250 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T2.js - * @description length > end = start > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +description: length > end = start > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(3,3); @@ -27,4 +26,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(3,3); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js index 4f5ec0535..5af976fe7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T3.js - * @description length > start > end > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +description: length > start > end > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(4,3); @@ -27,4 +26,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(4,3); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js index b9f2a3add..808e4e081 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T4.js - * @description length = end = start > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +description: length = end = start > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(5,5); @@ -27,4 +26,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(5,5); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js index cb527e80c..5860c3871 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T5.js - * @description length = end > start > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +description: length = end > start > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(3,5); @@ -36,5 +35,4 @@ if (arr[1] !== 4) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js index e69330f06..a7273e288 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T6.js - * @description length > end > start > 0; - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +description: length > end > start > 0; +---*/ var x = [0,1,2,3,4]; var arr = x.slice(2,4); @@ -36,5 +35,4 @@ if (arr[1] !== 3) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js index 8e170e400..27fe42d81 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.1_T7.js - * @description end > length > start > 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is positive, use min(end, length) +description: end > length > start > 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(3,6); @@ -36,5 +35,4 @@ if (arr[1] !== 4) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js index 1daab4f56..8c5aee496 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T1.js - * @description length > end = abs(start), start < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is positive, use min(end, length) +description: length > end = abs(start), start < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-3,3); @@ -31,5 +30,4 @@ if (arr[0] !== 2) { //CHECK#4 if (arr[1] !== undefined) { $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr[1] === undefined. Actual: ' + (arr[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js index f0e65869f..7463b33a3 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T2.js - * @description length = end > abs(start), start < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is positive, use min(end, length) +description: length = end > abs(start), start < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-1,5); @@ -31,5 +30,4 @@ if (arr[0] !== 4) { //CHECK#4 if (arr[1] !== undefined) { $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr[1] === undefined. Actual: ' + (arr[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js index c72c1f750..9713e83cf 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T3.js - * @description abs(start) = length > end > 0, start < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is positive, use min(end, length) +description: abs(start) = length > end > 0, start < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-5,1); @@ -31,5 +30,4 @@ if (arr[0] !== 0) { //CHECK#4 if (arr[1] !== undefined) { $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr[1] === undefined. Actual: ' + (arr[1])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js index d15388ee0..a6031be7b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.2_T4.js - * @description abs(start) > length = end > 0, start < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is positive, use min(end, length) +description: abs(start) > length = end > 0, start < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-9,5); @@ -51,5 +50,4 @@ if (arr[4] !== 4) { //CHECK#8 if (arr[5] !== undefined) { $ERROR('#8: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[5] === undefined. Actual: ' + (arr[5])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js index b23bd9482..d1475d540 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T1.js - * @description length > abs(end) > start = 0, end < 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is negative, use max(end + length, 0) +description: length > abs(end) > start = 0, end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,-2); @@ -41,5 +40,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js index d5348427f..5899800ba 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T2.js - * @description length > abs(end) > start > 0, end < 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is negative, use max(end + length, 0) +description: length > abs(end) > start > 0, end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(1,-4); @@ -27,4 +26,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(1,-4); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js index 87928d765..d4710d407 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T3.js - * @description length = abs(end) > start = 0, end < 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is negative, use max(end + length, 0) +description: length = abs(end) > start = 0, end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,-5); @@ -27,4 +26,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,-5); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js index 7844830a0..c3b96486e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.3_T4.js - * @description abs(end) > length > start > 0, end < 0 - */ +/*--- +info: > + If start is positive, use min(start, length). + If end is negative, use max(end + length, 0) +description: abs(end) > length > start > 0, end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(4,-9); @@ -27,4 +26,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(4,-9); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js index a79ced38f..7c8c53698 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T1.js - * @description -length = start < end < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is negative, use max(end + length, 0) +description: -length = start < end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); @@ -41,5 +40,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js index 385ec1028..3dab34a27 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T2.js - * @description -length < start < end < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is negative, use max(end + length, 0) +description: -length < start < end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); @@ -36,5 +35,4 @@ if (arr[1] !== 3) { //CHECK#5 if (arr[2] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr[2] === undefined. Actual: ' + (arr[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js index 5038a3248..7f2f2898a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T3.js - * @description start < -length < end < 0 - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is negative, use max(end + length, 0) +description: start < -length < end < 0 +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); @@ -46,5 +45,4 @@ if (arr[3] !== 3) { //CHECK#7 if (arr[4] !== undefined) { $ERROR('#7: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[4] === undefined. Actual: ' + (arr[4])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js index c43ac02a2..4aaddaac9 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.4_T4.js - * @description start = end < -length - */ +/*--- +info: > + If start is negative, use max(start + length, 0). + If end is negative, use max(end + length, 0) +description: start = end < -length +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); @@ -27,4 +26,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js index dba873ddc..cb3a6f765 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If end is undefined use length - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T1.js - * @description end === undefined - */ +/*--- +info: If end is undefined use length +description: end === undefined +---*/ var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); @@ -35,5 +33,4 @@ if (arr[1] !== 4) { //CHECK#5 if (arr[2] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr[2] === undefined. Actual: ' + (arr[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js index 764374ef3..663e5996c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * If end is undefined use length - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A1.5_T2.js - * @description end is absent - */ +/*--- +info: If end is undefined use length +description: end is absent +---*/ var x = [0,1,2,3,4]; var arr = x.slice(-2); @@ -35,5 +33,4 @@ if (arr[1] !== 4) { //CHECK#5 if (arr[2] !== undefined) { $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr[2] === undefined. Actual: ' + (arr[2])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js index 9995f993c..16d942e43 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T1.js - * @description start is not integer - */ +/*--- +info: Operator use ToInteger from start +description: start is not integer +---*/ var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); @@ -35,5 +33,4 @@ if (arr[1] !== 3) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js index 1cb7b0fd7..de7354ba7 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T2.js - * @description start = NaN - */ +/*--- +info: Operator use ToInteger from start +description: start = NaN +---*/ var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); @@ -40,5 +38,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[3] === undefined. Actual: ' + (arr[3])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js index 171df839f..2ffe71d6a 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T3.js - * @description start = Infinity - */ +/*--- +info: Operator use ToInteger from start +description: start = Infinity +---*/ var x = [0,1,2,3,4]; var arr = x.slice(Number.POSITIVE_INFINITY,3); @@ -26,4 +24,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js index 451a4fba0..983c3d82c 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T4.js - * @description start = -Infinity - */ +/*--- +info: Operator use ToInteger from start +description: start = -Infinity +---*/ var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); @@ -40,5 +38,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js index 7be769570..a63bb3db4 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from start - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.1_T5.js - * @description ToInteger use ToNumber - */ +/*--- +info: Operator use ToInteger from start +description: ToInteger use ToNumber +---*/ var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); @@ -40,5 +38,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js index 51209eb72..435167fff 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T1.js - * @description end is not integer - */ +/*--- +info: Operator use ToInteger from end +description: end is not integer +---*/ var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); @@ -35,5 +33,4 @@ if (arr[1] !== 3) { //CHECK#5 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js index 1b29e02e4..669d3ad67 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T2.js - * @description end = NaN - */ +/*--- +info: Operator use ToInteger from end +description: end = NaN +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); @@ -26,4 +24,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); arr[0] === undefined. Actual: ' + (arr[0])); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js index 988cd1e90..d37b8e13e 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T3.js - * @description end = Infinity - */ +/*--- +info: Operator use ToInteger from end +description: end = Infinity +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); @@ -50,5 +48,4 @@ if (arr[4] !== 4) { //CHECK#8 if (arr[5] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js index 3d98fe7f0..23a63fb6b 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T4.js - * @description end = -Infinity - */ +/*--- +info: Operator use ToInteger from end +description: end = -Infinity +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,Number.NEGATIVE_INFINITY); @@ -26,4 +24,3 @@ if (arr.length !== 0) { if (arr[0] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js index 8c27e16c4..93dfb7474 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Operator use ToInteger from end - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2.2_T5.js - * @description ToInteger use ToNumber - */ +/*--- +info: Operator use ToInteger from end +description: ToInteger use ToNumber +---*/ var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); @@ -40,5 +38,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js index c0a759292..ada7be857 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T1.js - * @description If start is positive, use min(start, length). - * If end is positive, use min(end, length) - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +description: > + If start is positive, use min(start, length). If end is positive, + use min(end, length) +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -49,5 +49,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js index 04a45b79a..484294eb5 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T2.js - * @description If start is negative, use max(start + length, 0). - * If end is positive, use min(end, length) - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +description: > + If start is negative, use max(start + length, 0). If end is + positive, use min(end, length) +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -49,5 +49,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js index 6a542bd6a..5f6141133 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T3.js - * @description If start is positive, use min(start, length). - * If end is negative, use max(end + length, 0) - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +description: > + If start is positive, use min(start, length). If end is negative, + use max(end + length, 0) +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -49,5 +49,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js index 01a4e4f60..5ea1ef7d2 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js @@ -1,14 +1,14 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T4.js - * @description If start is negative, use max(start + length, 0). - * If end is negative, use max(end + length, 0) - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +description: > + If start is negative, use max(start + length, 0). If end is + negative, use max(end + length, 0) +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -49,5 +49,4 @@ if (arr[2] !== 2) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js index 2a9156011..744780550 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T5.js - * @description If end is undefined use length - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +description: If end is undefined use length +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -48,5 +47,4 @@ if (arr[2] !== 4) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js index e0c304a00..5d5b8fc22 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js @@ -1,13 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice function is intentionally generic. - * It does not require that its this value be an Array object - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A2_T6.js - * @description If end is undefined use length - */ +/*--- +info: > + The slice function is intentionally generic. + It does not require that its this value be an Array object +description: If end is undefined use length +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -48,5 +47,4 @@ if (arr[2] !== 4) { //CHECK#6 if (arr[3] !== undefined) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js index f32a97706..4f8aaad8d 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T1.js - * @description length = 4294967296 - */ +/*--- +info: Check ToUint32(length) for non Array objects +description: length = 4294967296 +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -28,5 +26,4 @@ if (arr[0] !== undefined) { //CHECK#3 if (arr[4294967295] !== undefined) { $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967295] = "y"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); arr[4294967295] === undefined. Actual: ' + (arr[4294967295])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js index 63810d3c9..aa1ab2e20 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T2.js - * @description length = 4294967297 - */ +/*--- +info: Check ToUint32(length) for non Array objects +description: length = 4294967297 +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -28,5 +26,4 @@ if (arr[0] !== "x") { //CHECK#3 if (arr[4294967296] !== undefined) { $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = "x"; obj[4294967296] = "y"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); arr[4294967296] === undefined. Actual: ' + (arr[4294967296])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js index ab663fc2c..1a684f1ae 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * Check ToUint32(length) for non Array objects - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A3_T3.js - * @description length = -1 - */ +/*--- +info: Check ToUint32(length) for non Array objects +description: length = -1 +---*/ var obj = {}; obj.slice = Array.prototype.slice; @@ -22,5 +20,4 @@ if (arr.length !== 1) { //CHECK#3 if (arr[0] !== "x") { $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[4294967294] = "x"; obj.length = 4294967295; var arr = obj.slice(4294967294,4294967295); arr[0] === "x". Actual: ' + (arr[0])); -} - +} diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js index b77d26b31..2b77081c0 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * [[Get]] from not an inherited property - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A4_T1.js - * @description [[Prototype]] of Array instance is Array.prototype - */ +/*--- +info: "[[Get]] from not an inherited property" +description: "[[Prototype]] of Array instance is Array.prototype" +---*/ Array.prototype[1] = 1; var x = [0]; @@ -27,4 +25,3 @@ if (arr[1] !== 1) { if (arr.hasOwnProperty('1') !== true) { $ERROR('#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/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js index a48d1f846..6b1304036 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of slice has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.1.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The length property of slice has the attribute DontEnum +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.prototype.slice.propertyIsEnumerable('length') !== false) { @@ -24,5 +22,3 @@ for (var p in Array.slice){ if (result !== true) { $ERROR('#2: result = true; for (p in Array.slice) { if (p === "length") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js index 88cfc5134..a95cc8482 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js @@ -1,12 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of slice has the attribute DontDelete - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.2.js - * @description Checking use hasOwnProperty, delete - */ +/*--- +info: The length property of slice has the attribute DontDelete +description: Checking use hasOwnProperty, delete +includes: [$FAIL.js] +---*/ //CHECK#1 if (Array.prototype.slice.hasOwnProperty('length') !== true) { @@ -24,6 +23,3 @@ if (Array.prototype.slice.hasOwnProperty('length') !== true) { if (Array.prototype.slice.length === undefined) { $ERROR('#3: delete Array.prototype.slice.length; Array.prototype.slice.length !== undefined'); } - - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js index f03ef81b2..6e857eb15 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js @@ -1,13 +1,11 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of slice has the attribute ReadOnly - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.3.js - * @description Checking if varying the length property fails - * @noStrict - */ +/*--- +info: The length property of slice has the attribute ReadOnly +description: Checking if varying the length property fails +flags: [noStrict] +---*/ //CHECK#1 var x = Array.prototype.slice.length; @@ -15,5 +13,3 @@ Array.prototype.slice.length = Infinity; if (Array.prototype.slice.length !== x) { $ERROR('#1: x = Array.prototype.slice.length; Array.prototype.slice.length = Infinity; Array.prototypeslice.length === x. Actual: ' + (Array.prototypeslice.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js index d0dca3396..14e436f03 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js @@ -1,16 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The length property of slice is 2 - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.4.js - * @description slice.length === 2 - */ +/*--- +info: The length property of slice is 2 +description: slice.length === 2 +---*/ //CHECK#1 if (Array.prototype.slice.length !== 2) { $ERROR('#1: Array.prototype.slice.length === 2. Actual: ' + (Array.prototype.slice.length)); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js index fac778af6..a0940d9de 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js @@ -1,12 +1,10 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice property of Array has the attribute DontEnum - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.5.js - * @description Checking use propertyIsEnumerable, for-in - */ +/*--- +info: The slice property of Array has the attribute DontEnum +description: Checking use propertyIsEnumerable, for-in +---*/ //CHECK#1 if (Array.propertyIsEnumerable('slice') !== false) { @@ -24,5 +22,3 @@ for (var p in Array){ if (result !== true) { $ERROR('#2: result = true; for (p in Array) { if (p === "slice") result = false; } result === true;'); } - - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js index 6570b06ff..20e7b0a49 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js @@ -1,15 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice property of Array has not prototype property - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.6.js - * @description Checking Array.prototype.slice.prototype - */ +/*--- +info: The slice property of Array has not prototype property +description: Checking Array.prototype.slice.prototype +---*/ //CHECK#1 if (Array.prototype.slice.prototype !== undefined) { $ERROR('#1: Array.prototype.slice.prototype === undefined. Actual: ' + (Array.prototype.slice.prototype)); } - diff --git a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js index 0935af478..8937ac5a8 100644 --- a/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js +++ b/test/suite/ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js @@ -1,12 +1,12 @@ // Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * The slice property of Array can't be used as constructor - * - * @path ch15/15.4/15.4.4/15.4.4.10/S15.4.4.10_A5.7.js - * @description If property does not implement the internal [[Construct]] method, throw a TypeError exception - */ +/*--- +info: The slice property of Array can't be used as constructor +description: > + If property does not implement the internal [[Construct]] method, + throw a TypeError exception +---*/ //CHECK#1 @@ -18,4 +18,3 @@ try { $ERROR('#1.2: new Array.prototype.slice() throw TypeError. Actual: ' + (e)); } } - |