summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testConstructorArgs-1.js
blob: 46b6c4e08a80ae3fa1707c4630cb93d946108b45 (plain)
1
2
3
4
5
6
7
8
9
10
11
function f(a, b) {
    this.a = a;
    assertEq(b, 'x');
}

for (var x = 0; x < 9; ++x) {
    f.prototype = {};
    var obj = new f(x, 'x');
    assertEq(obj.a, x);
    assertEq(Object.getPrototypeOf(obj), f.prototype);
}