js/src/tests/test262/intl402/ch09/9.2/9.2.1_1.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 BSD license found in the LICENSE file.
     4 /**
     5  * @description Tests that canonicalization of locale lists treats undefined and empty lists the same.
     6  * @author Norbert Lindenberg
     7  */
     9 $INCLUDE("testIntl.js");
    11 testWithIntlConstructors(function (Constructor) {
    12     var supportedForUndefined = Constructor.supportedLocalesOf(undefined);
    13     var supportedForEmptyList = Constructor.supportedLocalesOf([]);
    14     if (supportedForUndefined.length !== supportedForEmptyList.length) {
    15         $ERROR("Supported locales differ between undefined and empty list input.");
    16     }
    17     // we don't compare the elements because length should be 0 - let's just verify that
    18     if (supportedForUndefined.length !== 0) {
    19         $ERROR("Internal test error: Assumption about length being 0 is invalid.");
    20     }
    21     return true;
    22 });

mercurial