Title: [266091] trunk/JSTests
Revision
266091
Author
keith_mil...@apple.com
Date
2020-08-24 17:05:58 -0700 (Mon, 24 Aug 2020)

Log Message

Update test262 (mid Aug 2020 edition)
https://bugs.webkit.org/show_bug.cgi?id=215784

Rubber-stamped by Saam Barati and Yusuke Suzuki.

* test262/expectations.yaml:
* test262/latest-changes-summary.txt:
* test262/test/built-ins/String/prototype/split/limit-touint32-error.js: Added.
(ExpectedError):
(ExpectedError.prototype.toString):
(nonStringableSeparator.Symbol.toPrimitive):
(nonStringableSeparator.toString):
(nonStringableSeparator.valueOf):
(nonNumberableLimit.Symbol.toPrimitive):
* test262/test/built-ins/String/prototype/split/separator-tostring-error.js: Added.
(ExpectedError):
(ExpectedError.prototype.toString):
(nonStringableSeparator.toString):
* test262/test/built-ins/String/prototype/split/separator-undef-limit-zero.js:
* test262/test/built-ins/String/prototype/split/this-value-tostring-error.js: Added.
(ExpectedError):
(ExpectedError.prototype.toString):
(nonStringableReceiver.toString):
(splitter.Symbol.split):
(catch):
(nonStringableSeparator.Symbol.toPrimitive):
(nonStringableSeparator.toString):
(nonStringableSeparator.valueOf):
* test262/test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js: Added.
(A):
(export.default.async A):
* test262/test/language/module-code/export-default-asyncfunction-declaration-binding.js: Added.
(export.default.async A):
* test262/test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js: Added.
(AG):
(export.default.async AG):
* test262/test/language/module-code/export-default-asyncgenerator-declaration-binding.js: Added.
(export.default.async AG):
* test262/test/language/module-code/export-default-function-declaration-binding-exists.js: Added.
(F):
(export.default.F):
* test262/test/language/module-code/export-default-function-declaration-binding.js: Added.
(export.default.F):
* test262/test/language/module-code/export-default-generator-declaration-binding-exists.js: Added.
(G):
(export.default.G):
* test262/test/language/module-code/export-default-generator-declaration-binding.js: Added.
(export.default.G):
* test262/test262-Revision.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (266090 => 266091)


--- trunk/JSTests/ChangeLog	2020-08-24 22:48:19 UTC (rev 266090)
+++ trunk/JSTests/ChangeLog	2020-08-25 00:05:58 UTC (rev 266091)
@@ -1,3 +1,55 @@
+2020-08-24  Keith Miller  <keith_mil...@apple.com>
+
+        Update test262 (mid Aug 2020 edition)
+        https://bugs.webkit.org/show_bug.cgi?id=215784
+
+        Rubber-stamped by Saam Barati and Yusuke Suzuki.
+
+        * test262/expectations.yaml:
+        * test262/latest-changes-summary.txt:
+        * test262/test/built-ins/String/prototype/split/limit-touint32-error.js: Added.
+        (ExpectedError):
+        (ExpectedError.prototype.toString):
+        (nonStringableSeparator.Symbol.toPrimitive):
+        (nonStringableSeparator.toString):
+        (nonStringableSeparator.valueOf):
+        (nonNumberableLimit.Symbol.toPrimitive):
+        * test262/test/built-ins/String/prototype/split/separator-tostring-error.js: Added.
+        (ExpectedError):
+        (ExpectedError.prototype.toString):
+        (nonStringableSeparator.toString):
+        * test262/test/built-ins/String/prototype/split/separator-undef-limit-zero.js:
+        * test262/test/built-ins/String/prototype/split/this-value-tostring-error.js: Added.
+        (ExpectedError):
+        (ExpectedError.prototype.toString):
+        (nonStringableReceiver.toString):
+        (splitter.Symbol.split):
+        (catch):
+        (nonStringableSeparator.Symbol.toPrimitive):
+        (nonStringableSeparator.toString):
+        (nonStringableSeparator.valueOf):
+        * test262/test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js: Added.
+        (A):
+        (export.default.async A):
+        * test262/test/language/module-code/export-default-asyncfunction-declaration-binding.js: Added.
+        (export.default.async A):
+        * test262/test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js: Added.
+        (AG):
+        (export.default.async AG):
+        * test262/test/language/module-code/export-default-asyncgenerator-declaration-binding.js: Added.
+        (export.default.async AG):
+        * test262/test/language/module-code/export-default-function-declaration-binding-exists.js: Added.
+        (F):
+        (export.default.F):
+        * test262/test/language/module-code/export-default-function-declaration-binding.js: Added.
+        (export.default.F):
+        * test262/test/language/module-code/export-default-generator-declaration-binding-exists.js: Added.
+        (G):
+        (export.default.G):
+        * test262/test/language/module-code/export-default-generator-declaration-binding.js: Added.
+        (export.default.G):
+        * test262/test262-Revision.txt:
+
 2020-08-24  Yusuke Suzuki  <ysuz...@apple.com>
 
         Unreviewed, ignore RangeErrors when ICU is too old

