[Gradle][MPP] KotlinTargetHierarchyDsl: Add test for custom hierarchy
^KT-53570 Verification Pending
This commit is contained in:
committed by
Space Team
parent
fef1de8620
commit
fb5ae330fc
+35
@@ -228,6 +228,41 @@ class KotlinTargetHierarchyDslTest {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `test - hierarchy custom`() {
|
||||||
|
kotlin.targetHierarchy.custom {
|
||||||
|
common {
|
||||||
|
group("native") {
|
||||||
|
anyNative()
|
||||||
|
}
|
||||||
|
|
||||||
|
group("nix") {
|
||||||
|
anyLinux()
|
||||||
|
anyMacos()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin.linuxX64()
|
||||||
|
kotlin.macosX64()
|
||||||
|
kotlin.mingwX64()
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
stringSetOf("nativeMain", "nixMain", "linuxX64Main", "macosX64Main", "mingwX64Main"),
|
||||||
|
kotlin.dependingSourceSetNames("commonMain")
|
||||||
|
)
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
stringSetOf("linuxX64Main", "macosX64Main", "mingwX64Main"),
|
||||||
|
kotlin.dependingSourceSetNames("nativeMain")
|
||||||
|
)
|
||||||
|
|
||||||
|
assertEquals(
|
||||||
|
stringSetOf("linuxX64Main", "macosX64Main"),
|
||||||
|
kotlin.dependingSourceSetNames("nixMain")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `test - hierarchy set - extend - with new root`() {
|
fun `test - hierarchy set - extend - with new root`() {
|
||||||
val descriptor = KotlinTargetHierarchyDescriptor {
|
val descriptor = KotlinTargetHierarchyDescriptor {
|
||||||
|
|||||||
Reference in New Issue
Block a user