mirror of
https://github.com/tc39/test262.git
synced 2025-07-26 07:25:15 +02:00
intl: increase coverage for the NumberFormat constructor
Increase coverage for the Intl.NumberFormat constructor by testing that passing a string value to the Intl.NumberFormat constructor is equivalent to passing an Array containing the same string value.
This commit is contained in:
parent
e064fcd7ce
commit
af0f53bb40
19
test/intl402/NumberFormat/constructor-locales-string.js
Normal file
19
test/intl402/NumberFormat/constructor-locales-string.js
Normal file
@ -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());
|
Loading…
x
Reference in New Issue
Block a user