Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: test/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js

Issue 2717613005: [intl] Fix NumberFormat options handling spec compliance issues (Closed)
Patch Set: Slight cleanup Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..631952642124b0b2d0cbd21df9347f65e7808e77
--- /dev/null
+++ b/test/test262/local-tests/test/intl402/NumberFormat/default-currency-maximum-fraction-digits.js
@@ -0,0 +1,18 @@
+// 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.
+ Regression test for https://bugs.chromium.org/p/v8/issues/detail?id=6016
+include: [assert.js]
+---*/
+
+assert.throws(RangeError,
+ () => new Intl.NumberFormat('en', {
+ style: 'currency',
+ currency: 'USD',
+ maximumFractionDigits: 1
+ }));

Powered by Google App Engine
This is Rietveld 408576698