Debian Codegraph @

js/src/tests/test262/intl402/NumberFormat/constructor-signDisplay-negative.js

raw
1 // Copyright 2021 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-initializenumberformat
5 description: Checks handling of the compactDisplay option to the NumberFormat constructor.
6 info: |
7 InitializeNumberFormat ( numberFormat, locales, options )
8
9 32. Let signDisplay be ? GetOption(options, "signDisplay", "string", « "auto", "never", "always", "exceptZero", "negative" », "auto").
10 33. Set numberFormat.[[SignDisplay]] to signDisplay.
11 includes: [propertyHelper.js]
12 features: [Intl.NumberFormat-v3]
13 ---*/
14
15 const nf = new Intl.NumberFormat([], {
16 signDisplay: 'negative',
17 });
18 const resolvedOptions = nf.resolvedOptions();
19
20 verifyProperty(resolvedOptions, 'signDisplay', {
21 value: 'negative',
22 writable: true,
23 enumerable: true,
24 configurable: true
25 });
26
27 reportCompare(0, 0);