Suspend functions break branches coverage
zhkvdm opened this issue · 4 comments
zhkvdm commented
Describe the bug
Branches coverage is wrong then call suspend functions.
Suspend function break coverage to half. But I check all posible branches.
Branches coverage is ok if I call the same non suspend function. Just delete suspend codeword.
Expected behavior
Branches coverage is not depends on function type (suspend/non suspend)
Reports
Coverage check with suspend function call:
Coverage check with non suspend function call:
Environment
- Kover Gradle Plugin version: 0.9.0-RC
- Gradle version: 17.0.1
- Kotlin project type: Kotlin/Multiplatform + Android
- Coverage Toolset (if customized in build script): Kover
shanshin commented
@zhkvdm, unfortunately, it was not possible to reproduce it locally.
var testVar: Int = 0
suspend fun testFun() {
testVar = getTestData()
}
private suspend fun getTestData() = 1
zhkvdm commented
Okay, in new empty project it works well. Looks like it is project specific issue..
zhkvdm commented
Find the way how to reproduce this. Just add jacoco. Without jacoco everything is okay.