本文介绍了声纳中的代码覆盖率和线路覆盖率有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道行覆盖率和分支覆盖率有什么区别,但是代码覆盖率和行覆盖率有什么区别?以前的指令覆盖率高吗?
I know what the difference is between line and branch coverage, but what is the difference between code coverage and line coverage? Is the former instruction coverage?
推荐答案
覆盖率是细微的;-)行和分支覆盖率的混合。
Coverage is a subtle ;-) mix of the line and the branch coverage.
您可以在我们的:
coverage = (CT + CF + LC)/(2*B + EL)
where
CT - branches that evaluated to "true" at least once
CF - branches that evaluated to "false" at least once
LC - lines covered (lines_to_cover - uncovered_lines)
B - total number of branches (2*B = conditions_to_cover)
EL - total number of executable lines (lines_to_cover)
这篇关于声纳中的代码覆盖率和线路覆盖率有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!