kotlinx-kover
kotlinx-kover copied to clipboard
Inline operation execution not detected
Describe the bug
I have discovered a case where an inline operation is not correctly detected by Kover.
Errors
This leads to errors in koverVerify if we exepct to have covered this code block.
Expected behavior
Inline operations should be detected just as non-inline operations are.
Reproducer
I will link a full reproducer project in a few minutes.
Environment
- Kover Gradle Plugin version:
0.8.0-Beta - Gradle version:
8.6 - Kotlin project type:
Kotlin/JVM
Here is the reproducer: https://github.com/mgroth0/kover-573
To reproduce:
./gradlew test -iand observe that the output is
hello test fun 1
hello test fun 1 lambda
hello test fun 2
hello test fun 2 lambda
-
./gradlew koverVerifyand observe it fails withRule violated: lines covered percentage is 87.500000, but expected minimum is 100 -
./gradlew koverHtmlReportand observe in the HTML report that the line of codeprintln("hello test fun 2 lambda")was not detected to have executed.
As the output from step 1 shows, however, the line definitely did execute.
Error reproduced when inline function, with a call to other inline functions inside, is used directly in the test
Depends on https://youtrack.jetbrains.com/issue/KT-68006/Full-debug-information-for-call-of-InlineOnly