-
Notifications
You must be signed in to change notification settings - Fork 47
/
AdaptersTests.kt
35 lines (32 loc) · 1.5 KB
/
AdaptersTests.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package kotlinx.kover.test.functional.cases
import kotlinx.kover.test.functional.cases.utils.assertCounterFullyCovered
import kotlinx.kover.test.functional.cases.utils.defaultXmlProjectReport
import kotlinx.kover.test.functional.cases.utils.defaultXmlReport
import kotlinx.kover.test.functional.core.BaseGradleScriptTest
import kotlin.test.*
internal class AdaptersTests : BaseGradleScriptTest() {
@Test
fun testSubprojectHasAnotherPlugin() {
/*
Tests for https://github.com/Kotlin/kotlinx-kover/issues/100
Classes from plugins applied in subproject not accessible for Kover in root project.
Therefore, Kover is forced to use reflection to work with extensions of the kotlin multiplatform plugin.
*/
internalSample("different-plugins")
.run("koverMergedXmlReport") {
xml(defaultXmlReport()) {
assertCounterFullyCovered(classCounter("org.jetbrains.CommonClass"))
assertCounterFullyCovered(classCounter("org.jetbrains.JvmClass"))
}
}
internalSample("different-plugins")
.run("koverXmlReport") {
subproject("subproject-multiplatform") {
xml(defaultXmlProjectReport()) {
assertCounterFullyCovered(classCounter("org.jetbrains.CommonClass"))
assertCounterFullyCovered(classCounter("org.jetbrains.JvmClass"))
}
}
}
}
}