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

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