| browser.js |
|
0 |
- |
| builtin.js |
---
es5id: 11.1_L15
description: >
Tests that Intl.NumberFormat meets the requirements for built-in
objects defined by the introduction of chapter 17 of the
ECMAScript Language Specification.
author: Norbert Lindenberg
--- |
769 |
- |
| casing-numbering-system-options.js |
---
esid: sec-intl.numberformat
description: >
Tests that the options numberingSystem are mapped to lower case.
author: Caio Lima
features: [Array.prototype.includes]
--- |
1082 |
- |
| constructor-compactDisplay-compact.js |
---
esid: sec-intl.numberformat
description: Checks handling of the compactDisplay option to the NumberFormat constructor.
info: |
Intl.NumberFormat ( [ locales [ , options ] ] )
1. Let _compactDisplay_ be ? GetOption(_options_, *"compactDisplay"*,
~string~, « *"short"*, *"long"* », *"short"*).
1. If _notation_ is *"compact"*, then
1. Set _numberFormat_.[[CompactDisplay]] to _compactDisplay_.
features: [Intl.NumberFormat-unified]
--- |
991 |
- |
| constructor-compactDisplay-no-compact.js |
---
esid: sec-intl.numberformat
description: Checks handling of the compactDisplay option to the NumberFormat constructor.
info: |
Intl.NumberFormat ( [ locales [ , options ] ] )
1. Let _compactDisplay_ be ? GetOption(_options_, *"compactDisplay"*,
~string~, « *"short"*, *"long"* », *"short"*).
1. If _notation_ is *"compact"*, then
1. Set _numberFormat_.[[CompactDisplay]] to _compactDisplay_.
features: [Intl.NumberFormat-unified]
--- |
1007 |
- |
| constructor-default-value.js |
---
esid: sec-intl.numberformat
description: >
Tests that the constructor for Intl.NumberFormat uses appropriate default
values for its arguments (locales and options).
--- |
940 |
- |
| constructor-locales-arraylike.js |
---
esid: sec-intl.numberformat
description: >
Tests that the Intl.NumberFormat constructor accepts Array-like values for the
locales argument and treats them well.
--- |
943 |
- |
| constructor-locales-get-tostring.js |
---
esid: sec-intl.numberformat
description: >
Tests that Get(O, P) and ToString(arg) are properly called within the
constructor for Intl.NumberFormat
info: |
9.2.1 CanonicalizeLocaleList ( locales )
5. Let len be ? ToLength(? Get(O, "length")).
7.a. Let Pk be ToString(k).
7.c.i. Let kValue be ? Get(O, Pk).
--- |
943 |
- |
| constructor-locales-hasproperty.js |
---
esid: sec-intl.numberformat
description: >
Tests that HasProperty(O, Pk) is properly called within the constructor for
Intl.NumberFormat
info: |
9.2.1 CanonicalizeLocaleList ( locales )
7.b. Let kPresent be ? HasProperty(O, Pk).
--- |
885 |
- |
| constructor-locales-string.js |
---
esid: sec-intl.numberformat
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 »).
--- |
1084 |
- |
| constructor-locales-toobject.js |
---
esid: sec-intl.numberformat
description: >
Tests that Intl.NumberFormat constructor converts the locales argument
to an object using `ToObject` (7.1.13).
info: |
9.2.1 CanonicalizeLocaleList
4.a. Let O be ? ToObject(locales).
--- |
1436 |
- |
| constructor-no-instanceof.js |
---
esid: sec-intl-numberformat-constructor
description: >
Tests that the Intl.NumberFormat constructor calls
OrdinaryHasInstance instead of the instanceof operator which includes a
Symbol.hasInstance lookup and call among other things.
info: >
ChainNumberFormat ( numberFormat, newTarget, this )
1. If newTarget is undefined and ? OrdinaryHasInstance(%NumberFormat%, this) is true, then
a. Perform ? DefinePropertyOrThrow(this, %Intl%.[[FallbackSymbol]], PropertyDescriptor{
[[Value]]: numberFormat, [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: false }).
b. Return this.
--- |
923 |
- |
| constructor-notation.js |
---
esid: sec-intl.numberformat
description: Checks handling of the notation option to the NumberFormat constructor.
info: |
Intl.NumberFormat ( [ locales [ , options ] ] )
1. Let _notation_ be ? GetOption(_options_, *"notation"*, ~string~,
« *"standard"*, *"scientific"*, *"engineering"*, *"compact"* »,
"standard"*).
1. Set _numberFormat_.[[Notation]] to _notation_.
features: [Intl.NumberFormat-unified]
--- |
980 |
- |
| constructor-option-read-order.js |
---
esid: sec-intl.numberformat
description: Checks the order of options read.
features: [Intl.NumberFormat-unified, Intl.NumberFormat-v3]
includes: [compareArray.js, temporalHelpers.js]
--- |
1635 |
- |
| constructor-options-numberingSystem-invalid.js |
---
esid: sec-intl.numberformat
description: >
Checks error cases for the options argument to the NumberFormat constructor.
info: |
ResolveOptions ( constructor, localeData, locales, options [ , specialBehaviours [ , modifyResolutionOptions ] ] )
1. If _value_ is not *undefined*, then
1. ...
1. If _value_ cannot be matched by the `type` Unicode locale nonterminal,
throw a *RangeError* exception.
--- |
1186 |
- |
| constructor-options-roundingMode-invalid.js |
---
esid: sec-intl.numberformat
description: Abrupt completion from invalid values for `roundingMode`
features: [Intl.NumberFormat-v3]
--- |
1104 |
- |
| constructor-options-throwing-getters.js |
---
esid: sec-intl.numberformat
description: Checks the propagation of exceptions from the options for the NumberFormat constructor.
features: [Intl.NumberFormat-v3]
--- |
1036 |
- |
| constructor-options-toobject.js |
---
esid: sec-intl.numberformat
description: >
Tests that Intl.NumberFormat constructor converts the options argument to an
object.
--- |
1397 |
- |
| constructor-order.js |
---
esid: sec-intl.numberformat
description: Checks handling of the unit option with the currency style.
info: |
SetNumberFormatUnitOptions ( intlObj, options )
5. Let currency be ? GetOption(options, "currency", "string", undefined, undefined).
6. If currency is not undefined, then
a. If the result of IsWellFormedCurrencyCode(currency) is false, throw a RangeError exception.
7. If style is "currency" and currency is undefined, throw a TypeError exception.
...
10. Let unit be ? GetOption(options, "unit", "string", undefined, undefined).
11. If unit is not undefined, then
a. If the result of IsWellFormedUnitIdentifier(unit) is false, throw a RangeError exception.
12. If style is "unit" and unit is undefined, throw a TypeError exception.
features: [Intl.NumberFormat-unified]
--- |
1194 |
- |
| constructor-roundingIncrement-invalid.js |
---
esid: sec-intl.numberformat
description: Rejects invalid values for roundingIncrement option.
features: [Intl.NumberFormat-v3]
--- |
1598 |
- |
| constructor-roundingIncrement.js |
---
esid: sec-intl.numberformat
description: Checks handling of the roundingIncrement option to the NumberFormat constructor.
includes: [compareArray.js]
features: [Intl.NumberFormat-v3]
--- |
1257 |
- |
| constructor-signDisplay-negative.js |
---
esid: sec-intl.numberformat
description: Checks handling of the compactDisplay option to the NumberFormat constructor.
info: |
Intl.NumberFormat ( [ locales [ , options ] ] )
1. Let _signDisplay_ be ? GetOption(_options_, *"signDisplay"*, ~string~,
« *"auto"*, *"never"*, *"always"*, *"exceptZero"*, *"negative"* »,
"auto"*).
1. Set _numberFormat_.[[SignDisplay]] to _signDisplay_.
includes: [propertyHelper.js]
features: [Intl.NumberFormat-v3]
--- |
884 |
- |
| constructor-signDisplay.js |
---
esid: sec-intl.numberformat
description: Checks handling of the compactDisplay option to the NumberFormat constructor.
info: |
Intl.NumberFormat ( [ locales [ , options ] ] )
1. Let _signDisplay_ be ? GetOption(_options_, *"signDisplay"*, ~string~,
« *"auto"*, *"never"*, *"always"*, *"exceptZero"*, *"negative"* »,
"auto"*).
1. Set _numberFormat_.[[SignDisplay]] to _signDisplay_.
features: [Intl.NumberFormat-unified]
--- |
991 |
- |
| constructor-trailingZeroDisplay-invalid.js |
---
esid: sec-intl.numberformat
description: Rejects invalid values for trailingZeroDisplay option.
features: [Intl.NumberFormat-v3]
--- |
1064 |
- |
| constructor-trailingZeroDisplay.js |
---
esid: sec-intl.numberformat
description: Checks handling of the trailingZeroDisplay option to the NumberFormat constructor.
includes: [compareArray.js]
features: [Intl.NumberFormat-v3]
--- |
1130 |
- |
| constructor-unit.js |
---
esid: sec-intl.numberformat
description: Checks handling of the unit style.
includes: [testIntl.js]
features: [Intl.NumberFormat-unified]
--- |
1789 |
- |
| constructor-unitDisplay.js |
---
esid: sec-intl.numberformat
description: >
Checks handling of the unitDisplay option to the NumberFormat constructor.
features: [Intl.NumberFormat-unified]
--- |
1560 |
- |
| currency-code-invalid.js |
---
es5id: 6.3.1_b
description: Tests that invalid currency codes are not accepted.
author: Norbert Lindenberg
--- |
720 |
- |
| currency-code-well-formed.js |
---
es5id: 6.3.1_a
description: Tests that well-formed currency codes are accepted.
author: Norbert Lindenberg
--- |
741 |
- |
| currency-digits-nonstandard-notation.js |
---
esid: sec-intl.numberformat
description: >
Checks that the special handling for number of fractional digits when formatting currency values in "standard" notation is ignored when using "compact", "engineering", or "scientific" notation.
info: |
Intl.DateTimeFormat ( [ locales [ , options ] ] )
...
19. If style is "currency" and "notation" is "standard", then
...
20. Else,
a. mnfdDefault be 0.
b. If style is "percent", then
i. Let mxfdDefault be 0.
c. Else,
i. Let mxfdDefault be 3.
--- |
1404 |
- |
| currency-digits.js |
---
esid: sec-intl.numberformat
description: >
Tests that data for the number of fractional digits when formatting currency is used.
info: |
15.1.1 Intl.NumberFormat ([ locales [ , options ]])
19. If style is "currency" and "notation" is "standard", then
a. Let currency be numberFormat.[[Currency]].
b. Let cDigits be CurrencyDigits(currency).
c. Let mnfdDefault be cDigits.
d. Let mxfdDefault be cDigits.
author: Ben Allen
--- |
913 |
- |
| currencyDisplay-unit.js |
---
esid: sec-setnumberformatunitoptions
description: Checks handling of valid values for the numeric option to the NumberFormat constructor.
info: |
SetNumberFormatUnitOptions ( intlObj, options )
6. Let currencyDisplay be ? GetOption(options, "currencyDisplay", "string", « "code", "symbol", "narrowSymbol", "name" », "symbol").
11. If style is "currency", then
f. Set intlObj.[[CurrencyDisplay]] to currencyDisplay.
features: [Intl.NumberFormat-unified]
--- |
1351 |
- |
| default-minimum-singificant-digits.js |
---
description: Tests that the default value of minimumSignificantDigits is 1.
esid: sec-setnfdigitoptions
--- |
1080 |
- |
| default-options-object-prototype.js |
---
esid: sec-intl.numberformat
description: >
Monkey-patching Object.prototype does not change the default
options for NumberFormat as a null prototype is used.
info: |
Intl.NumberFormat ( [ locales [ , options ] ] )
1. If _options_ is *undefined*, then
1. Let _options_ be ObjectCreate(*null*).
--- |
792 |
- |
| dft-currency-mnfd-range-check-mxfd.js |
---
esid: sec-setnfdigitoptions
description: >
When a currency is used in Intl.NumberFormat and minimumFractionDigits is
not provided, maximumFractionDigits should be set as provided.
--- |
745 |
- |
| fraction-digit-options-read-once.js |
---
esid: sec-setnfdigitoptions
description: >
The maximum and minimum fraction digits properties should be read from
the options bag exactly once from the NumberFormat constructor.
info: Regression test for https://bugs.chromium.org/p/v8/issues/detail?id=6015
--- |
790 |
- |
| ignore-invalid-unicode-ext-values.js |
---
es5id: 11.2.3_b
description: >
Tests that Intl.NumberFormat does not accept Unicode locale
extension keys and values that are not allowed.
author: Norbert Lindenberg
--- |
1706 |
- |
| instance-proto-and-extensible.js |
---
es5id: 11.1.3
description: >
Tests that objects constructed by Intl.NumberFormat have the
specified internal properties.
author: Norbert Lindenberg
--- |
662 |
- |
| intl-legacy-constructed-symbol-on-unwrap.js |
---
esid: sec-unwrapnumberformat
description: >
Tests that [[FallbackSymbol]]'s [[Description]] is "IntlLegacyConstructedSymbol" if normative optional is implemented.
author: Yusuke Suzuki
features: [intl-normative-optional]
--- |
779 |
- |
| intl-legacy-constructed-symbol-property.js |
---
esid: sec-intl.numberformat
description: Property descriptor of %Intl%.[[FallbackSymbol]]
info: |
ChainNumberFormat ( numberFormat, newTarget, this )
1.a. Perform ? DefinePropertyOrThrow(_this_, %Intl%.[[FallbackSymbol]],
PropertyDescriptor{ [[Value]]: _numberFormat_, [[Writable]]: *false*,
[[Enumerable]]: *false*, [[Configurable]]: *false* }).
includes: [propertyHelper.js]
features: [intl-normative-optional]
--- |
1257 |
- |
| intl-legacy-constructed-symbol.js |
---
esid: sec-intl.numberformat
description: >
Tests that [[FallbackSymbol]]'s [[Description]] is "IntlLegacyConstructedSymbol" if normative optional is implemented.
author: Yusuke Suzuki
features: [intl-normative-optional]
--- |
611 |
- |
| legacy-regexp-statics-not-modified.js |
---
es5id: 11.1.1_a
description: >
Tests that constructing a NumberFormat doesn't create or modify
unwanted properties on the RegExp constructor.
author: Norbert Lindenberg
includes: [testIntl.js]
--- |
593 |
- |
| length.js |
---
esid: sec-intl.numberformat
description: >
Intl.NumberFormat.length is 0.
info: |
Intl.NumberFormat ( [ locales [ , options ] ] )
17 ECMAScript Standard Built-in Objects:
Every built-in function object, including constructors, has a length
property whose value is an integer. Unless otherwise specified, this
value is equal to the largest number of named arguments shown in the
subclause headings for the function description. Optional parameters
(which are indicated with brackets: [ ]) or rest parameters (which
are shown using the form «...name») are not included in the default
argument count.
Unless otherwise specified, the length property of a built-in function
object has the attributes { [[Writable]]: false, [[Enumerable]]: false,
[[Configurable]]: true }.
includes: [propertyHelper.js]
--- |
1185 |
- |
| name.js |
---
esid: sec-Intl.NumberFormat
description: >
Intl.NumberFormat.name is "NumberFormat".
info: |
11.2.1 Intl.NumberFormat ([ locales [ , options ]])
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
includes: [propertyHelper.js]
--- |
879 |
- |
| numbering-system-options.js |
---
esid: sec-intl.numberformat
description: >
Tests that the options numberingSystem and calendar can be set through
either the locale or the options.
author: Norbert Lindenberg, Daniel Ehrenberg
--- |
2504 |
- |
| prop-desc.js |
---
esid: sec-intl.numberformat-intro
description: >
"NumberFormat" property of Intl.
info: |
Intl.NumberFormat (...)
7 Requirements for Standard Built-in ECMAScript Objects
Unless specified otherwise in this document, the objects, functions, and constructors
described in this standard are subject to the generic requirements and restrictions
specified for standard built-in ECMAScript objects in the ECMAScript 2018 Language
Specification, 9th edition, clause 17, or successor.
17 ECMAScript Standard Built-in Objects:
Every other data property described in clauses 18 through 26 and in Annex B.2 has the
attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }
unless otherwise specified.
includes: [propertyHelper.js]
--- |
1052 |
- |
| proto-from-ctor-realm.js |
---
esid: sec-intl.numberformat
description: Default [[Prototype]] value derived from realm of the NewTarget.
info: |
Intl.NumberFormat ( [ locales [ , options ] ] )
1. If NewTarget is undefined, let newTarget be the active function object, else let newTarget be NewTarget.
2. Let numberFormat be ? OrdinaryCreateFromConstructor(newTarget, "%NumberFormatPrototype%", « ... »).
...
6. Return numberFormat.
OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ , internalSlotsList ] )
...
2. Let proto be ? GetPrototypeFromConstructor(constructor, intrinsicDefaultProto).
3. Return ObjectCreate(proto, internalSlotsList).
GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )
...
3. Let proto be ? Get(constructor, 'prototype').
4. If Type(proto) is not Object, then
a. Let realm be ? GetFunctionRealm(constructor).
b. Set proto to realm's intrinsic object named intrinsicDefaultProto.
5. Return proto.
features: [cross-realm, Reflect, Symbol]
--- |
2477 |
- |
| prototype |
|
|
- |
| shell.js |
---
description: |
This defines helper objects and functions for testing Temporal.
defines: [TemporalHelpers]
features: [Symbol.species, Symbol.iterator, Temporal]
--- |
48674 |
- |
| significant-digits-options-get-sequence.js |
---
es5id: 11.1.1_32
description: >
Tests that the options minimumSignificantDigits and
maximumSignificantDigits are read in the right sequence.
author: Norbert Lindenberg
--- |
1484 |
- |
| style-unit.js |
---
esid: sec-setnumberformatunitoptions
description: Checks handling of valid values for the numeric option to the RelativeTimeFormat constructor.
info: |
SetNumberFormatUnitOptions ( intlObj, options )
3. Let style be ? GetOption(options, "style", "string", « "decimal", "percent", "currency", "unit" », "decimal").
4. Set intlObj.[[Style]] to style.
features: [Intl.NumberFormat-unified]
--- |
922 |
- |
| subclassing.js |
---
es5id: 11.1.2
description: Tests that Intl.NumberFormat can be subclassed.
author: Norbert Lindenberg
includes: [compareArray.js]
--- |
1009 |
- |
| supportedLocalesOf |
|
|
- |
| taint-Object-prototype.js |
---
es5id: 11.1.1_6
description: >
Tests that the behavior of a Record is not affected by
adversarial changes to Object.prototype.
author: Norbert Lindenberg
includes: [testIntl.js]
--- |
606 |
- |
| test-option-currency.js |
---
es5id: 11.1.1_17
description: Tests that the option currency is processed correctly.
author: Norbert Lindenberg
--- |
2774 |
- |
| test-option-currencyDisplay.js |
---
es5id: 11.1.1_21
description: Tests that the option currencyDisplay is processed correctly.
author: Norbert Lindenberg
includes: [testIntl.js]
--- |
587 |
- |
| test-option-localeMatcher.js |
---
es5id: 11.1.1_7
description: Tests that the option localeMatcher is processed correctly.
author: Norbert Lindenberg
includes: [testIntl.js]
--- |
419 |
- |
| test-option-roundingPriority-mixed-options.js |
---
esid: sec-intl.numberformat.prototype.format
description: Tests that the digits are determined correctly when specifying at same time «"minimumFractionDigits", "maximumFractionDigits", "minimumSignificantDigits", "maximumSignificantDigits"»
features: [Intl.NumberFormat-v3]
includes: [testIntl.js]
--- |
7852 |
- |
| test-option-roundingPriority.js |
---
esid: sec-intl.numberformat
description: Tests that the option roundingPriority is processed correctly.
features: [Intl.NumberFormat-v3]
includes: [testIntl.js]
--- |
455 |
- |
| test-option-style.js |
---
es5id: 11.1.1_15
description: Tests that the option style is processed correctly.
author: Norbert Lindenberg
includes: [testIntl.js]
--- |
447 |
- |
| test-option-useGrouping-extended.js |
---
esid: sec-intl.numberformat
description: Tests that the option useGrouping is processed correctly.
info: |
The "Intl.NumberFormat v3" proposal contradicts the behavior required by the
latest revision of ECMA402.
features: [Intl.NumberFormat-v3]
--- |
2091 |
- |
| test-option-useGrouping.js |
---
es5id: 11.1.1_34
description: Tests that the option useGrouping is processed correctly.
info: |
The "Intl.NumberFormat v3" proposal contradicts the behavior required by the
latest revision of ECMA402.
author: Norbert Lindenberg
features: [Intl.NumberFormat-v3]
--- |
1450 |
- |
| this-value-ignored.js |
---
esid: sec-intl-numberformat-constructor
description: >
Tests that the this-value is ignored in NumberFormat, if the this-value
isn't a NumberFormat instance.
author: Norbert Lindenberg
includes: [testIntl.js]
--- |
1231 |
- |
| throws-for-currency-style-without-currency-option.js |
---
es5id: 11.1.1_19
description: >
Tests that the currency style can not be used without a specified
currency.
author: Norbert Lindenberg
--- |
813 |
- |
| throws-for-maximumFractionDigits-over-limit.js |
---
esid: sec-intl.numberformat
description: >
Tests that the options maximumFractionDigits limit to the range 0 - 100.
info: |
SetNumberFormatDigitOptions ( intlObj, options, mnfdDefault, mxfdDefault, notation )
23.a.ii. Set _mxfd_ to ? DefaultNumberOption(_mxfd_, 0, 100, *undefined*).
DefaultNumberOption ( value, minimum, maximum, fallback )
3. If _value_ is not finite or ℝ(_value_) < _minimum_ or ℝ(_value_) >
_maximum_, throw a *RangeError* exception.
--- |
907 |
- |
| throws-for-maximumFractionDigits-under-limit.js |
---
esid: sec-intl.numberformat
description: >
Tests that the options maximumFractionDigits limit to the range 0 - 100.
info: |
SetNumberFormatDigitOptions ( intlObj, options, mnfdDefault, mxfdDefault, notation )
23.a.ii. Set _mxfd_ to ? DefaultNumberOption(_mxfd_, 0, 100, *undefined*).
DefaultNumberOption ( value, minimum, maximum, fallback )
3. If _value_ is not finite or ℝ(_value_) < _minimum_ or ℝ(_value_) >
_maximum_, throw a *RangeError* exception.
--- |
902 |
- |
| throws-for-minimumFractionDigits-over-limit.js |
---
esid: sec-intl.numberformat
description: >
Tests that the options minimumFractionDigits limit to the range 0 - 100.
info: |
SetNumberFormatDigitOptions ( intlObj, options, mnfdDefault, mxfdDefault, notation )
23.a.i. Set _mnfd_ to ? DefaultNumberOption(_mnfd_, 0, 100, *undefined*).
DefaultNumberOption ( value, minimum, maximum, fallback )
3. If _value_ is not finite or ℝ(_value_) < _minimum_ or ℝ(_value_) >
_maximum_, throw a *RangeError* exception.
--- |
906 |
- |
| throws-for-minimumFractionDigits-under-limit.js |
---
esid: sec-intl.numberformat
description: >
Tests that the options minimumFractionDigits limit to the range 0 - 100.
info: |
SetNumberFormatDigitOptions ( intlObj, options, mnfdDefault, mxfdDefault, notation )
23.a.i. Set _mnfd_ to ? DefaultNumberOption(_mnfd_, 0, 100, *undefined*).
DefaultNumberOption ( value, minimum, maximum, fallback )
3. If _value_ is not finite or ℝ(_value_) < _minimum_ or ℝ(_value_) >
_maximum_, throw a *RangeError* exception.
--- |
901 |
- |