blob: 55eb30360d84b56424eae4c9919877bdf173f326 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Map iterators produces entries in the order they were inserted.
load(libdir + "eqArrayHelper.js");
var map = new Map();
for (var i = 7; i !== 1; i = i * 7 % 1117)
map.set("" + i, i);
assertEq(map.size, 557);
i = 7;
for (var pair of map) {
assertEqArray(pair, ["" + i, i]);
i = i * 7 % 1117;
}
assertEq(i, 1);
|