-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
Steps to reproduce
JaCoCo version: 0.8.3
Operating system: macOS
Tool integration: Gradle
interface Callback {
fun onFoo() = Unit
fun onBar() = Unit
fun onBaz() = Unit
}
class CallbackImpl : Callback {
fun onFoo() { /* ... */ }
}Expected behaviour
I'd like to see that Jacoco reports 100% coverage, because all methods in CallbackImpl are in fact covered and the default method implementations might technically be part of the class, but serve no purpose.
Actual behaviour
For a test of CallbackImpl, Jacoco will tell me that 66% of the class' methods are not covered (and one instruction per missed method as well).
One could argue that one could test to call the other methods to check if they lead to no behaviour change, but being default implementations from some base class with no actual implementation in this class I don't see why I should unit-test them here.
Metadata
Metadata
Assignees
Type
Projects
Status
Done