js/src/tests/test262/intl402/ch11/11.3/11.3.3.js

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

michael@0 1 // Copyright 2012 Mozilla Corporation. All rights reserved.
michael@0 2 // This code is governed by the license found in the LICENSE file.
michael@0 3
michael@0 4 /**
michael@0 5 * @description Tests that the object returned by Intl.NumberFormat.prototype.resolvedOptions
michael@0 6 * has the right properties.
michael@0 7 * @author Norbert Lindenberg
michael@0 8 */
michael@0 9
michael@0 10 $INCLUDE("testIntl.js");
michael@0 11
michael@0 12 var actual = new Intl.NumberFormat().resolvedOptions();
michael@0 13
michael@0 14 var actual2 = new Intl.NumberFormat().resolvedOptions();
michael@0 15 if (actual2 === actual) {
michael@0 16 $ERROR("resolvedOptions returned the same object twice.");
michael@0 17 }
michael@0 18
michael@0 19 // this assumes the default values where the specification provides them
michael@0 20 mustHaveProperty(actual, "locale", isCanonicalizedStructurallyValidLanguageTag);
michael@0 21 mustHaveProperty(actual, "numberingSystem", isValidNumberingSystem);
michael@0 22 mustHaveProperty(actual, "style", ["decimal"]);
michael@0 23 mustNotHaveProperty(actual, "currency");
michael@0 24 mustNotHaveProperty(actual, "currencyDisplay");
michael@0 25 mustHaveProperty(actual, "minimumIntegerDigits", [1]);
michael@0 26 mustHaveProperty(actual, "minimumFractionDigits", [0]);
michael@0 27 mustHaveProperty(actual, "maximumFractionDigits", [3]);
michael@0 28 mustNotHaveProperty(actual, "minimumSignificantDigits");
michael@0 29 mustNotHaveProperty(actual, "maximumSignificantDigits");
michael@0 30 mustHaveProperty(actual, "useGrouping", [true]);
michael@0 31

mercurial