off-thread-01.js (503B)
1 // |jit-test| --code-coverage; --no-ion; skip-if: helperThreadCount() === 0 2 3 assertEq(isLcovEnabled(), true); 4 5 offThreadCompileToStencil(` 6 let hitCount = 0; 7 function offThreadFun() { 8 hitCount += 1; 9 } 10 11 offThreadFun(); 12 offThreadFun(); 13 offThreadFun(); 14 offThreadFun(); 15 `); 16 var stencil = finishOffThreadStencil(); 17 evalStencil(stencil); 18 assertEq(hitCount, 4); 19 20 let report = getLcovInfo(); 21 22 const expected = "FNDA:4,offThreadFun"; 23 assertEq(report.includes(expected), true);