blob: 42a6af6546d1834a575a60dddda7797f35f81f55 [file] [log] [blame]
function assert(b) {
if (!b)
throw new Error("Bad!")
}
let set = new Set;
for (let i = 0; i < 50000; i++) {
assert(set.size === i);
set.add(i);
assert(set.has(i));
}
for (let i = 0; i < 50000; i++) {
assert(set.size === 50000 - i);
set.delete(i);
assert(!set.has(i));
}
assert(!set.size);