Modified: trunk/JSTests/test262/expectations.yaml (266090 => 266091)


--- trunk/JSTests/test262/expectations.yaml	2020-08-24 22:48:19 UTC (rev 266090)
+++ trunk/JSTests/test262/expectations.yaml	2020-08-25 00:05:58 UTC (rev 266091)
@@ -2882,6 +2882,8 @@
   module: "SyntaxError: Unexpected identifier 'as'. Expected 'from' before exported module name."
 test/language/module-code/eval-self-once.js:
   module: "SyntaxError: Unexpected identifier 'as'. Expected 'from' before exported module name."
+test/language/module-code/export-default-asyncgenerator-declaration-binding.js:
+  module: "SyntaxError: Exported binding 'starDefault' needs to refer to a top-level declared variable."
 test/language/module-code/export-star-as-dflt.js:
   module: "SyntaxError: Unexpected identifier 'as'. Expected 'from' before exported module name."
 test/language/module-code/instn-once.js:

Modified: trunk/JSTests/test262/latest-changes-summary.txt (266090 => 266091)


--- trunk/JSTests/test262/latest-changes-summary.txt	2020-08-24 22:48:19 UTC (rev 266090)
+++ trunk/JSTests/test262/latest-changes-summary.txt	2020-08-25 00:05:58 UTC (rev 266091)
@@ -39,6 +39,10 @@
 M test/built-ins/Function/prototype/toString/built-in-function-object.js
 D test/built-ins/Function/prototype/toString/well-known-intrinsic-object-functions.js
 A test/built-ins/GeneratorFunction/prototype/not-callable.js
+A test/built-ins/String/prototype/split/limit-touint32-error.js
+A test/built-ins/String/prototype/split/separator-tostring-error.js
+M test/built-ins/String/prototype/split/separator-undef-limit-zero.js
+A test/built-ins/String/prototype/split/this-value-tostring-error.js
 M test/harness/nativeFunctionMatcher.js
 M test/intl402/Intl/builtin.js
 D test/intl402/Intl/proto.js
@@ -165,6 +169,14 @@
 A test/language/identifiers/start-zwj-escaped.js
 A test/language/identifiers/start-zwnj-escaped.js
 A test/language/literals/string/legacy-non-octal-escape-sequence-9-strict.js
+A test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js
+A test/language/module-code/export-default-asyncfunction-declaration-binding.js
+A test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js
+A test/language/module-code/export-default-asyncgenerator-declaration-binding.js
+A test/language/module-code/export-default-function-declaration-binding-exists.js
+A test/language/module-code/export-default-function-declaration-binding.js
+A test/language/module-code/export-default-generator-declaration-binding-exists.js
+A test/language/module-code/export-default-generator-declaration-binding.js
 A test/language/statements/async-generator/dstr/ary-init-iter-get-err-array-prototype.js
 A test/language/statements/async-generator/dstr/ary-ptrn-elem-id-iter-val-array-prototype.js
 A test/language/statements/async-generator/dstr/ary-ptrn-rest-id-direct.js

Added: trunk/JSTests/test262/test/built-ins/String/prototype/split/limit-touint32-error.js (0 => 266091)


--- trunk/JSTests/test262/test/built-ins/String/prototype/split/limit-touint32-error.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/String/prototype/split/limit-touint32-error.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,30 @@
+// Copyright (C) 2020 Richard Gibson. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-string.prototype.split
+description: Abrupt completion from ToUint32 on the limit
+info: |
+  1. If _limit_ is *undefined*, let _lim_ be 2<sup>32</sup> - 1; else let _lim_ be ? ToUint32(_limit_).
+  1. Let _R_ be ? ToString(_separator_).
+  1. If _lim_ = 0, return _A_.
+---*/
+
+function ExpectedError(message) {
+  this.message = message || "";
+}
+ExpectedError.prototype.toString = function () {
+  return "ExpectedError: " + this.message;
+};
+
+var nonStringableSeparator = {};
+nonStringableSeparator[Symbol.toPrimitive] =
+  function() { throw new Test262Error("separator[Symbol.toPrimitive]"); };
+nonStringableSeparator.toString = function() { throw new Test262Error("separator.toString"); };
+nonStringableSeparator.valueOf = function() { throw new Test262Error("separator.valueOf"); };
+
+var nonNumberableLimit = {};
+nonNumberableLimit[Symbol.toPrimitive] = function() { throw new ExpectedError(); };
+
+assert.throws(ExpectedError, function() {
+  "foo".split(nonStringableSeparator, nonNumberableLimit);
+}, 'ToUint32 should be called on the limit before ToString on the separator.');

Added: trunk/JSTests/test262/test/built-ins/String/prototype/split/separator-tostring-error.js (0 => 266091)


--- trunk/JSTests/test262/test/built-ins/String/prototype/split/separator-tostring-error.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/String/prototype/split/separator-tostring-error.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,23 @@
+// Copyright (C) 2020 Richard Gibson. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-string.prototype.split
+description: Abrupt completion from ToString on the separator
+info: |
+  1. Let _R_ be ? ToString(_separator_).
+  1. If _lim_ = 0, return _A_.
+---*/
+
+function ExpectedError(message) {
+  this.message = message || "";
+}
+ExpectedError.prototype.toString = function () {
+  return "ExpectedError: " + this.message;
+};
+
+var nonStringableSeparator = {};
+nonStringableSeparator.toString = function() { throw new ExpectedError(); };
+
+assert.throws(ExpectedError, function() {
+  "foo".split(nonStringableSeparator, 0);
+}, 'ToString should be called on the separator before checking if the limit is zero.');

Modified: trunk/JSTests/test262/test/built-ins/String/prototype/split/separator-undef-limit-zero.js (266090 => 266091)


--- trunk/JSTests/test262/test/built-ins/String/prototype/split/separator-undef-limit-zero.js	2020-08-24 22:48:19 UTC (rev 266090)
+++ trunk/JSTests/test262/test/built-ins/String/prototype/split/separator-undef-limit-zero.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -17,7 +17,7 @@
   1. Let number be ? ToNumber(argument).
   2. If number is NaN, +0, -0, +∞, or -∞, return +0.
   3. Let int be the Number value that is the same sign as number and whose magnitude is floor(abs(number)).
-  4. Let int32bit be int modulo 232.
+  4. Let int32bit be int modulo 2**32.
   5. Return int32bit.
 ---*/
 

Added: trunk/JSTests/test262/test/built-ins/String/prototype/split/this-value-tostring-error.js (0 => 266091)


