Index: test/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js |
diff --git a/test/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js b/test/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9ca6ffe2b97049658add4ff78fe7fc149d037c4d |
--- /dev/null |
+++ b/test/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js |
@@ -0,0 +1,17 @@ |
+// Copyright 2017 the V8 project authors. All rights reserved. |
+// This code is governed by the license found in the LICENSE file. |
+ |
+/*--- |
+esid: ECMA-402 #sec-setnfdigitoptions |
+description: > |
+ When a currency is used in Intl.NumberFormat and minimumFractionDigits is |
+ not provided, maximumFractionDigits should be range-checked against it. |
+include: [assert.js] |
+---*/ |
+ |
+assert.throws(RangeError, |
+ () => new Intl.NumberFormat('en', { |
+ style: 'currency', |
+ currency: 'USD', |
+ maximumFractionDigits: 1 |
+ })); |