1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/basic/newTest.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,14 @@ 1.4 +function MyConstructor(i) 1.5 +{ 1.6 + this.i = i; 1.7 +} 1.8 +MyConstructor.prototype.toString = function() {return this.i + ""}; 1.9 + 1.10 +function newTest() 1.11 +{ 1.12 + var a = []; 1.13 + for (var i = 0; i < 10; i++) 1.14 + a[i] = new MyConstructor(i); 1.15 + return a.join(""); 1.16 +} 1.17 +assertEq(newTest(), "0123456789");