diff --git a/test/intl402/NumberFormat/constructor-locales-string.js b/test/intl402/NumberFormat/constructor-locales-string.js new file mode 100644 index 0000000000000000000000000000000000000000..226ec4ea782720877e388cd96647f9e66e572fe1 --- /dev/null +++ b/test/intl402/NumberFormat/constructor-locales-string.js @@ -0,0 +1,19 @@ +// Copyright (C) 2018 Ujjwal Sharma. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-initializenumberformat +description: > + Tests that passing a string value to the Intl.NumberFormat constructor is + equivalent to passing an Array containing the same string value. +info: | + 9.2.1 CanonicalizeLocaleList ( locales ) + + 3 .If Type(locales) is String, then + a. Let O be CreateArrayFromList(« locales »). +---*/ + +const actual = Intl.NumberFormat('en-US'); +const expected = Intl.NumberFormat(['en-US']); + +assert.sameValue(actual.resolvedOptions(), expected.resolvedOptions());