blob: f138ed0b656d7e499973e6e385e0b686929f98cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
function test() {
var sym = Symbol();
for (var i = 0; i < 100; i++) {
var obj = newObjectWithAddPropertyHook();
assertEq(obj._propertiesAdded, 0);
obj.x = 1;
obj.y = 2;
obj.z = 3;
obj[sym] = 4;
obj[0] = 1;
obj[1234567] = 1;
assertEq(obj._propertiesAdded, 6);
assertEq(obj.x, 1);
assertEq(obj[sym], 4);
assertEq(obj[0], 1);
}
}
test();
|