blob: 23b222cb3ef0abfbcc187e2f5be5e421fa2de637 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
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");
|