blob: 851b59facd139fbecd7cb95b773ecd3adae59032 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Some testing for JSOP_NEW.
function foo(prop) {
this.name = "Foo";
this.prop = prop;
return this;
}
// Construct an object with a unique assignation to a property.
function f(i) {
var x = new foo(i);
return x.prop;
}
// Assert that a unique object really was created.
for (var i = 0; i < 100; i++)
assertEq(f(i), i);
|