Bug 1340924 - Remove Iterator consumer from intl/. r=Pike
authorTooru Fujisawa <arai_a@mac.com>
Wed, 22 Feb 2017 16:11:34 +0900
changeset 344205 9ad27050d4fcad8733022113ac8e53ef16dbaacb
parent 344204 4a24f274ec59f962bbe1bce06b41a537205abf34
child 344206 3ed5c0fa2f8dfb9c7d5261a6203a387830d6215a
push id31402
push usercbook@mozilla.com
push dateWed, 22 Feb 2017 13:33:50 +0000
treeherdermozilla-central@f5372cb6c3c7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersPike
bugs1340924
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1340924 - Remove Iterator consumer from intl/. r=Pike
intl/locale/tests/unit/test_pluralForm.js
--- a/intl/locale/tests/unit/test_pluralForm.js
+++ b/intl/locale/tests/unit/test_pluralForm.js
@@ -586,30 +586,30 @@ function run_test()
     5,1,2,3,3,5,5,5,5,3,
     5,1,2,3,3,5,5,5,5,3,
     5,1,2,3,3,5,5,5,5,3,
     5,5,5,5,5,5,5,5,5,5,
     5,1,2,3,3,5,5,5,5,3,
     5,5,5,5,5,5,5,5,5,5,
   ]];
 
-  for (let [rule, expect] in Iterator(allExpect)) {
+  for (let [rule, expect] of allExpect.entries()) {
     print("\nTesting rule #" + rule);
 
     let [get, numForms] = PluralForm.makeGetter(rule);
 
     // Make sure the largest value expected matches the number of plural forms
     let maxExpect = Math.max.apply(this, expect);
     do_check_eq(maxExpect, numForms());
 
     // Make a string of numbers, e.g., 1;2;3;4;5
     let words = [];
     for (let i = 1; i <= maxExpect; i++)
       words.push(i);
     words = words.join(";");
 
     // Make sure we get the expected number
-    for (let [index, number] in Iterator(expect)) {
+    for (let [index, number] of expect.entries()) {
       print(["Plural form of ", index, " should be ", number, " (", words, ")"].join(""));
       do_check_eq(get(index, words), number);
     }
   }
 }