You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am viewing unit test coverage in Sonar using JaCoCo. For a switch statement with three cases and a default block, with explicit breaks after each case, JaCoCo tells me I need to cover 10 paths. Now, this number would seem to make sense if each case fell through (4 + 3 + 2 + 1) but not when I explicitly break after each. Am I misunderstanding this number, or is this actually incorrect?
The text was updated successfully, but these errors were encountered:
This a known limitation: The compiler creates a switch statement on the hashcode and an additional equals check on every case. Future versions of JaCoCo might provide a filter for this. See issue #15.
Summary:
Fixes#14
Branch coverage for GesturePerformer#removePlan is not 100% due to jacoco/jacoco#41
Reviewers: O6 Material Motion Android platform reviewers, O2 Material Motion, featherless
Reviewed By: O6 Material Motion Android platform reviewers, O2 Material Motion, featherless
Tags: #material_motion
Differential Revision: http://codereview.cc/D1992
I am viewing unit test coverage in Sonar using JaCoCo. For a switch statement with three cases and a default block, with explicit breaks after each case, JaCoCo tells me I need to cover 10 paths. Now, this number would seem to make sense if each case fell through (4 + 3 + 2 + 1) but not when I explicitly break after each. Am I misunderstanding this number, or is this actually incorrect?
The text was updated successfully, but these errors were encountered: