summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Class/newTargetCCW.js
blob: 9f5f870d40da0802870acd7244add1b51ffd5ad8 (plain)
1
2
3
4
5
6
7
8
9
10
// Make sure we wrap the new target on CCW construct calls.
var g = newGlobal();

let f = g.eval('(function (expected) { this.accept = new.target === expected; })');

for (let i = 0; i < 1100; i++)
    assertEq(new f(f).accept, true);

if (typeof reportCompare === 'function')
    reportCompare(0,0,"OK");