diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/collections/Map-iterator-remove-3.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/collections/Map-iterator-remove-3.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,13 @@ +// A map iterator can cope with removing the next entry, then the current entry. + +load(libdir + "asserts.js"); +load(libdir + "iteration.js"); + +var map = Map([['a', 0], ['b', 1], ['c', 2], ['d', 3]]); +var iter = map[std_iterator](); +assertIteratorNext(iter, ['a', 0]); +assertIteratorNext(iter, ['b', 1]); +map.delete('c'); +map.delete('b'); +assertIteratorNext(iter, ['d', 3]); +assertIteratorDone(iter, undefined);