| 1 |
// Copyright 2017 the V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
esid: sec-setnfdigitoptions |
| 6 |
description: > |
| 7 |
The maximum and minimum fraction digits properties should be read from |
| 8 |
the options bag exactly once from the NumberFormat constructor. |
| 9 |
info: Regression test for https://bugs.chromium.org/p/v8/issues/detail?id=6015 |
| 10 |
---*/ |
| 11 |
|
| 12 |
var calls = []; |
| 13 |
|
| 14 |
new Intl.NumberFormat("en", { get minimumFractionDigits() { calls.push('minimumFractionDigits') }, |
| 15 |
get maximumFractionDigits() { calls.push('maximumFractionDigits') } }); |
| 16 |
assert.sameValue(calls.length, 2); |
| 17 |
assert.sameValue(calls[0], 'minimumFractionDigits'); |
| 18 |
assert.sameValue(calls[1], 'maximumFractionDigits'); |