Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

example

Thank you!

like image 830
stivlo Avatar asked Jan 30 '11 08:01

stivlo


1 Answers

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.

like image 188
aioobe Avatar answered Oct 23 '22 11:10

aioobe