Skip to content

Commit

Permalink
Add filter for duplicates of finally blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin committed Oct 6, 2017
1 parent ac25a3f commit 2449e7d
Show file tree
Hide file tree
Showing 9 changed files with 1,036 additions and 54 deletions.
Expand Up @@ -44,7 +44,7 @@ public void test() {
// without filter next line has branches:
assertLine("test.close", ICounter.EMPTY);
assertLine("test.catch", ICounter.NOT_COVERED);
assertLine("test.finally", ICounter.PARTLY_COVERED);
assertLine("test.finally", ICounter.FULLY_COVERED);
}

/**
Expand All @@ -62,7 +62,7 @@ public void test2() {
// without filter next line has branches:
assertLine("test2.close", ICounter.EMPTY);
assertLine("test2.catch", ICounter.NOT_COVERED);
assertLine("test2.finally", ICounter.PARTLY_COVERED);
assertLine("test2.finally", ICounter.FULLY_COVERED);
assertLine("test2.after", ICounter.FULLY_COVERED);
}

Expand Down Expand Up @@ -109,14 +109,14 @@ public void nested() {
assertLine("nested.try2", ICounter.FULLY_COVERED);
assertLine("nested.body", ICounter.FULLY_COVERED);
assertLine("nested.catch2", ICounter.NOT_COVERED);
assertLine("nested.finally2", ICounter.PARTLY_COVERED);
assertLine("nested.finally2", ICounter.FULLY_COVERED);

// next lines not covered on exceptional path:
assertLine("nested.try3", ICounter.PARTLY_COVERED, 0, 0);
assertLine("nested.open3", ICounter.PARTLY_COVERED, 0, 0);
assertLine("nested.body3", ICounter.PARTLY_COVERED, 0, 0);
assertLine("nested.try3", ICounter.FULLY_COVERED, 0, 0);
assertLine("nested.open3", ICounter.FULLY_COVERED, 0, 0);
assertLine("nested.body3", ICounter.FULLY_COVERED, 0, 0);
assertLine("nested.catch3", ICounter.NOT_COVERED);
assertLine("nested.finally3", ICounter.PARTLY_COVERED, 0, 0);
assertLine("nested.finally3", ICounter.FULLY_COVERED, 0, 0);

// without filter next lines have branches:
assertLine("nested.close3", ICounter.EMPTY);
Expand All @@ -132,12 +132,12 @@ public void returnInCatch() {
// without filter next line covered partly:
assertLine("returnInCatch.try1", ICounter.FULLY_COVERED);
assertLine("returnInCatch.open", ICounter.FULLY_COVERED);
assertLine("returnInCatch.finally1", ICounter.PARTLY_COVERED, 5, 1);
assertLine("returnInCatch.finally1", ICounter.PARTLY_COVERED, 1, 1);
// without filter next line has branches:
assertLine("returnInCatch.close", ICounter.EMPTY);

assertLine("returnInCatch.try2", ICounter.EMPTY);
assertLine("returnInCatch.finally2", ICounter.PARTLY_COVERED, 5, 1);
assertLine("returnInCatch.finally2", ICounter.PARTLY_COVERED, 1, 1);
}

/*
Expand Down

0 comments on commit 2449e7d

Please sign in to comment.