Bug 1340924 - Remove Iterator consumer from intl/. r=Pike
authorTooru Fujisawa <arai_a@mac.com>
Wed, 22 Feb 2017 16:11:34 +0900
changeset 373232 9ad27050d4fcad8733022113ac8e53ef16dbaacb
parent 373231 4a24f274ec59f962bbe1bce06b41a537205abf34
child 373233 3ed5c0fa2f8dfb9c7d5261a6203a387830d6215a
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersPike
bugs1340924
milestone54.0a1
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);
     }
   }
 }