Diff
Modified: trunk/JSTests/ChangeLog (222311 => 222312)
--- trunk/JSTests/ChangeLog 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/ChangeLog 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,5 +1,36 @@
2017-09-20 Joseph Pecoraro <[email protected]>
+ Unreviewed follow-up to r222311.
+
+ * test262/harness/sta.js:
+ * test262/test/built-ins/Array/from/calling-from-valid-1-noStrict.js:
+ * test262/test/built-ins/Array/from/calling-from-valid-1-onlyStrict.js:
+ * test262/test/built-ins/Array/from/calling-from-valid-2.js:
+ * test262/test/built-ins/Array/from/elements-added-after.js:
+ * test262/test/built-ins/Array/from/elements-deleted-after.js:
+ * test262/test/built-ins/Array/from/elements-updated-after.js:
+ * test262/test/built-ins/Array/from/from-array.js:
+ * test262/test/built-ins/Array/from/mapfn-is-not-callable-typeerror.js:
+ * test262/test/built-ins/Array/from/mapfn-throws-exception.js:
+ * test262/test/built-ins/Array/from/source-array-boundary.js:
+ * test262/test/built-ins/Array/from/source-object-constructor.js:
+ * test262/test/built-ins/Array/from/source-object-iterator-1.js:
+ * test262/test/built-ins/Array/from/source-object-iterator-2.js:
+ * test262/test/built-ins/Array/from/source-object-length.js:
+ * test262/test/built-ins/Array/from/source-object-missing.js:
+ * test262/test/built-ins/Array/from/source-object-without.js:
+ * test262/test/built-ins/Array/from/this-null.js:
+ * test262/test/built-ins/Function/prototype/toString/line-terminator-normalisation-CR.js:
+ * test262/test/language/line-terminators/S7.3_A3.2_T1.js:
+ * test262/test/language/literals/numeric/7.8.3-1gs.js:
+ * test262/test/language/literals/numeric/7.8.3-2gs.js:
+ * test262/test/language/literals/numeric/7.8.3-3gs.js:
+ * test262/test/language/literals/regexp/7.8.5-1gs.js:
+ * test262/test/language/literals/string/7.8.4-1gs.js:
+ Fix some files that I failed to update when I applied my patch.
+
+2017-09-20 Joseph Pecoraro <[email protected]>
+
Update test262 tests
https://bugs.webkit.org/show_bug.cgi?id=177220
Modified: trunk/JSTests/test262/harness/sta.js (222311 => 222312)
--- trunk/JSTests/test262/harness/sta.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/harness/sta.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,23 +1,23 @@
-// Copyright (c) 2012 Ecma International. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-/*---
-description: |
- Provides both:
-
- - An error class to avoid false positives when testing for thrown exceptions
- - A function to explicitly throw an exception using the Test262Error class
----*/
-
-
-function Test262Error(message) {
- this.message = message || "";
-}
-
-Test262Error.prototype.toString = function () {
- return "Test262Error: " + this.message;
-};
-
-var $ERROR;
-$ERROR = function $ERROR(message) {
- throw new Test262Error(message);
-};
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: |
+ Provides both:
+
+ - An error class to avoid false positives when testing for thrown exceptions
+ - A function to explicitly throw an exception using the Test262Error class
+---*/
+
+
+function Test262Error(message) {
+ this.message = message || "";
+}
+
+Test262Error.prototype.toString = function () {
+ return "Test262Error: " + this.message;
+};
+
+var $ERROR;
+$ERROR = function $ERROR(message) {
+ throw new Test262Error(message);
+};
Modified: trunk/JSTests/test262/test/built-ins/Array/from/calling-from-valid-1-noStrict.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/calling-from-valid-1-noStrict.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/calling-from-valid-1-noStrict.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,67 +1,67 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-/*---
-esid: sec-array.from
-es6id: 22.1.2.1
-description: Map function without thisArg on non strict mode
-info: >
- 22.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] )
-
- ...
- 10. Let len be ToLength(Get(arrayLike, "length")).
- 11. ReturnIfAbrupt(len).
- 12. If IsConstructor(C) is true, then
- a. Let A be Construct(C, «len»).
- 13. Else,
- b. Let A be ArrayCreate(len).
- 14. ReturnIfAbrupt(A).
- 15. Let k be 0.
- 16. Repeat, while k < len
- a. Let Pk be ToString(k).
- b. Let kValue be Get(arrayLike, Pk).
- c. ReturnIfAbrupt(kValue).
- d. If mapping is true, then
- i. Let mappedValue be Call(mapfn, T, «kValue, k»).
- ...
-flags: [noStrict]
----*/
-
-var list = {
- '0': 41,
- '1': 42,
- '2': 43,
- length: 3
-};
-var calls = [];
-
-function mapFn (value) {
- calls.push({
- args: arguments,
- thisArg: this
- });
- return value * 2;
-}
-
-var result = Array.from(list, mapFn);
-
-assert.sameValue(result.length, 3, 'result.length');
-assert.sameValue(result[0], 82, 'result[0]');
-assert.sameValue(result[1], 84, 'result[1]');
-assert.sameValue(result[2], 86, 'result[2]');
-
-assert.sameValue(calls.length, 3, 'calls.length');
-
-assert.sameValue(calls[0].args.length, 2, 'calls[0].args.length');
-assert.sameValue(calls[0].args[0], 41, 'calls[0].args[0]');
-assert.sameValue(calls[0].args[1], 0, 'calls[0].args[1]');
-assert.sameValue(calls[0].thisArg, this, 'calls[0].thisArg');
-
-assert.sameValue(calls[1].args.length, 2, 'calls[1].args.length');
-assert.sameValue(calls[1].args[0], 42, 'calls[1].args[0]');
-assert.sameValue(calls[1].args[1], 1, 'calls[1].args[1]');
-assert.sameValue(calls[1].thisArg, this, 'calls[1].thisArg');
-
-assert.sameValue(calls[2].args.length, 2, 'calls[2].args.length');
-assert.sameValue(calls[2].args[0], 43, 'calls[2].args[0]');
-assert.sameValue(calls[2].args[1], 2, 'calls[2].args[1]');
-assert.sameValue(calls[2].thisArg, this, 'calls[2].thisArg');
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+/*---
+esid: sec-array.from
+es6id: 22.1.2.1
+description: Map function without thisArg on non strict mode
+info: >
+ 22.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] )
+
+ ...
+ 10. Let len be ToLength(Get(arrayLike, "length")).
+ 11. ReturnIfAbrupt(len).
+ 12. If IsConstructor(C) is true, then
+ a. Let A be Construct(C, «len»).
+ 13. Else,
+ b. Let A be ArrayCreate(len).
+ 14. ReturnIfAbrupt(A).
+ 15. Let k be 0.
+ 16. Repeat, while k < len
+ a. Let Pk be ToString(k).
+ b. Let kValue be Get(arrayLike, Pk).
+ c. ReturnIfAbrupt(kValue).
+ d. If mapping is true, then
+ i. Let mappedValue be Call(mapfn, T, «kValue, k»).
+ ...
+flags: [noStrict]
+---*/
+
+var list = {
+ '0': 41,
+ '1': 42,
+ '2': 43,
+ length: 3
+};
+var calls = [];
+
+function mapFn (value) {
+ calls.push({
+ args: arguments,
+ thisArg: this
+ });
+ return value * 2;
+}
+
+var result = Array.from(list, mapFn);
+
+assert.sameValue(result.length, 3, 'result.length');
+assert.sameValue(result[0], 82, 'result[0]');
+assert.sameValue(result[1], 84, 'result[1]');
+assert.sameValue(result[2], 86, 'result[2]');
+
+assert.sameValue(calls.length, 3, 'calls.length');
+
+assert.sameValue(calls[0].args.length, 2, 'calls[0].args.length');
+assert.sameValue(calls[0].args[0], 41, 'calls[0].args[0]');
+assert.sameValue(calls[0].args[1], 0, 'calls[0].args[1]');
+assert.sameValue(calls[0].thisArg, this, 'calls[0].thisArg');
+
+assert.sameValue(calls[1].args.length, 2, 'calls[1].args.length');
+assert.sameValue(calls[1].args[0], 42, 'calls[1].args[0]');
+assert.sameValue(calls[1].args[1], 1, 'calls[1].args[1]');
+assert.sameValue(calls[1].thisArg, this, 'calls[1].thisArg');
+
+assert.sameValue(calls[2].args.length, 2, 'calls[2].args.length');
+assert.sameValue(calls[2].args[0], 43, 'calls[2].args[0]');
+assert.sameValue(calls[2].args[1], 2, 'calls[2].args[1]');
+assert.sameValue(calls[2].thisArg, this, 'calls[2].thisArg');
Modified: trunk/JSTests/test262/test/built-ins/Array/from/calling-from-valid-1-onlyStrict.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/calling-from-valid-1-onlyStrict.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/calling-from-valid-1-onlyStrict.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,67 +1,67 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-/*---
-esid: sec-array.from
-es6id: 22.1.2.1
-description: Map function without thisArg on strict mode
-info: >
- 22.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] )
-
- ...
- 10. Let len be ToLength(Get(arrayLike, "length")).
- 11. ReturnIfAbrupt(len).
- 12. If IsConstructor(C) is true, then
- a. Let A be Construct(C, «len»).
- 13. Else,
- b. Let A be ArrayCreate(len).
- 14. ReturnIfAbrupt(A).
- 15. Let k be 0.
- 16. Repeat, while k < len
- a. Let Pk be ToString(k).
- b. Let kValue be Get(arrayLike, Pk).
- c. ReturnIfAbrupt(kValue).
- d. If mapping is true, then
- i. Let mappedValue be Call(mapfn, T, «kValue, k»).
- ...
-flags: [onlyStrict]
----*/
-
-var list = {
- '0': 41,
- '1': 42,
- '2': 43,
- length: 3
-};
-var calls = [];
-
-function mapFn (value) {
- calls.push({
- args: arguments,
- thisArg: this
- });
- return value * 2;
-}
-
-var result = Array.from(list, mapFn);
-
-assert.sameValue(result.length, 3, 'result.length');
-assert.sameValue(result[0], 82, 'result[0]');
-assert.sameValue(result[1], 84, 'result[1]');
-assert.sameValue(result[2], 86, 'result[2]');
-
-assert.sameValue(calls.length, 3, 'calls.length');
-
-assert.sameValue(calls[0].args.length, 2, 'calls[0].args.length');
-assert.sameValue(calls[0].args[0], 41, 'calls[0].args[0]');
-assert.sameValue(calls[0].args[1], 0, 'calls[0].args[1]');
-assert.sameValue(calls[0].thisArg, undefined, 'calls[0].thisArg');
-
-assert.sameValue(calls[1].args.length, 2, 'calls[1].args.length');
-assert.sameValue(calls[1].args[0], 42, 'calls[1].args[0]');
-assert.sameValue(calls[1].args[1], 1, 'calls[1].args[1]');
-assert.sameValue(calls[1].thisArg, undefined, 'calls[1].thisArg');
-
-assert.sameValue(calls[2].args.length, 2, 'calls[2].args.length');
-assert.sameValue(calls[2].args[0], 43, 'calls[2].args[0]');
-assert.sameValue(calls[2].args[1], 2, 'calls[2].args[1]');
-assert.sameValue(calls[2].thisArg, undefined, 'calls[2].thisArg');
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+/*---
+esid: sec-array.from
+es6id: 22.1.2.1
+description: Map function without thisArg on strict mode
+info: >
+ 22.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] )
+
+ ...
+ 10. Let len be ToLength(Get(arrayLike, "length")).
+ 11. ReturnIfAbrupt(len).
+ 12. If IsConstructor(C) is true, then
+ a. Let A be Construct(C, «len»).
+ 13. Else,
+ b. Let A be ArrayCreate(len).
+ 14. ReturnIfAbrupt(A).
+ 15. Let k be 0.
+ 16. Repeat, while k < len
+ a. Let Pk be ToString(k).
+ b. Let kValue be Get(arrayLike, Pk).
+ c. ReturnIfAbrupt(kValue).
+ d. If mapping is true, then
+ i. Let mappedValue be Call(mapfn, T, «kValue, k»).
+ ...
+flags: [onlyStrict]
+---*/
+
+var list = {
+ '0': 41,
+ '1': 42,
+ '2': 43,
+ length: 3
+};
+var calls = [];
+
+function mapFn (value) {
+ calls.push({
+ args: arguments,
+ thisArg: this
+ });
+ return value * 2;
+}
+
+var result = Array.from(list, mapFn);
+
+assert.sameValue(result.length, 3, 'result.length');
+assert.sameValue(result[0], 82, 'result[0]');
+assert.sameValue(result[1], 84, 'result[1]');
+assert.sameValue(result[2], 86, 'result[2]');
+
+assert.sameValue(calls.length, 3, 'calls.length');
+
+assert.sameValue(calls[0].args.length, 2, 'calls[0].args.length');
+assert.sameValue(calls[0].args[0], 41, 'calls[0].args[0]');
+assert.sameValue(calls[0].args[1], 0, 'calls[0].args[1]');
+assert.sameValue(calls[0].thisArg, undefined, 'calls[0].thisArg');
+
+assert.sameValue(calls[1].args.length, 2, 'calls[1].args.length');
+assert.sameValue(calls[1].args[0], 42, 'calls[1].args[0]');
+assert.sameValue(calls[1].args[1], 1, 'calls[1].args[1]');
+assert.sameValue(calls[1].thisArg, undefined, 'calls[1].thisArg');
+
+assert.sameValue(calls[2].args.length, 2, 'calls[2].args.length');
+assert.sameValue(calls[2].args[0], 43, 'calls[2].args[0]');
+assert.sameValue(calls[2].args[1], 2, 'calls[2].args[1]');
+assert.sameValue(calls[2].thisArg, undefined, 'calls[2].thisArg');
Modified: trunk/JSTests/test262/test/built-ins/Array/from/calling-from-valid-2.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/calling-from-valid-2.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/calling-from-valid-2.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,68 +1,68 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-esid: sec-array.from
-es6id: 22.1.2.1
-description: Calling from with a valid map function with thisArg
-info: >
- 22.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] )
-
- ...
- 10. Let len be ToLength(Get(arrayLike, "length")).
- 11. ReturnIfAbrupt(len).
- 12. If IsConstructor(C) is true, then
- a. Let A be Construct(C, «len»).
- 13. Else,
- b. Let A be ArrayCreate(len).
- 14. ReturnIfAbrupt(A).
- 15. Let k be 0.
- 16. Repeat, while k < len
- a. Let Pk be ToString(k).
- b. Let kValue be Get(arrayLike, Pk).
- c. ReturnIfAbrupt(kValue).
- d. If mapping is true, then
- i. Let mappedValue be Call(mapfn, T, «kValue, k»).
- ...
----*/
-
-var list = {
- '0': 41,
- '1': 42,
- '2': 43,
- length: 3
-};
-var calls = [];
-var thisArg = {};
-
-function mapFn (value) {
- calls.push({
- args: arguments,
- thisArg: this
- });
- return value * 2;
-}
-
-var result = Array.from(list, mapFn, thisArg);
-
-assert.sameValue(result.length, 3, 'result.length');
-assert.sameValue(result[0], 82, 'result[0]');
-assert.sameValue(result[1], 84, 'result[1]');
-assert.sameValue(result[2], 86, 'result[2]');
-
-assert.sameValue(calls.length, 3, 'calls.length');
-
-assert.sameValue(calls[0].args.length, 2, 'calls[0].args.length');
-assert.sameValue(calls[0].args[0], 41, 'calls[0].args[0]');
-assert.sameValue(calls[0].args[1], 0, 'calls[0].args[1]');
-assert.sameValue(calls[0].thisArg, thisArg, 'calls[0].thisArg');
-
-assert.sameValue(calls[1].args.length, 2, 'calls[1].args.length');
-assert.sameValue(calls[1].args[0], 42, 'calls[1].args[0]');
-assert.sameValue(calls[1].args[1], 1, 'calls[1].args[1]');
-assert.sameValue(calls[1].thisArg, thisArg, 'calls[1].thisArg');
-
-assert.sameValue(calls[2].args.length, 2, 'calls[2].args.length');
-assert.sameValue(calls[2].args[0], 43, 'calls[2].args[0]');
-assert.sameValue(calls[2].args[1], 2, 'calls[2].args[1]');
-assert.sameValue(calls[2].thisArg, thisArg, 'calls[2].thisArg');
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+esid: sec-array.from
+es6id: 22.1.2.1
+description: Calling from with a valid map function with thisArg
+info: >
+ 22.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] )
+
+ ...
+ 10. Let len be ToLength(Get(arrayLike, "length")).
+ 11. ReturnIfAbrupt(len).
+ 12. If IsConstructor(C) is true, then
+ a. Let A be Construct(C, «len»).
+ 13. Else,
+ b. Let A be ArrayCreate(len).
+ 14. ReturnIfAbrupt(A).
+ 15. Let k be 0.
+ 16. Repeat, while k < len
+ a. Let Pk be ToString(k).
+ b. Let kValue be Get(arrayLike, Pk).
+ c. ReturnIfAbrupt(kValue).
+ d. If mapping is true, then
+ i. Let mappedValue be Call(mapfn, T, «kValue, k»).
+ ...
+---*/
+
+var list = {
+ '0': 41,
+ '1': 42,
+ '2': 43,
+ length: 3
+};
+var calls = [];
+var thisArg = {};
+
+function mapFn (value) {
+ calls.push({
+ args: arguments,
+ thisArg: this
+ });
+ return value * 2;
+}
+
+var result = Array.from(list, mapFn, thisArg);
+
+assert.sameValue(result.length, 3, 'result.length');
+assert.sameValue(result[0], 82, 'result[0]');
+assert.sameValue(result[1], 84, 'result[1]');
+assert.sameValue(result[2], 86, 'result[2]');
+
+assert.sameValue(calls.length, 3, 'calls.length');
+
+assert.sameValue(calls[0].args.length, 2, 'calls[0].args.length');
+assert.sameValue(calls[0].args[0], 41, 'calls[0].args[0]');
+assert.sameValue(calls[0].args[1], 0, 'calls[0].args[1]');
+assert.sameValue(calls[0].thisArg, thisArg, 'calls[0].thisArg');
+
+assert.sameValue(calls[1].args.length, 2, 'calls[1].args.length');
+assert.sameValue(calls[1].args[0], 42, 'calls[1].args[0]');
+assert.sameValue(calls[1].args[1], 1, 'calls[1].args[1]');
+assert.sameValue(calls[1].thisArg, thisArg, 'calls[1].thisArg');
+
+assert.sameValue(calls[2].args.length, 2, 'calls[2].args.length');
+assert.sameValue(calls[2].args[0], 43, 'calls[2].args[0]');
+assert.sameValue(calls[2].args[1], 2, 'calls[2].args[1]');
+assert.sameValue(calls[2].thisArg, thisArg, 'calls[2].thisArg');
Modified: trunk/JSTests/test262/test/built-ins/Array/from/elements-added-after.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/elements-added-after.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/elements-added-after.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,38 +1,38 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: Elements added after the call to from
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-var arrayIndex = -1;
-var originalLength = 7;
-var obj = {
- length: originalLength,
- 0: 2,
- 1: 4,
- 2: 8,
- 3: 16,
- 4: 32,
- 5: 64,
- 6: 128
-};
-var array = [ 2, 4, 8, 16, 32, 64, 128 ];
-function mapFn(value, index) {
- arrayIndex++;
- assert.sameValue(value, obj[arrayIndex], "Value mismatch in mapFn at index " + index + ".");
- assert.sameValue(index, arrayIndex, "Index mismatch in mapFn.");
- obj[originalLength + arrayIndex] = 2 * arrayIndex + 1;
-
- return obj[arrayIndex];
-}
-
-
-var a = Array.from(obj, mapFn);
-assert.sameValue(a.length, array.length, "Length mismatch.");
-
-for (var j = 0; j < a.length; j++) {
- assert.sameValue(a[j], array[j], "Element mismatch for array at index " + j + ".");
-}
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: Elements added after the call to from
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+var arrayIndex = -1;
+var originalLength = 7;
+var obj = {
+ length: originalLength,
+ 0: 2,
+ 1: 4,
+ 2: 8,
+ 3: 16,
+ 4: 32,
+ 5: 64,
+ 6: 128
+};
+var array = [ 2, 4, 8, 16, 32, 64, 128 ];
+function mapFn(value, index) {
+ arrayIndex++;
+ assert.sameValue(value, obj[arrayIndex], "Value mismatch in mapFn at index " + index + ".");
+ assert.sameValue(index, arrayIndex, "Index mismatch in mapFn.");
+ obj[originalLength + arrayIndex] = 2 * arrayIndex + 1;
+
+ return obj[arrayIndex];
+}
+
+
+var a = Array.from(obj, mapFn);
+assert.sameValue(a.length, array.length, "Length mismatch.");
+
+for (var j = 0; j < a.length; j++) {
+ assert.sameValue(a[j], array[j], "Element mismatch for array at index " + j + ".");
+}
Modified: trunk/JSTests/test262/test/built-ins/Array/from/elements-deleted-after.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/elements-deleted-after.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/elements-deleted-after.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,32 +1,32 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: >
- Elements deleted after the call started and before visited are not
- visited
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-var originalArray = [ 0, 1, -2, 4, -8, 16 ];
-var array = [ 0, 1, -2, 4, -8, 16 ];
-var a = [];
-var arrayIndex = -1;
-function mapFn(value, index) {
- this.arrayIndex++;
- assert.sameValue(value, array[this.arrayIndex], "Value mismatch in mapFn at index " + index + ".");
- assert.sameValue(index, this.arrayIndex, "Index mismatch in mapFn.");
-
- array.splice(array.length - 1, 1);
- return 127;
-}
-
-
-a = Array.from(array, mapFn, this);
-
-assert.sameValue(a.length, originalArray.length / 2, "Length mismatch. Old array : " + (originalArray.length / 2) + ". array : " + a.length + ".");
-
-for (var j = 0; j < originalArray.length / 2; j++) {
- assert.sameValue(a[j], 127, "Element mismatch for mapped array at index " + j + ".");
-}
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: >
+ Elements deleted after the call started and before visited are not
+ visited
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+var originalArray = [ 0, 1, -2, 4, -8, 16 ];
+var array = [ 0, 1, -2, 4, -8, 16 ];
+var a = [];
+var arrayIndex = -1;
+function mapFn(value, index) {
+ this.arrayIndex++;
+ assert.sameValue(value, array[this.arrayIndex], "Value mismatch in mapFn at index " + index + ".");
+ assert.sameValue(index, this.arrayIndex, "Index mismatch in mapFn.");
+
+ array.splice(array.length - 1, 1);
+ return 127;
+}
+
+
+a = Array.from(array, mapFn, this);
+
+assert.sameValue(a.length, originalArray.length / 2, "Length mismatch. Old array : " + (originalArray.length / 2) + ". array : " + a.length + ".");
+
+for (var j = 0; j < originalArray.length / 2; j++) {
+ assert.sameValue(a[j], 127, "Element mismatch for mapped array at index " + j + ".");
+}
Modified: trunk/JSTests/test262/test/built-ins/Array/from/elements-updated-after.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/elements-updated-after.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/elements-updated-after.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,27 +1,27 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: Elements are updated after the call to from
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-var array = [ 127, 4, 8, 16, 32, 64, 128 ];
-var arrayIndex = -1;
-function mapFn(value, index) {
- arrayIndex++;
- if (index + 1 < array.length) {
- array[index + 1] = 127;
- }
- assert.sameValue(value, 127, "Value mismatch in mapFn at index " + index + ".");
- assert.sameValue(index, arrayIndex, "Index mismatch in mapFn.");
-
- return value;
-}
-
-var a = Array.from(array, mapFn);
-assert.sameValue(a.length, array.length, "Length mismatch.");
-for (var j = 0; j < a.length; j++) {
- assert.sameValue(a[j], 127, "Element mismatch for mapped array.");
-}
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: Elements are updated after the call to from
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+var array = [ 127, 4, 8, 16, 32, 64, 128 ];
+var arrayIndex = -1;
+function mapFn(value, index) {
+ arrayIndex++;
+ if (index + 1 < array.length) {
+ array[index + 1] = 127;
+ }
+ assert.sameValue(value, 127, "Value mismatch in mapFn at index " + index + ".");
+ assert.sameValue(index, arrayIndex, "Index mismatch in mapFn.");
+
+ return value;
+}
+
+var a = Array.from(array, mapFn);
+assert.sameValue(a.length, array.length, "Length mismatch.");
+for (var j = 0; j < a.length; j++) {
+ assert.sameValue(a[j], 127, "Element mismatch for mapped array.");
+}
Modified: trunk/JSTests/test262/test/built-ins/Array/from/from-array.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/from-array.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/from-array.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,24 +1,24 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: Passing a valid array
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-var array = [0, 'foo', , Infinity];
-var result = Array.from(array);
-
-assert.sameValue(result.length, 4, 'result.length');
-assert.sameValue(result[0], 0, 'result[0]');
-assert.sameValue(result[1], 'foo', 'result[1]');
-assert.sameValue(result[2], undefined, 'result[2]');
-assert.sameValue(result[3], Infinity, 'result[3]');
-
-assert.notSameValue(
- result, array,
- 'result is not the object from items argument'
-);
-
-assert(result instanceof Array, 'result instanceof Array');
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: Passing a valid array
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+var array = [0, 'foo', , Infinity];
+var result = Array.from(array);
+
+assert.sameValue(result.length, 4, 'result.length');
+assert.sameValue(result[0], 0, 'result[0]');
+assert.sameValue(result[1], 'foo', 'result[1]');
+assert.sameValue(result[2], undefined, 'result[2]');
+assert.sameValue(result[3], Infinity, 'result[3]');
+
+assert.notSameValue(
+ result, array,
+ 'result is not the object from items argument'
+);
+
+assert(result instanceof Array, 'result instanceof Array');
Modified: trunk/JSTests/test262/test/built-ins/Array/from/mapfn-is-not-callable-typeerror.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/mapfn-is-not-callable-typeerror.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/mapfn-is-not-callable-typeerror.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,35 +1,35 @@
-// Copyright 2015 Leonardo Balter. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-/*---
-esid: sec-array.from
-es6id: 22.1.2.1
-description: Throws a TypeError if mapFn is not callable
-info: >
- 22.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] )
-
- ...
- 2. If mapfn is undefined, let mapping be false.
- 3. else
- a. If IsCallable(mapfn) is false, throw a TypeError exception.
- ...
----*/
-
-assert.throws(TypeError, function() {
- Array.from([], null);
-});
-
-assert.throws(TypeError, function() {
- Array.from([], {});
-});
-
-assert.throws(TypeError, function() {
- Array.from([], 'string');
-});
-
-assert.throws(TypeError, function() {
- Array.from([], true);
-});
-
-assert.throws(TypeError, function() {
- Array.from([], 42);
-});
+// Copyright 2015 Leonardo Balter. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+/*---
+esid: sec-array.from
+es6id: 22.1.2.1
+description: Throws a TypeError if mapFn is not callable
+info: >
+ 22.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] )
+
+ ...
+ 2. If mapfn is undefined, let mapping be false.
+ 3. else
+ a. If IsCallable(mapfn) is false, throw a TypeError exception.
+ ...
+---*/
+
+assert.throws(TypeError, function() {
+ Array.from([], null);
+});
+
+assert.throws(TypeError, function() {
+ Array.from([], {});
+});
+
+assert.throws(TypeError, function() {
+ Array.from([], 'string');
+});
+
+assert.throws(TypeError, function() {
+ Array.from([], true);
+});
+
+assert.throws(TypeError, function() {
+ Array.from([], 42);
+});
Modified: trunk/JSTests/test262/test/built-ins/Array/from/mapfn-throws-exception.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/mapfn-throws-exception.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/mapfn-throws-exception.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,15 +1,15 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: mapFn throws an exception
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-var array = [ 2, 4, 8, 16, 32, 64, 128 ];
-function mapFn(value, index, obj) {
- throw new Test262Error();
-}
-
-assert.throws(Test262Error, function(){Array.from(array, mapFn);});
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: mapFn throws an exception
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+var array = [ 2, 4, 8, 16, 32, 64, 128 ];
+function mapFn(value, index, obj) {
+ throw new Test262Error();
+}
+
+assert.throws(Test262Error, function(){Array.from(array, mapFn);});
Modified: trunk/JSTests/test262/test/built-ins/Array/from/source-array-boundary.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/source-array-boundary.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/source-array-boundary.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,27 +1,27 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: Source array with boundary values
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-var array = [ Number.MAX_VALUE, Number.MIN_VALUE, Number.NaN, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY ];
-var arrayIndex = -1;
-function mapFn(value, index) {
- this.arrayIndex++;
- assert.sameValue(value, array[this.arrayIndex], "Value mismatch in mapFn at index " + index + ".");
- assert.sameValue(index, this.arrayIndex, "Index mismatch in mapFn.");
-
- return value;
-}
-
-var a = Array.from(array, mapFn, this);
-
-assert.sameValue(a.length, array.length, "Length mismatch.");
-assert.sameValue(a[0], Number.MAX_VALUE, "Element mismatch for mapped array at index 0.");
-assert.sameValue(a[1], Number.MIN_VALUE, "Element mismatch for mapped array at index 1.");
-assert.sameValue(a[2], Number.NaN, "Element mismatch for mapped array at index 2.");
-assert.sameValue(a[3], Number.NEGATIVE_INFINITY, "Element mismatch for mapped array at index 3.");
-assert.sameValue(a[4], Number.POSITIVE_INFINITY, "Element mismatch for mapped array at index 4.");
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: Source array with boundary values
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+var array = [ Number.MAX_VALUE, Number.MIN_VALUE, Number.NaN, Number.NEGATIVE_INFINITY, Number.POSITIVE_INFINITY ];
+var arrayIndex = -1;
+function mapFn(value, index) {
+ this.arrayIndex++;
+ assert.sameValue(value, array[this.arrayIndex], "Value mismatch in mapFn at index " + index + ".");
+ assert.sameValue(index, this.arrayIndex, "Index mismatch in mapFn.");
+
+ return value;
+}
+
+var a = Array.from(array, mapFn, this);
+
+assert.sameValue(a.length, array.length, "Length mismatch.");
+assert.sameValue(a[0], Number.MAX_VALUE, "Element mismatch for mapped array at index 0.");
+assert.sameValue(a[1], Number.MIN_VALUE, "Element mismatch for mapped array at index 1.");
+assert.sameValue(a[2], Number.NaN, "Element mismatch for mapped array at index 2.");
+assert.sameValue(a[3], Number.NEGATIVE_INFINITY, "Element mismatch for mapped array at index 3.");
+assert.sameValue(a[4], Number.POSITIVE_INFINITY, "Element mismatch for mapped array at index 4.");
Modified: trunk/JSTests/test262/test/built-ins/Array/from/source-object-constructor.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/source-object-constructor.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/source-object-constructor.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,11 +1,11 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: >
- Array.from uses a constructor other than Array.
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-assert.sameValue(Array.from.call(Object, []).constructor, Object);
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: >
+ Array.from uses a constructor other than Array.
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+assert.sameValue(Array.from.call(Object, []).constructor, Object);
Modified: trunk/JSTests/test262/test/built-ins/Array/from/source-object-iterator-1.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/source-object-iterator-1.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/source-object-iterator-1.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,30 +1,30 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: Source object has iterator which throws
-esid: sec-array.from
-es6id: 22.1.2.1
-features: [Symbol.iterator]
----*/
-
-var array = [ 2, 4, 8, 16, 32, 64, 128 ];
-var obj = {
- [Symbol.iterator]() {
- return {
- index: 0,
- next() {
- throw new Test262Error();
- },
- isDone : false,
- get val() {
- this.index++;
- if (this.index > 7) {
- this.isDone = true;
- }
- return 1 << this.index;
- }
- };
- }
-};
-assert.throws(Test262Error, function(){Array.from(obj);});
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: Source object has iterator which throws
+esid: sec-array.from
+es6id: 22.1.2.1
+features: [Symbol.iterator]
+---*/
+
+var array = [ 2, 4, 8, 16, 32, 64, 128 ];
+var obj = {
+ [Symbol.iterator]() {
+ return {
+ index: 0,
+ next() {
+ throw new Test262Error();
+ },
+ isDone : false,
+ get val() {
+ this.index++;
+ if (this.index > 7) {
+ this.isDone = true;
+ }
+ return 1 << this.index;
+ }
+ };
+ }
+};
+assert.throws(Test262Error, function(){Array.from(obj);});
Modified: trunk/JSTests/test262/test/built-ins/Array/from/source-object-iterator-2.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/source-object-iterator-2.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/source-object-iterator-2.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,37 +1,37 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: Source object has iterator
-esid: sec-array.from
-es6id: 22.1.2.1
-features: [Symbol.iterator]
----*/
-
-var array = [ 2, 4, 8, 16, 32, 64, 128 ];
-var obj = {
- [Symbol.iterator]() {
- return {
- index: 0,
- next() {
- return {
- value: this.val,
- done: this.isDone
- };
- },
- isDone : false,
- get val() {
- this.index++;
- if (this.index > 7) {
- this.isDone = true;
- }
- return 1 << this.index;
- }
- };
- }
-};
-var a = Array.from.call(Object, obj);
-assert.sameValue(typeof a, typeof {}, "The returned type is expected to be object.");
-for (var j = 0; j < a.length; j++) {
- assert.sameValue(a[j], array[j], "Elements mismatch at " + j + ".");
-}
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: Source object has iterator
+esid: sec-array.from
+es6id: 22.1.2.1
+features: [Symbol.iterator]
+---*/
+
+var array = [ 2, 4, 8, 16, 32, 64, 128 ];
+var obj = {
+ [Symbol.iterator]() {
+ return {
+ index: 0,
+ next() {
+ return {
+ value: this.val,
+ done: this.isDone
+ };
+ },
+ isDone : false,
+ get val() {
+ this.index++;
+ if (this.index > 7) {
+ this.isDone = true;
+ }
+ return 1 << this.index;
+ }
+ };
+ }
+};
+var a = Array.from.call(Object, obj);
+assert.sameValue(typeof a, typeof {}, "The returned type is expected to be object.");
+for (var j = 0; j < a.length; j++) {
+ assert.sameValue(a[j], array[j], "Elements mismatch at " + j + ".");
+}
Modified: trunk/JSTests/test262/test/built-ins/Array/from/source-object-length.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/source-object-length.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/source-object-length.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,25 +1,25 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: >
- Source is an object with length property and one item is deleted
- from the source
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-var array = [2, 4, 0, 16];
-var expectedArray = [2, 4, , 16];
-var obj = {
- length : 4,
- 0 : 2,
- 1 : 4,
- 2 : 0,
- 3 : 16
-};
-delete obj[2];
-var a = Array.from(obj);
-for (var j = 0; j < expectedArray.length; j++) {
- assert.sameValue(a[j], expectedArray[j], "Elements mismatch at " + j + ".");
-}
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: >
+ Source is an object with length property and one item is deleted
+ from the source
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+var array = [2, 4, 0, 16];
+var expectedArray = [2, 4, , 16];
+var obj = {
+ length : 4,
+ 0 : 2,
+ 1 : 4,
+ 2 : 0,
+ 3 : 16
+};
+delete obj[2];
+var a = Array.from(obj);
+for (var j = 0; j < expectedArray.length; j++) {
+ assert.sameValue(a[j], expectedArray[j], "Elements mismatch at " + j + ".");
+}
Modified: trunk/JSTests/test262/test/built-ins/Array/from/source-object-missing.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/source-object-missing.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/source-object-missing.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,22 +1,22 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: Source is an object with missing values
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-var array = [2, 4, , 16];
-var obj = {
- length: 4,
- 0: 2,
- 1: 4,
- 3: 16
-};
-
-var a = Array.from.call(Object, obj);
-assert.sameValue(typeof a, "object", "The returned type is expected to be object.");
-for (var j = 0; j < a.length; j++) {
- assert.sameValue(a[j], array[j], "Elements mismatch at " + j + ".");
-}
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: Source is an object with missing values
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+var array = [2, 4, , 16];
+var obj = {
+ length: 4,
+ 0: 2,
+ 1: 4,
+ 3: 16
+};
+
+var a = Array.from.call(Object, obj);
+assert.sameValue(typeof a, "object", "The returned type is expected to be object.");
+for (var j = 0; j < a.length; j++) {
+ assert.sameValue(a[j], array[j], "Elements mismatch at " + j + ".");
+}
Modified: trunk/JSTests/test262/test/built-ins/Array/from/source-object-without.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/source-object-without.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/source-object-without.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,18 +1,18 @@
-// Copyright 2015 Microsoft Corporation. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-
-/*---
-description: Source is an object without length property
-esid: sec-array.from
-es6id: 22.1.2.1
----*/
-
-var obj = {
- 0: 2,
- 1: 4,
- 2: 8,
- 3: 16
-}
-
-var a = Array.from(obj);
-assert.sameValue(a.length, 0, "Expected an array of length 0.");
+// Copyright 2015 Microsoft Corporation. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+
+/*---
+description: Source is an object without length property
+esid: sec-array.from
+es6id: 22.1.2.1
+---*/
+
+var obj = {
+ 0: 2,
+ 1: 4,
+ 2: 8,
+ 3: 16
+}
+
+var a = Array.from(obj);
+assert.sameValue(a.length, 0, "Expected an array of length 0.");
Modified: trunk/JSTests/test262/test/built-ins/Array/from/this-null.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Array/from/this-null.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Array/from/this-null.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,12 +1,12 @@
-// Copyright 2015 Leonardo Balter. All rights reserved.
-// This code is governed by the license found in the LICENSE file.
-/*---
-esid: sec-array.from
-es6id: 22.1.2.1
-description: Does not throw if this is null
----*/
-
-var result = Array.from.call(null, []);
-
-assert(result instanceof Array, 'Does not throw if this is null');
-assert.sameValue(result.length, 0, 'result.length');
+// Copyright 2015 Leonardo Balter. All rights reserved.
+// This code is governed by the license found in the LICENSE file.
+/*---
+esid: sec-array.from
+es6id: 22.1.2.1
+description: Does not throw if this is null
+---*/
+
+var result = Array.from.call(null, []);
+
+assert(result instanceof Array, 'Does not throw if this is null');
+assert.sameValue(result.length, 0, 'result.length');
Modified: trunk/JSTests/test262/test/built-ins/Function/prototype/toString/line-terminator-normalisation-CR.js (222311 => 222312)
--- trunk/JSTests/test262/test/built-ins/Function/prototype/toString/line-terminator-normalisation-CR.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/built-ins/Function/prototype/toString/line-terminator-normalisation-CR.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -5,7 +5,7 @@
esid: sec-function-definitions-runtime-semantics-instantiatefunctionobject description: Function.prototype.toString line terminator normalisation (CR) info: >- Function.prototype.toString should normalise line terminator sequences to Line Feed characters.+ Function.prototype.toString should not normalise line terminator sequences to Line Feed characters. This file uses Carriage Return characters as line terminators. ---*/ @@ -33,4 +33,4 @@
} // after -assert.sameValue(f.toString(), "function\n// a\nf\n// b\n(\n// c\nx\n// d\n,\n// e\ny\n// f\n)\n// g\n{\n// h\n;\n// i\n;\n// j\n}");+assert.sameValue(f.toString(), "function\r// a\rf\r// b\r(\r// c\rx\r// d\r,\r// e\ry\r// f\r)\r// g\r{\r// h\r;\r// i\r;\r// j\r}");
Modified: trunk/JSTests/test262/test/language/line-terminators/S7.3_A3.2_T1.js (222311 => 222312)
--- trunk/JSTests/test262/test/language/line-terminators/S7.3_A3.2_T1.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/language/line-terminators/S7.3_A3.2_T1.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -5,8 +5,12 @@
info: Single line comments can not contain CARRIAGE RETURN (U+000D) inside
es5id: 7.3_A3.2_T1
description: Insert CARRIAGE RETURN (\u000D) into single line comment
-negative: SyntaxError
+negative:
+ phase: early
+ type: SyntaxError
---*/
+throw "Test262: This statement should not be evaluated.";
+
// single line comment ??? (invalid)
Modified: trunk/JSTests/test262/test/language/literals/numeric/7.8.3-1gs.js (222311 => 222312)
--- trunk/JSTests/test262/test/language/literals/numeric/7.8.3-1gs.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/language/literals/numeric/7.8.3-1gs.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -4,9 +4,12 @@
/*---
es5id: 7.8.3-1gs
description: Strict Mode - octal extension(010) is forbidden in strict mode
-negative: SyntaxError
+negative:
+ phase: early
+ type: SyntaxError
flags: [onlyStrict]
---*/
-throw NotEarlyError;
+throw "Test262: This statement should not be evaluated.";
+
var y = 010;
Modified: trunk/JSTests/test262/test/language/literals/numeric/7.8.3-2gs.js (222311 => 222312)
--- trunk/JSTests/test262/test/language/literals/numeric/7.8.3-2gs.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/language/literals/numeric/7.8.3-2gs.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -6,11 +6,14 @@
description: >
Strict Mode - octal extension is forbidden in strict mode (after a
hex number is assigned to a variable)
-negative: SyntaxError
+negative:
+ phase: early
+ type: SyntaxError
flags: [onlyStrict]
---*/
-throw NotEarlyError;
+throw "Test262: This statement should not be evaluated.";
+
var a;
a = 0x1;
a = 01;
Modified: trunk/JSTests/test262/test/language/literals/numeric/7.8.3-3gs.js (222311 => 222312)
--- trunk/JSTests/test262/test/language/literals/numeric/7.8.3-3gs.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/language/literals/numeric/7.8.3-3gs.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -6,9 +6,10 @@
description: >
Strict Mode - octal extension is forbidden in strict mode (after a
hex number is assigned to a variable from an eval)
-negative: SyntaxError
flags: [onlyStrict]
---*/
-var a;
-eval("a = 0x1;a = 01;");
+var a;
+assert.throws(SyntaxError, function() {
+ eval("a = 0x1;a = 01;");
+});
Modified: trunk/JSTests/test262/test/language/literals/regexp/7.8.5-1gs.js (222311 => 222312)
--- trunk/JSTests/test262/test/language/literals/regexp/7.8.5-1gs.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/language/literals/regexp/7.8.5-1gs.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -1,14 +1,14 @@
-// Copyright (c) 2012 Ecma International. All rights reserved.
-// This code is governed by the BSD license found in the LICENSE file.
-
-/*---
-es5id: 7.8.5-1gs
-description: Empty literal RegExp should result in a SyntaxError
-negative:
- phase: early
- type: SyntaxError
----*/
-
-throw "Test262: This statement should not be evaluated.";
-
-var re = //;
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 7.8.5-1gs
+description: Empty literal RegExp should result in a SyntaxError
+negative:
+ phase: early
+ type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+var re = //;
Modified: trunk/JSTests/test262/test/language/literals/string/7.8.4-1gs.js (222311 => 222312)
--- trunk/JSTests/test262/test/language/literals/string/7.8.4-1gs.js 2017-09-21 03:23:17 UTC (rev 222311)
+++ trunk/JSTests/test262/test/language/literals/string/7.8.4-1gs.js 2017-09-21 03:36:29 UTC (rev 222312)
@@ -6,9 +6,12 @@
description: >
Strict Mode - OctalEscapeSequence(\0110) is forbidden in strict
mode
-negative: SyntaxError
+negative:
+ phase: early
+ type: SyntaxError
flags: [onlyStrict]
---*/
-throw NotEarlyError;
+throw "Test262: This statement should not be evaluated.";
+
var _7_8_4_2 = '100abc\0110def';