Index: test/test262/local-tests/test/intl402/NumberFormat/fraction-digit-options-read-once.js |
diff --git a/test/test262/local-tests/test/intl402/NumberFormat/fraction-digit-options-read-once.js b/test/test262/local-tests/test/intl402/NumberFormat/fraction-digit-options-read-once.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e7e37b873503fcc6c6eaab0d5fa1b274fac40483 |
--- /dev/null |
+++ b/test/test262/local-tests/test/intl402/NumberFormat/fraction-digit-options-read-once.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: > |
+ The maximum and minimum fraction digits properties should be read from |
+ the options bag exactly once from the NumberFormat constructor. |
+ Regression test for https://bugs.chromium.org/p/v8/issues/detail?id=6015 |
+include: [assert.js] |
+---*/ |
+ |
+var minCounter = 0; |
+var maxCounter = 0; |
+new Intl.NumberFormat("en", { get minimumFractionDigits() { minCounter++ }, |
+ get maximumFractionDigits() { maxCounter++ } }); |
+assert.sameValue(1, minCounter); |
+assert.sameValue(1, maxCounter); |