js/src/tests/test262/intl402/ch06/6.2/6.2.4.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:75b0790ff043
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 the default locale is a String value representing the
6 * structurally valid and canonicalized BCP 47 language tag.
7 * @author Norbert Lindenberg
8 */
9
10 $INCLUDE("testIntl.js");
11
12 testWithIntlConstructors(function (Constructor) {
13 var defaultLocale = new Constructor().resolvedOptions().locale;
14 if (!isCanonicalizedStructurallyValidLanguageTag(defaultLocale)) {
15 $ERROR("Default locale \"" + defaultLocale + "\" is not canonicalized and structurally valid language tag.");
16 }
17 return true;
18 });
19

mercurial