mirror of
https://github.com/tc39/test262.git
synced 2025-07-03 20:24:38 +02:00
update nfv3 test for roundingIncrement (#3441)
This commit is contained in:
parent
4c7c24646a
commit
926b0960d7
@ -1,4 +1,5 @@
|
|||||||
// Copyright 2021 the V8 project authors. All rights reserved.
|
// Copyright 2021 the V8 project authors. All rights reserved.
|
||||||
|
// Copyright (C) 2022 Igalia, S.L. All rights reserved.
|
||||||
// This code is governed by the BSD license found in the LICENSE file.
|
// This code is governed by the BSD license found in the LICENSE file.
|
||||||
/*---
|
/*---
|
||||||
esid: sec-initializenumberformat
|
esid: sec-initializenumberformat
|
||||||
@ -26,14 +27,18 @@ assert.throws(RangeError, function() {
|
|||||||
new Intl.NumberFormat([], {roundingIncrement: 5001});
|
new Intl.NumberFormat([], {roundingIncrement: 5001});
|
||||||
}, '5001');
|
}, '5001');
|
||||||
|
|
||||||
assert.throws(RangeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
new Intl.NumberFormat([], {roundingIncrement: 2, roundingPriority: 'morePrecision'});
|
new Intl.NumberFormat([], {roundingIncrement: 2, roundingPriority: 'morePrecision'});
|
||||||
}, '2, roundingType is "morePrecision"');
|
}, '2, roundingType is "morePrecision"');
|
||||||
|
|
||||||
assert.throws(RangeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
new Intl.NumberFormat([], {roundingIncrement: 2, roundingPriority: 'lessPrecision'});
|
new Intl.NumberFormat([], {roundingIncrement: 2, roundingPriority: 'lessPrecision'});
|
||||||
}, '2, roundingType is "lessPrecision"');
|
}, '2, roundingType is "lessPrecision"');
|
||||||
|
|
||||||
assert.throws(RangeError, function() {
|
assert.throws(TypeError, function() {
|
||||||
new Intl.NumberFormat([], {roundingIncrement: 2, minimumSignificantDigits: 1});
|
new Intl.NumberFormat([], {roundingIncrement: 2, minimumSignificantDigits: 1});
|
||||||
}, '2, roundingType is "significantDigits"');
|
}, '2, roundingType is "significantDigits"');
|
||||||
|
|
||||||
|
assert.throws(RangeError, function() {
|
||||||
|
new Intl.NumberFormat([], {roundingIncrement: 2, maximumFractionDigits:3 , minimumFractionDigits:2 });
|
||||||
|
}, '"maximumFractionDigits" is not equal to "minimumFractionDigits"');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user