为什么艾玛没有全面报道最后一块? [英] Why emma doesn't give full coverage to finally blocks?
问题描述
我不明白为什么艾玛没有给最后块提供完整的代码覆盖率。我做了一个简短的示例程序来演示这个。
I don't get why emma doesn't give full code coverage to "finally" blocks. I've made a short example program to demonstrate this.
当我执行程序时它会显示:
When I execute the program it shows:
try
finally
所以我没有得到为什么最终被标记为红色(未执行)并且finallyprintln被标记为黄色(部分执行)。我错过了什么吗?如何让emma了解finally块被覆盖?
So I don't get why finally is marked as red (not executed) and the "finally" "println" is marked yellow (partially executed). Am I missing something? How to make emma understand that the finally block is covered?
谢谢!
推荐答案
有一个在EMMA常见问题中输入:由于最终阻止而隐含分支。触及部分主题最后盖了块。也许这会有所帮助。
There is an entry on this in the EMMA Faq: Implicit branches due to finally blocks. touching on the subject of partially covered finally blocks. Perhaps that helps.
这篇关于为什么艾玛没有全面报道最后一块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!