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.

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

mercurial