diff options
author | André Bargull <andre.bargull@gmail.com> | 2017-12-21 12:08:15 -0800 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2017-12-21 16:46:55 -0500 |
commit | 56323fe2dd948076a2181614236572516d02e8f8 (patch) | |
tree | 4d73978852bae29627efd703540ff393b070eae5 /test/intl402 | |
parent | 48173672f2c39bac6835ad4e07cc758d70f18b0b (diff) | |
download | qtdeclarative-testsuites-56323fe2dd948076a2181614236572516d02e8f8.tar.gz |
Also test Intl.PluralRules if available
Diffstat (limited to 'test/intl402')
-rw-r--r-- | test/intl402/Collator/10.1.1_1.js | 7 | ||||
-rw-r--r-- | test/intl402/DateTimeFormat/12.1.1_1.js | 7 | ||||
-rw-r--r-- | test/intl402/NumberFormat/11.1.1_1.js | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/test/intl402/Collator/10.1.1_1.js b/test/intl402/Collator/10.1.1_1.js index 9aad93df3..4a51a1ae1 100644 --- a/test/intl402/Collator/10.1.1_1.js +++ b/test/intl402/Collator/10.1.1_1.js @@ -17,6 +17,13 @@ testWithIntlConstructors(function (Constructor) { assert.notSameValue(obj, newObj, "Collator object created with \"new\" was not ignored as this-value."); // variant 2: use constructor as a function + if (Constructor !== Intl.Collator && + Constructor !== Intl.NumberFormat && + Constructor !== Intl.DateTimeFormat) + { + // Newer Intl constructors are not callable as a function. + return; + } obj = Constructor(); newObj = Intl.Collator.call(obj); assert.notSameValue(obj, newObj, "Collator object created with constructor as function was not ignored as this-value."); diff --git a/test/intl402/DateTimeFormat/12.1.1_1.js b/test/intl402/DateTimeFormat/12.1.1_1.js index 0aa96266b..33b6bfb45 100644 --- a/test/intl402/DateTimeFormat/12.1.1_1.js +++ b/test/intl402/DateTimeFormat/12.1.1_1.js @@ -22,6 +22,13 @@ testWithIntlConstructors(function (Constructor) { assert.notSameValue(obj, newObj, "DateTimeFormat object created with \"new\" was not ignored as this-value."); // variant 2: use constructor as a function + if (Constructor !== Intl.Collator && + Constructor !== Intl.NumberFormat && + Constructor !== Intl.DateTimeFormat) + { + // Newer Intl constructors are not callable as a function. + return; + } obj = Constructor(); newObj = Intl.DateTimeFormat.call(obj); assert.notSameValue(obj, newObj, "DateTimeFormat object created with constructor as function was not ignored as this-value."); diff --git a/test/intl402/NumberFormat/11.1.1_1.js b/test/intl402/NumberFormat/11.1.1_1.js index 05c164956..385065394 100644 --- a/test/intl402/NumberFormat/11.1.1_1.js +++ b/test/intl402/NumberFormat/11.1.1_1.js @@ -22,6 +22,13 @@ testWithIntlConstructors(function (Constructor) { assert.notSameValue(obj, newObj, "NumberFormat object created with \"new\" was not ignored as this-value."); // variant 2: use constructor as a function + if (Constructor !== Intl.Collator && + Constructor !== Intl.NumberFormat && + Constructor !== Intl.DateTimeFormat) + { + // Newer Intl constructors are not callable as a function. + return; + } obj = Constructor(); newObj = Intl.NumberFormat.call(obj); assert.notSameValue(obj, newObj, "NumberFormat object created with constructor as function was not ignored as this-value."); |