Commit 7ac25c0e authored by Frank Tang's avatar Frank Tang Committed by Commit Bot

[Intl] Fix order of DateTimeFormat resolvedOptions

To fix the to-be-landed-soon test262 test failure in
test262/intl402/DateTimeFormat/prototype/resolvedOptions/order
The spec change from "any order" to "table " order
in https://github.com/tc39/ecma402/pull/279
Change the order of creating each property
Move the code inside SetPropertyFromPattern into ResolvedOptions
so we can easily follow the spec.

Bug: v8:8379
Change-Id: Ibe9ea72a2557474fd81a9f350fffa298f4b7738f
Reviewed-on: https://chromium-review.googlesource.com/c/1302803Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57200}
parent 071accdf
This diff is collapsed.
...@@ -53,10 +53,24 @@ for (var prop in options) { ...@@ -53,10 +53,24 @@ for (var prop in options) {
} }
} }
// In the order of Table 6 of
// ecma402 #sec-intl.datetimeformat.prototype.resolvedoptions
var expectedProperties = [ var expectedProperties = [
'calendar', 'day', 'era', 'hour12', 'hour', 'locale', 'locale',
'minute', 'month', 'numberingSystem', 'calendar',
'second', 'timeZone', 'timeZoneName', 'weekday', 'year' 'numberingSystem',
'timeZone',
'hourCycle',
'hour12',
'weekday',
'era',
'year',
'month',
'day',
'hour',
'minute',
'second',
'timeZoneName',
]; ];
assertEquals(expectedProperties.length, properties.length); assertEquals(expectedProperties.length, properties.length);
......
...@@ -73,9 +73,6 @@ ...@@ -73,9 +73,6 @@
'intl402/DateTimeFormat/prototype/format/format-function-name': [FAIL], 'intl402/DateTimeFormat/prototype/format/format-function-name': [FAIL],
'intl402/Collator/prototype/compare/compare-function-name': [FAIL], 'intl402/Collator/prototype/compare/compare-function-name': [FAIL],
# https://bugs.chromium.org/p/v8/issues/detail?id=8378
'intl402/DateTimeFormat/prototype/resolvedOptions/order': [FAIL],
# https://code.google.com/p/v8/issues/detail?id=4251 # https://code.google.com/p/v8/issues/detail?id=4251
'language/expressions/postfix-increment/S11.3.1_A5_T1': [FAIL], 'language/expressions/postfix-increment/S11.3.1_A5_T1': [FAIL],
'language/expressions/postfix-increment/S11.3.1_A5_T2': [FAIL], 'language/expressions/postfix-increment/S11.3.1_A5_T2': [FAIL],
......
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