--- trunk/JSTests/test262/test/built-ins/String/prototype/split/this-value-tostring-error.js	                        (rev 0)
+++ trunk/JSTests/test262/test/built-ins/String/prototype/split/this-value-tostring-error.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,45 @@
+// Copyright (C) 2020 Richard Gibson. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-string.prototype.split
+description: Abrupt completion from ToString on the "this" value
+info: |
+  1. Let _O_ be ? RequireObjectCoercible(*this* value).
+  1. If _separator_ is neither *undefined* nor *null*, then
+    1. Let _splitter_ be ? GetMethod(_separator_, @@split).
+    1. If _splitter_ is not *undefined*, then
+      1. Return ? Call(_splitter_, _separator_, &laquo; _O_, _limit_ &raquo;).
+  1. Let _S_ be ? ToString(_O_).
+---*/
+
+function ExpectedError(message) {
+  this.message = message || "";
+}
+ExpectedError.prototype.toString = function () {
+  return "ExpectedError: " + this.message;
+};
+
+var split = String.prototype.split;
+
+var nonStringableReceiver = {};
+nonStringableReceiver.toString = function() { throw new ExpectedError("receiver.toString"); };
+
+var splitter = {};
+splitter[Symbol.split] = function() {};
+
+try {
+  split.call(nonStringableReceiver, splitter, Symbol());
+} catch (e) {
+  assert.sameValue(e, undefined,
+      'ToString should not be called on the receiver when the separator has a @@split method.');
+}
+
+var nonStringableSeparator = {};
+nonStringableSeparator[Symbol.toPrimitive] =
+  function() { throw new Test262Error("separator[Symbol.toPrimitive]"); };
+nonStringableSeparator.toString = function() { throw new Test262Error("separator.toString"); };
+nonStringableSeparator.valueOf = function() { throw new Test262Error("separator.valueOf"); };
+
+assert.throws(ExpectedError, function() {
+  split.call(nonStringableReceiver, nonStringableSeparator, Symbol());
+}, 'ToString should be called on the receiver before processing the separator or limit.');

Added: trunk/JSTests/test262/test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js (0 => 266091)


--- trunk/JSTests/test262/test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/module-code/export-default-asyncfunction-declaration-binding-exists.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,23 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+  ExportDeclaration : HoistableDeclaration : AsyncFunctionDeclaration
+  esid: prod-HoistableDeclaration
+info: |
+  ExportDeclaration :
+    HoistableDeclaration[Yield, Await, Default]:
+
+  HoistableDeclaration[Yield, Await, Default]:
+    AsyncFunctionDeclaration[?Yield, ?Await, ?Default]
+
+flags: [module]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class A {};
+export default async function A() {}

Added: trunk/JSTests/test262/test/language/module-code/export-default-asyncfunction-declaration-binding.js (0 => 266091)


--- trunk/JSTests/test262/test/language/module-code/export-default-asyncfunction-declaration-binding.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/module-code/export-default-asyncfunction-declaration-binding.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,18 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+  ExportDeclaration : HoistableDeclaration : AsyncFunctionDeclaration
+  esid: prod-HoistableDeclaration
+info: |
+  ExportDeclaration :
+    HoistableDeclaration[Yield, Await, Default]:
+
+  HoistableDeclaration[Yield, Await, Default]:
+    AsyncFunctionDeclaration[?Yield, ?Await, ?Default]
+
+flags: [module]
+---*/
+
+export default async function A() {}
+A.foo = '';

Added: trunk/JSTests/test262/test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js (0 => 266091)


--- trunk/JSTests/test262/test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/module-code/export-default-asyncgenerator-declaration-binding-exists.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,23 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+  ExportDeclaration : HoistableDeclaration : AsyncGeneratorDeclaration
+  esid: prod-HoistableDeclaration
+info: |
+  ExportDeclaration :
+    HoistableDeclaration[Yield, Await, Default]:
+
+  HoistableDeclaration[Yield, Await, Default]:
+    AsyncGeneratorDeclaration[?Yield, ?Await, ?Default]
+
+flags: [module]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class AG {}
+export default async function * AG() {}

Added: trunk/JSTests/test262/test/language/module-code/export-default-asyncgenerator-declaration-binding.js (0 => 266091)


