[JVM] Introduce MF Value Classes to frontend

This commit is contained in:
Evgeniy.Zhelenskiy
2021-12-24 04:37:30 +03:00
committed by Space
parent c15b1ec001
commit 7595f798e1
26 changed files with 795 additions and 126 deletions
@@ -300,7 +300,7 @@ class NewTestGeneratorImpl(
private fun TestClassModel.predefinedNativeTransformers(recursive: Boolean): List<Pair<String, String>> =
methods.mapNotNull { method ->
(method as? TransformingTestMethodModel)
?.takeIf { it.registerInConstructor }
?.takeIf { it.registerInConstructor && it.shouldBeGenerated() }
?.let { it.source.file.invariantSeparatorsPath to it.transformer }
} + if (recursive) innerTestClasses.flatMap { it.predefinedNativeTransformers(true) } else listOf()
}
@@ -120,7 +120,7 @@ class SimpleTestClassModel(
}
}
}
if (result.any { it is WithoutJvmInlineTestMethodModel }) {
if (result.any { it is TransformingTestMethodModel && it.shouldBeGenerated() }) {
val additionalRunner =
RunTestMethodModel(targetBackend, doTestMethodName, testRunnerMethodName, additionalRunnerArguments, withTransformer = true)
result.add(additionalRunner)
@@ -40,7 +40,7 @@ class SingleClassTestModel(
}
true
}
if (result.any { it is WithoutJvmInlineTestMethodModel }) {
if (result.any { it is TransformingTestMethodModel && it.shouldBeGenerated() }) {
val additionalRunner =
RunTestMethodModel(targetBackend, doTestMethodName, testRunnerMethodName, additionalRunnerArguments, withTransformer = true)
result.add(additionalRunner)