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