blob: 0175297a2e0dea9a5a88dc150db3ca42f1feef6b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// |jit-test| --code-coverage; --no-ion; skip-if: helperThreadCount() === 0
assertEq(isLcovEnabled(), true);
offThreadCompileScript(`
let hitCount = 0;
function offThreadFun() {
hitCount += 1;
}
offThreadFun();
offThreadFun();
offThreadFun();
offThreadFun();
`);
runOffThreadScript();
assertEq(hitCount, 4);
let report = getLcovInfo();
const expected = "FNDA:4,offThreadFun";
assertEq(report.includes(expected), true);
|