[Tests] FIR support in JUnit 3 tests, port necessary subclasses

^KT-64404 Fixed
^KT-64438 Fixed
^KT-64407 Fixed
This commit is contained in:
Iaroslav Postovalov
2024-01-15 18:09:34 +01:00
committed by Space Team
parent e69d6d2d05
commit 9a2e4c6b41
66 changed files with 5681 additions and 273 deletions
@@ -25,9 +25,8 @@ import kotlin.script.experimental.annotations.KotlinScript
import kotlin.script.experimental.jvm.defaultJvmScriptingHostConfiguration
import kotlin.script.experimental.jvm.util.scriptCompilationClasspathFromContextOrStdlib
class CustomScriptCodegenTest : CodegenTestCase() {
fun testAnnotatedDefinition() {
open class CustomScriptCodegenTest : CodegenTestCase() {
open fun testAnnotatedDefinition() {
createScriptTestEnvironment("org.jetbrains.kotlin.codegen.TestScriptWithAnnotatedBaseClass")
loadScript("val x = 1")
val res = generateScriptClass()
@@ -42,6 +41,9 @@ class CustomScriptCodegenTest : CodegenTestCase() {
myFiles = CodegenTestFiles.create("scriptTest.kts", text, myEnvironment.project)
}
override val backend: TargetBackend
get() = TargetBackend.JVM
private fun createScriptTestEnvironment(vararg scriptDefinitions: String) {
if (myEnvironment != null) {
throw IllegalStateException("must not set up myEnvironment twice")
@@ -60,7 +62,6 @@ class CustomScriptCodegenTest : CodegenTestCase() {
val configuration = createConfiguration(
ConfigurationKind.ALL,
TestJdkKind.MOCK_JDK,
TargetBackend.JVM,
additionalDependencies,
emptyList(),
emptyList()