blob: 3e3bd70b8b9d65d9b0e590b78fc31d30ab7231d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
called = 0;
Object.defineProperty(Object.prototype, 0, {set: function() { called++; }});
function testInit()
{
var a = [];
for (var i = 0; i < 5; i++)
a[i] = 0;
}
for (var i = 0; i < 100; i++)
testInit();
assertEq(called, 100);
|