js/src/tests/test262/intl402/ch09/9.2/9.2.1_1.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:6fa213553bf6
1 // Copyright 2012 Mozilla Corporation. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /**
5 * @description Tests that canonicalization of locale lists treats undefined and empty lists the same.
6 * @author Norbert Lindenberg
7 */
8
9 $INCLUDE("testIntl.js");
10
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 });
23

mercurial