|
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 |