My working unpac space for OCaml projects in development
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Ensure all required and no additional calendar types are supported (#4786)

See: https://github.com/tc39/proposal-intl-era-monthcode/pull/99

authored by

André Bargull and committed by
GitHub
58634f94 8d2a5a85

+21 -6
+21 -6
vendor/git/test262/test/intl402/Intl/supportedValuesOf/calendars-required-by-intl-era-monthcode.js
··· 19 19 9. Return CreateArrayFromList( list ). 20 20 21 21 AvailableCalendars ( ) 22 - The implementation-defined abstract operation AvailableCalendars takes no arguments and returns a List of calendar types. The returned List is sorted according to lexicographic code unit order, and contains unique calendar types in canonical form (6.9) identifying the calendars for which the implementation provides the functionality of Intl.DateTimeFormat objects, including their aliases (e.g., both of "islamicc" and "islamic-civil"). The List must include the Calendar Type value of every row of Table 1, except the header row. 23 - locale: [en] 22 + The implementation-defined abstract operation AvailableCalendars takes no arguments and returns 23 + a List of calendar types. The returned List is sorted according to lexicographic code unit order, 24 + and contains unique calendar types in canonical form (6.9) identifying the calendars for which 25 + the implementation provides the functionality of Intl.DateTimeFormat objects, including their 26 + aliases (e.g., both "islamicc" and "islamic-civil"). The List must consist 27 + of the Calendar Type value of every row of Table 1, except the header row. 24 28 features: [Intl-enumeration, Intl.Era-monthcode] 25 29 ---*/ 26 30 ··· 31 35 "dangi", 32 36 "ethioaa", 33 37 "ethiopic", 38 + // "ethiopic-amete-alem", // Alias for "ethioaa". 34 39 "gregory", 35 40 "hebrew", 36 41 "indian", 37 42 "islamic-civil", 38 43 "islamic-tbla", 39 44 "islamic-umalqura", 45 + // "islamicc", // Alias for "islamic-civil". 40 46 "iso8601", 41 47 "japanese", 42 48 "persian", 43 49 "roc" 44 - ] 50 + ]; 51 + 52 + assert.compareArray( 53 + requiredCalendars, 54 + requiredCalendars.slice(0).sort(), 55 + "requiredCalendars is sorted" 56 + ); 45 57 46 58 const supportedCalendars = Intl.supportedValuesOf("calendar"); 47 - for (const calendar of requiredCalendars) { 48 - assert(supportedCalendars.includes(calendar), "Required calendar: " + calendar + " must be supported"); 49 - } 59 + 60 + assert.compareArray( 61 + supportedCalendars, 62 + requiredCalendars, 63 + "only the required calendars are supported" 64 + );