diff options
Diffstat (limited to 'test/suite/intl402/ch08/8.1/8.1.js')
-rw-r--r-- | test/suite/intl402/ch08/8.1/8.1.js | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/suite/intl402/ch08/8.1/8.1.js b/test/suite/intl402/ch08/8.1/8.1.js new file mode 100644 index 000000000..570f4e1fe --- /dev/null +++ b/test/suite/intl402/ch08/8.1/8.1.js @@ -0,0 +1,38 @@ +// Copyright 2012 Google Inc. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @path intl402/ch08/8.1/8.1.js + * @description Tests that Intl object has proper constructors. + */ + +function testcase() { + "use strict"; + + var passed = false; + + if (Intl === undefined) { + $ERROR('Intl object is undefined.'); + } + + if (typeof Intl.LocaleList !== 'function') { + $ERROR('Intl.LocaleList is not a function.') + } + + if (typeof Intl.Collator !== 'function') { + $ERROR('Intl.Collator is not a function.') + } + + if (typeof Intl.NumberFormat !== 'function') { + $ERROR('Intl.NumberFormat is not a function.') + } + + if (typeof Intl.DateTimeFormat !== 'function') { + $ERROR('Intl.DateTimeFormat is not a function.') + } + + passed = true; + + return passed; +} +runTestCase(testcase);
\ No newline at end of file |