js/src/jit-test/tests/basic/newTest.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:ee3bd2ddfb42
1 function MyConstructor(i)
2 {
3 this.i = i;
4 }
5 MyConstructor.prototype.toString = function() {return this.i + ""};
6
7 function newTest()
8 {
9 var a = [];
10 for (var i = 0; i < 10; i++)
11 a[i] = new MyConstructor(i);
12 return a.join("");
13 }
14 assertEq(newTest(), "0123456789");

mercurial