Why emma doesn't give full coverage to finally blocks?

喜你入骨 提交于 2019-12-20 17:06:13

问题


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

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?

Thank you!


回答1:


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.



来源:https://stackoverflow.com/questions/4841882/why-emma-doesnt-give-full-coverage-to-finally-blocks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!