summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/collections/Set-clear-iterators-2.js
blob: 3b80d42c33a3ccd068af8d74a6e1e1753d652393 (plain)
1
2
3
4
5
6
7
8
9
10
11
// A Set iterator continues to visit entries added after a clear().

load(libdir + "iteration.js");

var s = new Set(["a"]);
var it = s[Symbol.iterator]();
assertIteratorNext(it, "a");
s.clear();
s.add("b");
assertIteratorNext(it, "b");
assertIteratorDone(it, undefined);