js/src/jit-test/tests/collections/Set-iterator-remove-2.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     1 // A map iterator can cope with removing the next entry.
     3 load(libdir + "iteration.js");
     5 var set = Set("abcd");
     6 var iter = set[std_iterator]();
     7 var log = "";
     8 for (let x of iter) {
     9     log += x;
    10     if (x === "b")
    11         set.delete("c");
    12 }
    13 assertEq(log, "abd");

mercurial