--- trunk/JSTests/test262/test/language/module-code/export-default-asyncgenerator-declaration-binding.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/module-code/export-default-asyncgenerator-declaration-binding.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,18 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+  ExportDeclaration : HoistableDeclaration : AsyncGeneratorDeclaration
+  esid: prod-HoistableDeclaration
+info: |
+  ExportDeclaration :
+    HoistableDeclaration[Yield, Await, Default]:
+
+  HoistableDeclaration[Yield, Await, Default]:
+    AsyncGeneratorDeclaration[?Yield, ?Await, ?Default]
+
+flags: [module]
+---*/
+
+export default async function * AG() {}
+AG.foo = '';

Added: trunk/JSTests/test262/test/language/module-code/export-default-function-declaration-binding-exists.js (0 => 266091)


--- trunk/JSTests/test262/test/language/module-code/export-default-function-declaration-binding-exists.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/module-code/export-default-function-declaration-binding-exists.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,24 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+  ExportDeclaration : HoistableDeclaration : FunctionDeclaration
+  esid: prod-HoistableDeclaration
+info: |
+  ExportDeclaration :
+    HoistableDeclaration[Yield, Await, Default]:
+
+  HoistableDeclaration[Yield, Await, Default]:
+    FunctionDeclaration[?Yield, ?Await, ?Default]
+
+flags: [module]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class F {}
+export default function F() {}
+

Added: trunk/JSTests/test262/test/language/module-code/export-default-function-declaration-binding.js (0 => 266091)


--- trunk/JSTests/test262/test/language/module-code/export-default-function-declaration-binding.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/module-code/export-default-function-declaration-binding.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,18 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+  ExportDeclaration : HoistableDeclaration : FunctionDeclaration
+  esid: prod-HoistableDeclaration
+info: |
+  ExportDeclaration :
+    HoistableDeclaration[Yield, Await, Default]:
+
+  HoistableDeclaration[Yield, Await, Default]:
+    FunctionDeclaration[?Yield, ?Await, ?Default]
+
+flags: [module]
+---*/
+
+export default function F() {}
+F.foo = '';

Added: trunk/JSTests/test262/test/language/module-code/export-default-generator-declaration-binding-exists.js (0 => 266091)


--- trunk/JSTests/test262/test/language/module-code/export-default-generator-declaration-binding-exists.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/module-code/export-default-generator-declaration-binding-exists.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,23 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+  ExportDeclaration : HoistableDeclaration : GeneratorDeclaration
+  esid: prod-HoistableDeclaration
+info: |
+  ExportDeclaration :
+    HoistableDeclaration[Yield, Await, Default]:
+
+  HoistableDeclaration[Yield, Await, Default]:
+    GeneratorDeclaration[?Yield, ?Await, ?Default]
+
+flags: [module]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+class G {}
+export default function * G() {}

Added: trunk/JSTests/test262/test/language/module-code/export-default-generator-declaration-binding.js (0 => 266091)


--- trunk/JSTests/test262/test/language/module-code/export-default-generator-declaration-binding.js	                        (rev 0)
+++ trunk/JSTests/test262/test/language/module-code/export-default-generator-declaration-binding.js	2020-08-25 00:05:58 UTC (rev 266091)
@@ -0,0 +1,18 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+  ExportDeclaration : HoistableDeclaration : GeneratorDeclaration
+  esid: prod-HoistableDeclaration
+info: |
+  ExportDeclaration :
+    HoistableDeclaration[Yield, Await, Default]:
+
+  HoistableDeclaration[Yield, Await, Default]:
+    GeneratorDeclaration[?Yield, ?Await, ?Default]
+
+flags: [module]
+---*/
+
+export default function * G() {}
+G.foo = '';

Modified: trunk/JSTests/test262/test262-Revision.txt (266090 => 266091)


--- trunk/JSTests/test262/test262-Revision.txt	2020-08-24 22:48:19 UTC (rev 266090)
+++ trunk/JSTests/test262/test262-Revision.txt	2020-08-25 00:05:58 UTC (rev 266091)
@@ -1,2 +1,2 @@
 test262 remote url: g...@github.com:tc39/test262.git
-test262 revision: e0a65ee75ef837276664ccf65358ebe4cceba4c0
+test262 revision: 24c67328062383079ada85f4d253eb0526fd209b
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to