Commit a0bd6602 authored by Frank Tang's avatar Frank Tang Committed by Commit Bot

[test] Remove incorrect expectation

Remove test expectations whose behavior is not specified or contradicts
the Stage 3 PR https://github.com/tc39/ecma402/pull/349 which we plan
to land soon.

The Chinese calendar (and other calendars) now need to choose
different patterns for non-default calendars to support the correct
behavior.

Bug: v8:9320
Change-Id: Ia84e0eb1f7244b0d2d252071cf985d97f2acec58
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1838437
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64149}
parent 782322fe
......@@ -20,18 +20,9 @@ function checkFormat(locale, options, expected) {
assertEquals(expected.formatted, formatted);
}
// Even though the calendar is Chinese, the best pattern search for formatting
// should be done in the base locale (i.e. en or en-GB instead of
// en-u-ca-chinese or en-GB-u-ca-chinese). Otherwise, {year: 'numeric'} would
// results in '35 (wu-su)' where 'wu-su' is the designation for year 35 in the
// 60-year cycle. See https://github.com/tc39/ecma402/issues/225 .
[
["en", "gregory", "latn", "2018"],
["en-GB", "gregory", "latn", "2018"],
["en-u-ca-chinese", "chinese", "latn", "35"],
["en-GB-u-ca-chinese", "chinese", "latn", "35"],
["en-u-ca-chinese-nu-deva", "chinese", "deva", "३५"],
["en-GB-u-ca-chinese-nu-deva", "chinese", "deva", "३५"],
].forEach(function(entry) {
checkFormat(entry[0], {year: 'numeric'},
{ cal: entry[1],
......@@ -48,9 +39,6 @@ const enGBTypes = ["day", "literal", "month", "literal", "year"];
["en", "gregory", "latn", "6/21/2018", enUSTypes],
["en-GB", "gregory", "latn", "21/06/2018", enGBTypes],
["en-u-nu-deva", "gregory", "deva", "६/२१/२०१८", enUSTypes],
["en-u-ca-chinese", "chinese", "latn", "5/8/35", enUSTypes],
["en-GB-u-ca-chinese", "chinese", "latn", "08/05/35", enGBTypes],
["en-u-ca-chinese-nu-deva", "chinese", "deva", "५/८/३५", enUSTypes],
].forEach(function(entry) {
checkFormat(entry[0], {},
{ cal: entry[1],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment