summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/newTest.js
blob: 5defbe9f2630a399325492662c1f2c178bfbade6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function MyConstructor(i)
{
  this.i = i;
}
MyConstructor.prototype.toString = function() {return this.i + ""};

function newTest()
{
  var a = [];
  for (var i = 0; i < 10; i++)
    a[i] = new MyConstructor(i);
  return a.join("");
}
assertEq(newTest(), "0123456789");