[Gradle][MPP] Fix test after K/N targets deprecation
This commit is contained in:
committed by
Space Team
parent
dd95256b24
commit
6f5ffeb6bb
+3
-11
@@ -278,12 +278,11 @@ class CInteropCommonizerTaskTest : MultiplatformExtensionTest() {
|
|||||||
val iosX64 = kotlin.iosX64()
|
val iosX64 = kotlin.iosX64()
|
||||||
val iosArm64 = kotlin.iosArm64()
|
val iosArm64 = kotlin.iosArm64()
|
||||||
val windows64 = kotlin.mingwX64("windows64")
|
val windows64 = kotlin.mingwX64("windows64")
|
||||||
val windows32 = kotlin.mingwX86("windows32")
|
|
||||||
kotlin.jvm()
|
kotlin.jvm()
|
||||||
kotlin.js().browser()
|
kotlin.js().browser()
|
||||||
|
|
||||||
val nativeTargets = listOf(linux, macos, iosX64, iosArm64, windows64, windows32)
|
val nativeTargets = listOf(linux, macos, iosX64, iosArm64, windows64)
|
||||||
val windowsTargets = listOf(windows64, windows32)
|
val windowsTargets = listOf(windows64)
|
||||||
val unixLikeTargets = listOf(linux, macos, iosX64, iosArm64)
|
val unixLikeTargets = listOf(linux, macos, iosX64, iosArm64)
|
||||||
val appleTargets = listOf(macos, iosX64, iosArm64)
|
val appleTargets = listOf(macos, iosX64, iosArm64)
|
||||||
val iosTargets = listOf(iosX64, iosArm64)
|
val iosTargets = listOf(iosX64, iosArm64)
|
||||||
@@ -373,7 +372,6 @@ class CInteropCommonizerTaskTest : MultiplatformExtensionTest() {
|
|||||||
|
|
||||||
assertCInteropDependentEqualsForSourceSetAndCompilation(nativeMain)
|
assertCInteropDependentEqualsForSourceSetAndCompilation(nativeMain)
|
||||||
assertCInteropDependentEqualsForSourceSetAndCompilation(unixMain)
|
assertCInteropDependentEqualsForSourceSetAndCompilation(unixMain)
|
||||||
assertCInteropDependentEqualsForSourceSetAndCompilation(windowsMain)
|
|
||||||
assertCInteropDependentEqualsForSourceSetAndCompilation(appleMain)
|
assertCInteropDependentEqualsForSourceSetAndCompilation(appleMain)
|
||||||
assertCInteropDependentEqualsForSourceSetAndCompilation(iosMain)
|
assertCInteropDependentEqualsForSourceSetAndCompilation(iosMain)
|
||||||
|
|
||||||
@@ -382,13 +380,12 @@ class CInteropCommonizerTaskTest : MultiplatformExtensionTest() {
|
|||||||
|
|
||||||
val nativeCommonizerTarget = SharedCommonizerTarget(nativeTargets.map { it.konanTarget })
|
val nativeCommonizerTarget = SharedCommonizerTarget(nativeTargets.map { it.konanTarget })
|
||||||
val unixLikeCommonizerTarget = SharedCommonizerTarget(unixLikeTargets.map { it.konanTarget })
|
val unixLikeCommonizerTarget = SharedCommonizerTarget(unixLikeTargets.map { it.konanTarget })
|
||||||
val windowsCommonizerTarget = SharedCommonizerTarget(windowsTargets.map { it.konanTarget })
|
|
||||||
val appleCommonizerTarget = SharedCommonizerTarget(appleTargets.map { it.konanTarget })
|
val appleCommonizerTarget = SharedCommonizerTarget(appleTargets.map { it.konanTarget })
|
||||||
val iosCommonizerTarget = SharedCommonizerTarget(iosTargets.map { it.konanTarget })
|
val iosCommonizerTarget = SharedCommonizerTarget(iosTargets.map { it.konanTarget })
|
||||||
|
|
||||||
val expectedMainGroup = CInteropCommonizerGroup(
|
val expectedMainGroup = CInteropCommonizerGroup(
|
||||||
targets = setOf(
|
targets = setOf(
|
||||||
nativeCommonizerTarget, unixLikeCommonizerTarget, windowsCommonizerTarget,
|
nativeCommonizerTarget, unixLikeCommonizerTarget,
|
||||||
appleCommonizerTarget, iosCommonizerTarget
|
appleCommonizerTarget, iosCommonizerTarget
|
||||||
),
|
),
|
||||||
interops = nativeTargets.map { target -> target.mainCinteropIdentifier("nativeHelper") }.toSet() +
|
interops = nativeTargets.map { target -> target.mainCinteropIdentifier("nativeHelper") }.toSet() +
|
||||||
@@ -429,11 +426,6 @@ class CInteropCommonizerTaskTest : MultiplatformExtensionTest() {
|
|||||||
"Expected unixMain being part of the mainGroup"
|
"Expected unixMain being part of the mainGroup"
|
||||||
)
|
)
|
||||||
|
|
||||||
assertEquals(
|
|
||||||
mainGroup, task.findInteropsGroup(expectCInteropCommonizerDependent(windowsMain)),
|
|
||||||
"Expected windowsMain being part of the mainGroup"
|
|
||||||
)
|
|
||||||
|
|
||||||
assertEquals(
|
assertEquals(
|
||||||
mainGroup, task.findInteropsGroup(expectCInteropCommonizerDependent(appleMain)),
|
mainGroup, task.findInteropsGroup(expectCInteropCommonizerDependent(appleMain)),
|
||||||
"Expected appleMain being part of the mainGroup"
|
"Expected appleMain being part of the mainGroup"
|
||||||
|
|||||||
+1
@@ -24,6 +24,7 @@ class KotlinTargetHierarchyDslTest {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@Suppress("DEPRECATION") // deprecated K/N targets
|
||||||
fun `test - hierarchy default - targets from all families`() {
|
fun `test - hierarchy default - targets from all families`() {
|
||||||
kotlin.apply {
|
kotlin.apply {
|
||||||
targetHierarchy.default()
|
targetHierarchy.default()
|
||||||
|
|||||||
Reference in New Issue
Block a user