diff options
Diffstat (limited to 'js/src/tests/test262/intl402/NumberFormat/prototype/format/signDisplay-rounding.js')
-rw-r--r-- | js/src/tests/test262/intl402/NumberFormat/prototype/format/signDisplay-rounding.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/NumberFormat/prototype/format/signDisplay-rounding.js b/js/src/tests/test262/intl402/NumberFormat/prototype/format/signDisplay-rounding.js new file mode 100644 index 0000000000..726231f81d --- /dev/null +++ b/js/src/tests/test262/intl402/NumberFormat/prototype/format/signDisplay-rounding.js @@ -0,0 +1,20 @@ +// Copyright 2019 Igalia, S.L. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-intl.numberformat.prototype.format +description: Checks handling of the signDisplay option to the NumberFormat constructor. +locale: [en-US] +features: [Intl.NumberFormat-unified] +---*/ + + +const fmt = new Intl.NumberFormat("en-US", { + maximumFractionDigits: 1, + signDisplay: "exceptZero" +}); + +assert.sameValue(fmt.format(0.01), "0"); +assert.sameValue(fmt.format(-0.01), "0"); + +reportCompare(0, 0); |