blob: c8e7c2c273729b66b8f3950798199063a04601b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// Test JSOP_NEW using native constructors.
// Construct an object with a unique assignation to a property.
function f(i) {
var x = new Number(i);
return x;
}
// Assert that a unique object really was created.
for (var i = 0; i < 100; i++) {
var o = f(i);
assertEq(typeof o, "object");
assertEq(Number(o), i);
}
|