diff options
Diffstat (limited to 'test/suite/intl402/ch12/12.1')
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.1_1.js | 12 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.1_18.js | 12 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.1_22.js | 15 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.1_23.js | 14 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.1_25.js | 12 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.1_5.js | 15 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.1_6.js | 12 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.1_TDTO.js | 15 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.1_a.js | 14 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.2.1_4.js | 12 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.2.js | 12 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1.3.js | 11 | ||||
-rw-r--r-- | test/suite/intl402/ch12/12.1/12.1_L15.js | 17 |
13 files changed, 80 insertions, 93 deletions
diff --git a/test/suite/intl402/ch12/12.1/12.1.1_1.js b/test/suite/intl402/ch12/12.1/12.1.1_1.js index 8136fb421..0290ea9a1 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_1.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_1.js @@ -1,12 +1,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that an object can't be re-initialized as a DateTimeFormat. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: Tests that an object can't be re-initialized as a DateTimeFormat. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testWithIntlConstructors(function (Constructor) { var obj, error; @@ -40,4 +39,3 @@ testWithIntlConstructors(function (Constructor) { return true; }); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_18.js b/test/suite/intl402/ch12/12.1/12.1.1_18.js index f75ea1e32..d3c2add26 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_18.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_18.js @@ -1,15 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option hour12 is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: Tests that the option hour12 is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.DateTimeFormat, "hour12", "boolean", undefined, undefined, {extra: {any: {hour: "numeric", minute: "numeric"}}}); testOption(Intl.DateTimeFormat, "hour12", "boolean", undefined, undefined, {noReturn: true}); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_22.js b/test/suite/intl402/ch12/12.1/12.1.1_22.js index 5c317c6b9..ee2cc9b8e 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_22.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_22.js @@ -1,13 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a Record is not affected by adversarial - * changes to Object.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: > + Tests that the behavior of a Record is not affected by + adversarial changes to Object.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintProperties(["weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZone"]); @@ -15,4 +15,3 @@ var locale = new Intl.DateTimeFormat(undefined, {localeMatcher: "lookup"}).resol if (!isCanonicalizedStructurallyValidLanguageTag(locale)) { $ERROR("DateTimeFormat returns invalid locale " + locale + "."); } - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_23.js b/test/suite/intl402/ch12/12.1/12.1.1_23.js index d26e1d28c..c6cc932e3 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_23.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_23.js @@ -1,14 +1,14 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the options for the date and time components are processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: > + Tests that the options for the date and time components are + processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ getDateTimeComponents().forEach(function (component) { testOption(Intl.DateTimeFormat, component, "string", getDateTimeComponentValues(component), undefined, {isILD: true}); }); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_25.js b/test/suite/intl402/ch12/12.1/12.1.1_25.js index ccaf7be03..490e5bd9a 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_25.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_25.js @@ -1,12 +1,10 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option formatMatcher is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: Tests that the option formatMatcher is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.DateTimeFormat, "formatMatcher", "string", ["basic", "best fit"], "best fit", {noReturn: true}); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_5.js b/test/suite/intl402/ch12/12.1/12.1.1_5.js index c6b166814..43bcf386a 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_5.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_5.js @@ -1,13 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the behavior of a Record is not affected by adversarial - * changes to Object.prototype. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: > + Tests that the behavior of a Record is not affected by + adversarial changes to Object.prototype. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ taintProperties(["localeMatcher"]); @@ -15,4 +15,3 @@ var locale = new Intl.DateTimeFormat(undefined, {localeMatcher: "lookup"}).resol if (!isCanonicalizedStructurallyValidLanguageTag(locale)) { $ERROR("DateTimeFormat returns invalid locale " + locale + "."); } - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_6.js b/test/suite/intl402/ch12/12.1/12.1.1_6.js index 148ca02f6..2266d0342 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_6.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_6.js @@ -1,12 +1,10 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the option localeMatcher is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: Tests that the option localeMatcher is processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testOption(Intl.DateTimeFormat, "localeMatcher", "string", ["lookup", "best fit"], "best fit", {noReturn: true}); - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_TDTO.js b/test/suite/intl402/ch12/12.1/12.1.1_TDTO.js index 5df6a1cf2..74bc6a0c5 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_TDTO.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_TDTO.js @@ -1,12 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that the set of options for the date and time components is processed correctly. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: > + Tests that the set of options for the date and time components is + processed correctly. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ var locales = [[], ["zh-Hans-CN"], ["hi-IN"], ["en-US"], ["id-ID"]]; var dates = [new Date(), new Date(0), new Date(Date.parse("1989-11-09T17:57:00Z"))]; @@ -103,5 +104,3 @@ testWithToLocale("toLocaleTimeString", {weekday: "short", year: "numeric", month // time/time: steps 6a testWithToLocale("toLocaleTimeString", {hour: "numeric", minute: "numeric"}, {hour: "numeric", minute: "numeric"}); - - diff --git a/test/suite/intl402/ch12/12.1/12.1.1_a.js b/test/suite/intl402/ch12/12.1/12.1.1_a.js index 4f5f3dbf5..d2ee50656 100644 --- a/test/suite/intl402/ch12/12.1/12.1.1_a.js +++ b/test/suite/intl402/ch12/12.1/12.1.1_a.js @@ -1,13 +1,13 @@ // Copyright 2013 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that constructing a DateTimeFormat doesn't create or modify - * unwanted properties on the RegExp constructor. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: > + Tests that constructing a DateTimeFormat doesn't create or modify + unwanted properties on the RegExp constructor. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ testForUnwantedRegExpChanges(function () { new Intl.DateTimeFormat("de-DE-u-ca-gregory"); diff --git a/test/suite/intl402/ch12/12.1/12.1.2.1_4.js b/test/suite/intl402/ch12/12.1/12.1.2.1_4.js index cb22be8f9..db5de9486 100644 --- a/test/suite/intl402/ch12/12.1/12.1.2.1_4.js +++ b/test/suite/intl402/ch12/12.1/12.1.2.1_4.js @@ -1,11 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that for non-object values passed as this to DateTimeFormat a - * wrapper object will be initialized and returned. - * @author Norbert Lindenberg - */ +/*--- +description: > + Tests that for non-object values passed as this to DateTimeFormat + a wrapper object will be initialized and returned. +author: Norbert Lindenberg +---*/ var thisValues = [true, 42, "国際化"]; @@ -18,4 +19,3 @@ thisValues.forEach(function (value) { } return true; }); - diff --git a/test/suite/intl402/ch12/12.1/12.1.2.js b/test/suite/intl402/ch12/12.1/12.1.2.js index 3ffed2ec8..5a3819f59 100644 --- a/test/suite/intl402/ch12/12.1/12.1.2.js +++ b/test/suite/intl402/ch12/12.1/12.1.2.js @@ -2,12 +2,11 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat can be subclassed. - * @author Norbert Lindenberg - */ - -$INCLUDE("testIntl.js"); +/*--- +description: Tests that Intl.DateTimeFormat can be subclassed. +author: Norbert Lindenberg +includes: [testIntl.js] +---*/ // get a date-time format and have it format an array of dates for comparison with the subclass var locales = ["tlh", "id", "en"]; @@ -27,4 +26,3 @@ MyDateTimeFormat.prototype.constructor = MyDateTimeFormat; var format = new MyDateTimeFormat(locales); var actual = a.map(format.format); testArraysAreSame(referenceFormatted, actual); - diff --git a/test/suite/intl402/ch12/12.1/12.1.3.js b/test/suite/intl402/ch12/12.1/12.1.3.js index 5e70bbb8f..4c0ab6640 100644 --- a/test/suite/intl402/ch12/12.1/12.1.3.js +++ b/test/suite/intl402/ch12/12.1/12.1.3.js @@ -1,10 +1,12 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. -/** - * @description Tests that objects constructed by Intl.DateTimeFormat have the specified internal properties. - * @author Norbert Lindenberg - */ +/*--- +description: > + Tests that objects constructed by Intl.DateTimeFormat have the + specified internal properties. +author: Norbert Lindenberg +---*/ var obj = new Intl.DateTimeFormat(); @@ -16,4 +18,3 @@ if (actualPrototype !== Intl.DateTimeFormat.prototype) { if (!Object.isExtensible(obj)) { $ERROR("Object constructed by Intl.DateTimeFormat must be extensible."); } - diff --git a/test/suite/intl402/ch12/12.1/12.1_L15.js b/test/suite/intl402/ch12/12.1/12.1_L15.js index 46c4f5f50..07306a232 100644 --- a/test/suite/intl402/ch12/12.1/12.1_L15.js +++ b/test/suite/intl402/ch12/12.1/12.1_L15.js @@ -1,14 +1,13 @@ // Copyright 2012 Mozilla Corporation. All rights reserved. // This code is governed by the license found in the LICENSE file. -/** - * @description Tests that Intl.DateTimeFormat - * meets the requirements for built-in objects defined by the introduction of - * chapter 15 of the ECMAScript Language Specification. - * @author Norbert Lindenberg - */ - -$INCLUDE("testBuiltInObject.js"); +/*--- +description: > + Tests that Intl.DateTimeFormat meets the requirements for + built-in objects defined by the introduction of chapter 15 of the + ECMAScript Language Specification. +author: Norbert Lindenberg +includes: [testBuiltInObject.js] +---*/ testBuiltInObject(Intl.DateTimeFormat, true, true, ["supportedLocalesOf"], 0); - |