Changeset 251815 in webkit


Ignore:
Timestamp:
Oct 30, 2019 3:41:52 PM (5 years ago)
Author:
Ross Kirsling
Message:

Intl.DateTimeFormat returns resolvedOptions in the wrong order
https://bugs.webkit.org/show_bug.cgi?id=203297

Reviewed by Yusuke Suzuki.

JSTests:

  • test262/expectations.yaml:

Mark two test cases as passing.

Source/JavaScriptCore:

See table here:
https://tc39.es/ecma402/#table-datetimeformat-resolvedoptions-properties

  • runtime/IntlDateTimeFormat.cpp:

(JSC::IntlDateTimeFormat::resolvedOptions):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r251812 r251815  
     12019-10-30  Ross Kirsling  <ross.kirsling@sony.com>
     2
     3        Intl.DateTimeFormat returns resolvedOptions in the wrong order
     4        https://bugs.webkit.org/show_bug.cgi?id=203297
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        * test262/expectations.yaml:
     9        Mark two test cases as passing.
     10
    1112019-10-30  Tadeu Zagallo  <tzagallo@apple.com>
    212
  • trunk/JSTests/test262/expectations.yaml

    r251588 r251815  
    19091909  strict mode: 'Test262Error: Expected SameValue(«false», «true») to be true'
    19101910test/intl402/DateTimeFormat/prototype/resolvedOptions/order-dayPeriod.js:
    1911   default: 'Test262Error: Expected [locale, calendar, numberingSystem, timeZone, hour, hourCycle, hour12, minute] and [locale, calendar, numberingSystem, timeZone, hourCycle, hour12, dayPeriod, hour, minute] to have the same contents. '
    1912   strict mode: 'Test262Error: Expected [locale, calendar, numberingSystem, timeZone, hour, hourCycle, hour12, minute] and [locale, calendar, numberingSystem, timeZone, hourCycle, hour12, dayPeriod, hour, minute] to have the same contents. '
     1911  default: 'Test262Error: Expected [locale, calendar, numberingSystem, timeZone, hourCycle, hour12, hour, minute] and [locale, calendar, numberingSystem, timeZone, hourCycle, hour12, dayPeriod, hour, minute] to have the same contents. '
     1912  strict mode: 'Test262Error: Expected [locale, calendar, numberingSystem, timeZone, hourCycle, hour12, hour, minute] and [locale, calendar, numberingSystem, timeZone, hourCycle, hour12, dayPeriod, hour, minute] to have the same contents. '
    19131913test/intl402/DateTimeFormat/prototype/resolvedOptions/order-fractionalSecondDigits.js:
    19141914  default: 'Test262Error: Expected [locale, calendar, numberingSystem, timeZone, minute, second] and [locale, calendar, numberingSystem, timeZone, minute, second, fractionalSecondDigits] to have the same contents. '
    19151915  strict mode: 'Test262Error: Expected [locale, calendar, numberingSystem, timeZone, minute, second] and [locale, calendar, numberingSystem, timeZone, minute, second, fractionalSecondDigits] to have the same contents. '
    1916 test/intl402/DateTimeFormat/prototype/resolvedOptions/order.js:
    1917   default: 'Test262Error: Expected [locale, calendar, numberingSystem, timeZone, weekday, era, year, month, day, hour, hourCycle, hour12, minute, second, timeZoneName] and [locale, calendar, numberingSystem, timeZone, hourCycle, hour12, weekday, era, year, month, day, hour, minute, second, timeZoneName] to have the same contents. '
    1918   strict mode: 'Test262Error: Expected [locale, calendar, numberingSystem, timeZone, weekday, era, year, month, day, hour, hourCycle, hour12, minute, second, timeZoneName] and [locale, calendar, numberingSystem, timeZone, hourCycle, hour12, weekday, era, year, month, day, hour, minute, second, timeZoneName] to have the same contents. '
    19191916test/intl402/Intl/getCanonicalLocales/canonicalized-tags.js:
    19201917  default: 'Test262Error: Expected SameValue(«cmn», «zh») to be true'
  • trunk/Source/JavaScriptCore/ChangeLog

    r251812 r251815  
     12019-10-30  Ross Kirsling  <ross.kirsling@sony.com>
     2
     3        Intl.DateTimeFormat returns resolvedOptions in the wrong order
     4        https://bugs.webkit.org/show_bug.cgi?id=203297
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        See table here:
     9        https://tc39.es/ecma402/#table-datetimeformat-resolvedoptions-properties
     10
     11        * runtime/IntlDateTimeFormat.cpp:
     12        (JSC::IntlDateTimeFormat::resolvedOptions):
     13
    1142019-10-30  Tadeu Zagallo  <tzagallo@apple.com>
    215
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp

    r251425 r251815  
    854854    options->putDirect(vm, vm.propertyNames->timeZone, jsNontrivialString(vm, m_timeZone));
    855855
    856     if (m_weekday != Weekday::None)
    857         options->putDirect(vm, vm.propertyNames->weekday, jsNontrivialString(vm, weekdayString(m_weekday)));
    858 
    859     if (m_era != Era::None)
    860         options->putDirect(vm, vm.propertyNames->era, jsNontrivialString(vm, eraString(m_era)));
    861 
    862     if (m_year != Year::None)
    863         options->putDirect(vm, vm.propertyNames->year, jsNontrivialString(vm, yearString(m_year)));
    864 
    865     if (m_month != Month::None)
    866         options->putDirect(vm, vm.propertyNames->month, jsNontrivialString(vm, monthString(m_month)));
    867 
    868     if (m_day != Day::None)
    869         options->putDirect(vm, vm.propertyNames->day, jsNontrivialString(vm, dayString(m_day)));
    870 
    871     if (m_hour != Hour::None)
    872         options->putDirect(vm, vm.propertyNames->hour, jsNontrivialString(vm, hourString(m_hour)));
    873 
    874856    if (!m_hourCycle.isNull()) {
    875857        options->putDirect(vm, vm.propertyNames->hourCycle, jsNontrivialString(vm, m_hourCycle));
    876858        options->putDirect(vm, vm.propertyNames->hour12, jsBoolean(m_hourCycle == "h11" || m_hourCycle == "h12"));
    877859    }
     860
     861    if (m_weekday != Weekday::None)
     862        options->putDirect(vm, vm.propertyNames->weekday, jsNontrivialString(vm, weekdayString(m_weekday)));
     863
     864    if (m_era != Era::None)
     865        options->putDirect(vm, vm.propertyNames->era, jsNontrivialString(vm, eraString(m_era)));
     866
     867    if (m_year != Year::None)
     868        options->putDirect(vm, vm.propertyNames->year, jsNontrivialString(vm, yearString(m_year)));
     869
     870    if (m_month != Month::None)
     871        options->putDirect(vm, vm.propertyNames->month, jsNontrivialString(vm, monthString(m_month)));
     872
     873    if (m_day != Day::None)
     874        options->putDirect(vm, vm.propertyNames->day, jsNontrivialString(vm, dayString(m_day)));
     875
     876    if (m_hour != Hour::None)
     877        options->putDirect(vm, vm.propertyNames->hour, jsNontrivialString(vm, hourString(m_hour)));
    878878
    879879    if (m_minute != Minute::None)
Note: See TracChangeset for help on using the changeset viewer.