[Commonizer] CommonizeLibcurlTest: Add commonizeSuccessfully with unsupported targets

This test will assert behaviour on 'unsupported' targets requested from the commonizer

^KT-46077
This commit is contained in:
sebastian.sellmair
2021-04-14 14:11:03 +02:00
committed by Space
parent bbcfde7231
commit f893709e5b
2 changed files with 57 additions and 11 deletions
@@ -56,6 +56,14 @@ public fun CommonizerTarget(konanTarget: KonanTarget, vararg konanTargets: Konan
return SharedCommonizerTarget(targets.map(::LeafCommonizerTarget).toSet())
}
public fun CommonizerTarget(commonizerTarget: CommonizerTarget, vararg commonizerTargets: CommonizerTarget): SharedCommonizerTarget {
val targets = mutableListOf<CommonizerTarget>().apply {
add(commonizerTarget)
addAll(commonizerTargets)
}
return SharedCommonizerTarget(targets.toSet())
}
public val CommonizerTarget.identityString: String
get() = when (this) {
is LeafCommonizerTarget -> name