summaryrefslogtreecommitdiff
path: root/harness
diff options
context:
space:
mode:
authorAndré Bargull <andre.bargull@gmail.com>2017-12-21 12:08:15 -0800
committerRick Waldron <waldron.rick@gmail.com>2017-12-21 16:46:55 -0500
commit56323fe2dd948076a2181614236572516d02e8f8 (patch)
tree4d73978852bae29627efd703540ff393b070eae5 /harness
parent48173672f2c39bac6835ad4e07cc758d70f18b0b (diff)
downloadqtdeclarative-testsuites-56323fe2dd948076a2181614236572516d02e8f8.tar.gz
Also test Intl.PluralRules if available
Diffstat (limited to 'harness')
-rw-r--r--harness/testIntl.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/harness/testIntl.js b/harness/testIntl.js
index 158feb53a..f36bdeae8 100644
--- a/harness/testIntl.js
+++ b/harness/testIntl.js
@@ -21,6 +21,14 @@ author: Norbert Lindenberg
*/
function testWithIntlConstructors(f) {
var constructors = ["Collator", "NumberFormat", "DateTimeFormat"];
+
+ // Optionally supported Intl constructors.
+ ["PluralRules"].forEach(function(constructor) {
+ if (typeof Intl[constructor] === "function") {
+ constructors[constructors.length] = constructor;
+ }
+ });
+
constructors.forEach(function (constructor) {
var Constructor = Intl[constructor];
try {
@@ -99,7 +107,7 @@ function taintArray() {
/**
* Gets locale support info for the given constructor object, which must be one
- * of Intl.Collator, Intl.NumberFormat, Intl.DateTimeFormat.
+ * of Intl constructors.
* @param {object} Constructor the constructor for which to get locale support info
* @return {object} locale support info with the following properties:
* supported: array of fully supported language tags