Changeset 265071 in webkit


Ignore:
Timestamp:
Jul 29, 2020 5:14:31 PM (4 years ago)
Author:
ysuzuki@apple.com
Message:

[JSC] Upgrade test262
https://bugs.webkit.org/show_bug.cgi?id=214949

Reviewed by Ross Kirsling.

related-year-zh.js tests are updated and passing.

  • test262/config.yaml:
  • test262/latest-changes-summary.txt:
  • test262/test/intl402/DateTimeFormat/prototype/format/related-year-zh.js:
  • test262/test/intl402/DateTimeFormat/prototype/formatToParts/related-year-zh.js:

(actual.forEach):
(verifyFormatParts): Deleted.
(verifyFormatParts.df.formatToParts): Deleted.

  • test262/test/intl402/Segmenter/prototype/segment/segment-grapheme-iterable.js:

(const.v.of.seg.segment):

  • test262/test/intl402/Segmenter/prototype/segment/segment-grapheme.js: Removed.
  • test262/test/intl402/Segmenter/prototype/segment/segment-sentence-iterable.js:

(const.v.of.seg.segment):

  • test262/test/intl402/Segmenter/prototype/segment/segment-sentence.js: Removed.
  • test262/test/intl402/Segmenter/prototype/segment/segment-tostring.js:
  • test262/test/intl402/Segmenter/prototype/segment/segment-word-iterable.js:

(const.v.of.seg.segment):

  • test262/test/intl402/Segmenter/prototype/segment/segment-word.js: Removed.
  • test262/test262-Revision.txt:
