blob: 23b222cb3ef0abfbcc187e2f5be5e421fa2de637 [file] [log] [blame]
class testForIn {
constructor() {
let hits = 0;
for (super.prop in { prop1: 1, prop2: 2 })
hits++;
assertEq(this.prop, "prop2");
assertEq(hits, 2);
}
}
new testForIn();
({
testForOf() {
let hits = 0;
for (super["prop"] of [1, 2])
hits++;
assertEq(this.prop, 2);
assertEq(hits, 2);
}
}).testForOf();
if (typeof reportCompare === 'function')
reportCompare(0,0,"OK");