diff options
Diffstat (limited to 'js/src/tests/test262/intl402/PluralRules/prototype/select/non-finite.js')
-rw-r--r-- | js/src/tests/test262/intl402/PluralRules/prototype/select/non-finite.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/js/src/tests/test262/intl402/PluralRules/prototype/select/non-finite.js b/js/src/tests/test262/intl402/PluralRules/prototype/select/non-finite.js new file mode 100644 index 0000000000..14166d66ec --- /dev/null +++ b/js/src/tests/test262/intl402/PluralRules/prototype/select/non-finite.js @@ -0,0 +1,24 @@ +// Copyright 2016 Mozilla Corporation. All rights reserved. +// This code is governed by the license found in the LICENSE file. + +/*--- +esid: sec-Intl.PluralRules.prototype.select +description: Tests that select function returns "other" for non finite values. +info: | + 1.1.4. ResolvePlural (pluralRules, n) + (...) + 1.1.4_3. If isFinite(n) is false, then + 1.1.4_3.a. Return "other". +author: Zibi Braniecki + +---*/ + +var invalidValues = [NaN, Infinity, -Infinity]; + +var pr = new Intl.PluralRules(); + +invalidValues.forEach(function (value) { + assert.sameValue(pr.select(value), "other"); +}); + +reportCompare(0, 0); |