| // Copyright 2013 Mozilla Corporation. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| Tests that the options minimumSignificantDigits and |
| maximumSignificantDigits are read in the right sequence. |
| author: Norbert Lindenberg |
| function readMinimumSignificantDigits() { |
| return 0; // invalid value, but on first read that's OK |
| $ERROR("minimumSignificantDigits read out of sequence: " + read + "."); |
| function readMaximumSignificantDigits() { |
| return 0; // invalid value, but on first read that's OK |
| $ERROR("maximumSignificantDigits read out of sequence: " + read + "."); |
| Object.defineProperty(options, "minimumSignificantDigits", |
| { get: readMinimumSignificantDigits }); |
| Object.defineProperty(options, "maximumSignificantDigits", |
| { get: readMaximumSignificantDigits }); |
| new Intl.NumberFormat("de", options); |
| $ERROR("insuffient number of property reads: " + read + "."); |