summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/class/compProp.js
blob: f98727c71866df1ecd4df9404f4e77b8bf5ce0f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
load(libdir + "asserts.js");

function f(tag) { return {[tag]: 1}; }
a = [];
for (var i = 0; i < 2000; i++)
    a[i] = f("first");

for (var i = 0; i < 2000; i++)
    assertEq(a[i].first, 1);

for (var i = 0; i < 2000; i++)
    a[i] = f("second");

for (var i = 0; i < 2000; i++)
    assertEq(a[i].second, 1);