Debian Codegraph @

js/src/tests/test262/intl402/Intl/getCanonicalLocales/Locale-object.js

raw
1 // Copyright 2018 Igalia, S.L. All rights reserved.
2 // This code is governed by the license found in the LICENSE file.
3
4 /*---
5 esid: sec-intl.getcanonicallocales
6 description: Tests for Locale objects in the argument to getCanonicalLocales
7 info: |
8 CanonicalizeLocaleList ( locales )
9 7. c. iii. If Type(kValue) is Object and kValue has an [[InitializedLocale]] internal slot, then
10 1. Let tag be kValue.[[Locale]].
11 includes: [compareArray.js]
12 features: [Intl.Locale]
13 ---*/
14
15 assert.compareArray(Intl.getCanonicalLocales([
16 "fr-CA",
17 new Intl.Locale("en-gb-oxendict"),
18 "de",
19 new Intl.Locale("jp", { "calendar": "gregory" }),
20 "zh",
21 new Intl.Locale("fr-CA"),
22 ]), [
23 "fr-CA",
24 "en-GB-oxendict",
25 "de",
26 "jp-u-ca-gregory",
27 "zh",
28 ]);
29
30 reportCompare(0, 0);