Location:
trunk/JSTests
Files:
3 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r265069 r265071  
     12020-07-29  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Upgrade test262
     4        https://bugs.webkit.org/show_bug.cgi?id=214949
     5
     6        Reviewed by Ross Kirsling.
     7
     8        related-year-zh.js tests are updated and passing.
     9
     10        * test262/config.yaml:
     11        * test262/latest-changes-summary.txt:
     12        * test262/test/intl402/DateTimeFormat/prototype/format/related-year-zh.js:
     13        * test262/test/intl402/DateTimeFormat/prototype/formatToParts/related-year-zh.js:
     14        (actual.forEach):
     15        (verifyFormatParts): Deleted.
     16        (verifyFormatParts.df.formatToParts): Deleted.
     17        * test262/test/intl402/Segmenter/prototype/segment/segment-grapheme-iterable.js:
     18        (const.v.of.seg.segment):
     19        * test262/test/intl402/Segmenter/prototype/segment/segment-grapheme.js: Removed.
     20        * test262/test/intl402/Segmenter/prototype/segment/segment-sentence-iterable.js:
     21        (const.v.of.seg.segment):
     22        * test262/test/intl402/Segmenter/prototype/segment/segment-sentence.js: Removed.
     23        * test262/test/intl402/Segmenter/prototype/segment/segment-tostring.js:
     24        * test262/test/intl402/Segmenter/prototype/segment/segment-word-iterable.js:
     25        (const.v.of.seg.segment):
     26        * test262/test/intl402/Segmenter/prototype/segment/segment-word.js: Removed.
     27        * test262/test262-Revision.txt:
     28
    1292020-07-29  Yusuke Suzuki  <ysuzuki@apple.com>
    230
  • trunk/JSTests/test262/config.yaml

    r264894 r265071  
    122122    - test/built-ins/TypedArrayConstructors/prototype/values/bigint-inherited.js
    123123
    124     # These tests require macOS system ICU to actually update its CLDR data >:(
    125     # https://bugs.webkit.org/show_bug.cgi?id=209783
    126     - test/intl402/DateTimeFormat/prototype/format/related-year-zh.js
    127     - test/intl402/DateTimeFormat/prototype/formatToParts/related-year-zh.js
    128 
    129124    # requires ICU 65 (https://unicode-org.atlassian.net/browse/ICU-20654)
    130125    - test/intl402/RelativeTimeFormat/prototype/format/en-us-numeric-auto.js
  • trunk/JSTests/test262/latest-changes-summary.txt

    r264894 r265071  
    1 M harness/async-gc.js
    2 A test/annexB/language/expressions/typeof/emulates-undefined.js
    3 M test/built-ins/FinalizationRegistry/gc-has-one-chance-to-call-cleanupCallback.js
    4 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/callback-not-callable-throws.js
    5 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-reference.js
    6 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/cleanup-prevented-with-unregister.js
    7 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/custom-this.js
    8 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/holdings-multiple-values.js
    9 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/length.js
    10 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/name.js
    11 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/prop-desc.js
    12 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/reentrancy.js
    13 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined-with-gc.js
    14 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/return-undefined.js
    15 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-does-not-have-internal-cells-throws.js
    16 M test/built-ins/FinalizationRegistry/prototype/cleanupSome/this-not-object-throws.js
    17 M test/built-ins/FinalizationRegistry/prototype/unregister/unregister-cleaned-up-cell.js
    18 M test/built-ins/WeakRef/prototype/deref/gc-cleanup-not-prevented-with-wr-deref.js
    19 M test/intl402/DisplayNames/length.js
     1M test/intl402/DateTimeFormat/prototype/format/related-year-zh.js
     2M test/intl402/DateTimeFormat/prototype/formatToParts/related-year-zh.js
     3M test/intl402/Segmenter/prototype/segment/segment-grapheme-iterable.js
     4D test/intl402/Segmenter/prototype/segment/segment-grapheme.js
     5M test/intl402/Segmenter/prototype/segment/segment-sentence-iterable.js
     6D test/intl402/Segmenter/prototype/segment/segment-sentence.js
     7M test/intl402/Segmenter/prototype/segment/segment-tostring.js
     8M test/intl402/Segmenter/prototype/segment/segment-word-iterable.js
     9D test/intl402/Segmenter/prototype/segment/segment-word.js
  • trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/format/related-year-zh.js

    r257590 r265071  
    11// Copyright 2019 Google Inc, Igalia S.L. All rights reserved.
     2// Copyright 2020 Apple Inc. All rights reserved.
    23// This code is governed by the BSD license found in the LICENSE file.
    34
     
    1213const df = new Intl.DateTimeFormat("zh-u-ca-chinese", {year: "numeric"});
    1314const date = new Date(2019, 5, 1);
    14 assert.sameValue(df.format(date), "2019己亥年");
     15const formatted = df.format(date);
     16const expected = ["2019己亥年", "己亥年"];
     17assert(expected.includes(formatted));
  • trunk/JSTests/test262/test/intl402/DateTimeFormat/prototype/formatToParts/related-year-zh.js

    r257590 r265071  
    11// Copyright 2019 Google Inc, Igalia S.L. All rights reserved.
     2// Copyright 2020 Apple Inc. All rights reserved.
    23// This code is governed by the BSD license found in the LICENSE file.
    34
     
    1011---*/
    1112
    12 function verifyFormatParts(actual, expected, message) {
    13   assert.sameValue(Array.isArray(expected), true, `${message}: expected is Array`);
    14   assert.sameValue(Array.isArray(actual), true, `${message}: actual is Array`);
    15   assert.sameValue(actual.length, expected.length, `${message}: length`);
    16 
    17   for (let i = 0; i < actual.length; ++i) {
    18     assert.sameValue(actual[i].type, expected[i].type, `${message}: parts[${i}].type`);
    19     assert.sameValue(actual[i].value, expected[i].value, `${message}: parts[${i}].value`);
    20   }
    21 }
    22 
    2313const df = new Intl.DateTimeFormat("zh-u-ca-chinese", {year: "numeric"});
    2414const date = new Date(2019, 5, 1);
    25 verifyFormatParts(df.formatToParts(date), [
     15const actual = df.formatToParts(date);
     16
     17const expected = [
    2618  {type: "relatedYear", value: "2019"},
    2719  {type: "yearName", value: "己亥"},
    2820  {type: "literal", value: "年"},
    29 ]);
     21];
     22
     23assert.sameValue(Array.isArray(actual), true, 'actual is Array');
     24
     25if (actual.length <= 2) {
     26  expected.shift(); // removes the relatedYear
     27}
     28
     29actual.forEach(({ type, value }, i) => {
     30  const { type: eType, value: eValue } = expected[i];
     31  assert.sameValue(type, eType, `actual[${i}].type should be ${eType}`);
     32  assert.sameValue(value, eValue, `actual[${i}].value should be ${eValue}`);
     33});
  • trunk/JSTests/test262/test/intl402/Segmenter/prototype/segment/segment-grapheme-iterable.js

    r263177 r265071  
    11// Copyright 2018 the V8 project authors. All rights reserved.
     2// Copyright 2020 Apple Inc. All rights reserved.
    23// This code is governed by the BSD license found in the LICENSE file.
    34
     
    3233  for (const v of seg.segment(text)) {
    3334    assert.sameValue(undefined, v.isWordLike);
     35    assert.sameValue(false, v.hasOwnProperty("isWordLike"));
    3436    assert.sameValue("string", typeof v.segment);
    3537    assert(v.segment.length > 0);
     38    assert.sameValue("string", typeof v.input);
     39    assert.sameValue(text, v.input);
    3640    segments.push(v.segment);
    3741  }
  • trunk/JSTests/test262/test/intl402/Segmenter/prototype/segment/segment-sentence-iterable.js

    r263177 r265071  
    11// Copyright 2018 the V8 project authors. All rights reserved.
     2// Copyright 2020 Apple Inc. All rights reserved.
    23// This code is governed by the BSD license found in the LICENSE file.
    34
     
    3233  for (const v of seg.segment(text)) {
    3334    assert.sameValue(undefined, v.isWordLike);
     35    assert.sameValue(false, v.hasOwnProperty("isWordLike"));
    3436    assert.sameValue("string", typeof v.segment);
    3537    assert(v.segment.length > 0);
     38    assert.sameValue("string", typeof v.input);
     39    assert.sameValue(text, v.input);
    3640    segments.push(v.segment);
    3741  }
  • trunk/JSTests/test262/test/intl402/Segmenter/prototype/segment/segment-tostring.js

    r263177 r265071  
    2727for (const [args, expected] of tests) {
    2828  const segments = segmenter.segment(...args);
    29   assert.sameValue(segments.string, expected, `Expected segment "${expected}", found "${segments.segment}" for arguments ${args}`);
     29  const actual = [...segments][0].segment;
     30  assert.sameValue(actual, expected, `Expected segment "${expected}", found "${actual}" for arguments ${args}`);
    3031}
    3132
  • trunk/JSTests/test262/test/intl402/Segmenter/prototype/segment/segment-word-iterable.js

    r263177 r265071  
    11// Copyright 2018 the V8 project authors. All rights reserved.
     2// Copyright 2020 Apple Inc. All rights reserved.
    23// This code is governed by the BSD license found in the LICENSE file.
    34
     
    3233  for (const v of seg.segment(text)) {
    3334    assert.sameValue("boolean", typeof v.isWordLike);
     35    assert.sameValue(true, v.hasOwnProperty("isWordLike"));
    3436    assert.sameValue("string", typeof v.segment);
    3537    assert(v.segment.length > 0);
     38    assert.sameValue("string", typeof v.input);
     39    assert.sameValue(text, v.input);
    3640    segments.push(v.segment);
    3741  }
  • trunk/JSTests/test262/test262-Revision.txt

    r264894 r265071  
    11test262 remote url: git@github.com:tc39/test262.git
    2 test262 revision: c619375b46fb5a58b93d02a3d525f444c074e98b
     2test262 revision: f6a9847c730041c2d1bd2acc03caeb92370e6bd9
Note: See TracChangeset for help on using the changeset viewer.