Regenerate inline class tests as 1 arg value classes

This commit is contained in:
Evgeniy.Zhelenskiy
2021-12-14 19:43:05 +03:00
committed by Space
parent 5ac4722be4
commit ec2e96f3e4
398 changed files with 9654 additions and 3771 deletions
@@ -24,4 +24,6 @@ abstract class TransformingTestMethodModel(val source: SimpleTestMethodModel, va
internal val registerInConstructor
get() = source.targetBackend == TargetBackend.NATIVE
// Native tests load sources before runTest call if more than 1 test is called, so we need to register it before.
override fun shouldBeGenerated(): Boolean = source.shouldBeGenerated()
}
@@ -42,9 +42,9 @@ fun methodModelLocator(
).let { methodModel ->
if (methodModel.containsWithoutJvmInline()) {
val isWithAnnotationAndIsWithPostfix = when {
targetBackend.isRecursivelyCompatibleWith(TargetBackend.JVM_IR) -> listOf(true to false, false to true)
targetBackend.isRecursivelyCompatibleWith(TargetBackend.JVM) -> listOf(true to false)
else -> listOf(false to false)
!targetBackend.isRecursivelyCompatibleWith(TargetBackend.JVM) -> listOf(false to false)
targetBackend.isIR -> listOf(true to false, false to true)
else -> listOf(true to false)
}
isWithAnnotationAndIsWithPostfix.map { (ann, post) -> WithoutJvmInlineTestMethodModel(methodModel, ann, post) }
} else listOf(methodModel)