summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/Class/newTargetBound.js
blob: f65cfe3cafea8647c70a5e036080e543e2558288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
function boundTarget(expected) {
    assertEq(new.target, expected);
}

let bound = boundTarget.bind(undefined);

const TEST_ITERATIONS = 550;

for (let i = 0; i < TEST_ITERATIONS; i++)
    bound(undefined);

for (let i = 0; i < TEST_ITERATIONS; i++)
    new bound(boundTarget);

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