michael@0: // Test JSOP_NEW using native constructors. michael@0: // Construct an object with a unique assignation to a property. michael@0: function f(i) { michael@0: var x = new Number(i); michael@0: return x; michael@0: } michael@0: michael@0: // Assert that a unique object really was created. michael@0: for (var i = 0; i < 100; i++) { michael@0: var o = f(i); michael@0: assertEq(typeof o, "object"); michael@0: assertEq(Number(o), i); michael@0: }