diff options
author | Evgeny Mandrikov <138671+Godin@users.noreply.github.com> | 2019-01-09 13:24:53 +0100 |
---|---|---|
committer | Marc R. Hoffmann <hoffmann@mountainminds.com> | 2019-01-09 13:24:53 +0100 |
commit | 0a6bf71575171332d155703ed3a6fc33b279078c (patch) | |
tree | 62fac4762e81de51c2f390db25eb4fd972ca2f11 | |
parent | 234a28d07f62be922df9e56dfde854bd3fb1d8dc (diff) | |
download | platform_external_jacoco-0a6bf71575171332d155703ed3a6fc33b279078c.tar.gz platform_external_jacoco-0a6bf71575171332d155703ed3a6fc33b279078c.tar.bz2 platform_external_jacoco-0a6bf71575171332d155703ed3a6fc33b279078c.zip |
Make unit tests realistic (#824)
Probe 2 is executed when probe 0 or probe 1 is executed.
-rw-r--r-- | org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java index 873f7f0b..287b02a1 100644 --- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java +++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java @@ -325,22 +325,24 @@ public class MethodAnalyzerTest implements IProbeIdGenerator { public void if_branch_merge_should_show_partial_branch_coverage_when_probe_for_first_branch_is_executed() { createIfBranchMerge(); probes[0] = true; + probes[2] = true; runMethodAnalzer(); assertLine(1001, 0, 2, 1, 1); assertLine(1002, 1, 0, 0, 0); - assertLine(1003, 1, 0, 0, 0); + assertLine(1003, 0, 1, 0, 0); } @Test public void if_branch_merge_should_show_partial_branch_coverage_when_probe_for_second_branch_is_executed() { createIfBranchMerge(); probes[1] = true; + probes[2] = true; runMethodAnalzer(); assertLine(1001, 0, 2, 1, 1); assertLine(1002, 0, 1, 0, 0); - assertLine(1003, 1, 0, 0, 0); + assertLine(1003, 0, 1, 0, 0); } @Test |