diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeIrSpecificTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrSpecificTextTestGenerated.java similarity index 97% rename from compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeIrSpecificTextTestGenerated.java rename to compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrSpecificTextTestGenerated.java index 4010bc91bbc..85b62dd156c 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeIrSpecificTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrSpecificTextTestGenerated.java @@ -19,7 +19,7 @@ import java.util.regex.Pattern; @SuppressWarnings("all") @TestMetadata("compiler/fir/fir2ir/testData/ir/irText") @TestDataPath("$PROJECT_ROOT") -public class FirLightTreeIrSpecificTextTestGenerated extends AbstractFirLightTreeIrTextTest { +public class FirLightTreeJvmIrSpecificTextTestGenerated extends AbstractFirLightTreeJvmIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeIrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java similarity index 99% rename from compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeIrTextTestGenerated.java rename to compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java index dd040c58865..11511d7a58f 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeIrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJvmIrTextTestGenerated.java @@ -19,7 +19,7 @@ import java.util.regex.Pattern; @SuppressWarnings("all") @TestMetadata("compiler/testData/ir/irText") @TestDataPath("$PROJECT_ROOT") -public class FirLightTreeIrTextTestGenerated extends AbstractFirLightTreeIrTextTest { +public class FirLightTreeJvmIrTextTestGenerated extends AbstractFirLightTreeJvmIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiIrSpecificTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrSpecificTextTestGenerated.java similarity index 97% rename from compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiIrSpecificTextTestGenerated.java rename to compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrSpecificTextTestGenerated.java index 313cbbfe1d4..a241d3094ec 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiIrSpecificTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrSpecificTextTestGenerated.java @@ -19,7 +19,7 @@ import java.util.regex.Pattern; @SuppressWarnings("all") @TestMetadata("compiler/fir/fir2ir/testData/ir/irText") @TestDataPath("$PROJECT_ROOT") -public class FirPsiIrSpecificTextTestGenerated extends AbstractFirPsiIrTextTest { +public class FirPsiJvmIrSpecificTextTestGenerated extends AbstractFirPsiJvmIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java similarity index 99% rename from compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java rename to compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java index fbf10dc9a93..3dfda6489fe 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/IrTextTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiJvmIrTextTestGenerated.java @@ -19,7 +19,7 @@ import java.util.regex.Pattern; @SuppressWarnings("all") @TestMetadata("compiler/testData/ir/irText") @TestDataPath("$PROJECT_ROOT") -public class IrTextTestGenerated extends AbstractIrTextTest { +public class FirPsiJvmIrTextTestGenerated extends AbstractFirPsiJvmIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiIrTextTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java similarity index 99% rename from compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiIrTextTestGenerated.java rename to compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java index c4ebb046509..d6389f89192 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirPsiIrTextTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/ir/ClassicJvmIrTextTestGenerated.java @@ -19,7 +19,7 @@ import java.util.regex.Pattern; @SuppressWarnings("all") @TestMetadata("compiler/testData/ir/irText") @TestDataPath("$PROJECT_ROOT") -public class FirPsiIrTextTestGenerated extends AbstractFirPsiIrTextTest { +public class ClassicJvmIrTextTestGenerated extends AbstractClassicJvmIrTextTest { @Test public void testAllFilesPresentInIrText() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt index c669408f6b7..90af33ee5ba 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/runners/ir/AbstractIrTextTest.kt @@ -38,8 +38,8 @@ import org.jetbrains.kotlin.test.services.sourceProviders.AdditionalDiagnosticsS import org.jetbrains.kotlin.test.services.sourceProviders.CodegenHelpersSourceFilesProvider import org.jetbrains.kotlin.test.services.sourceProviders.CoroutineHelpersSourceFilesProvider -abstract class AbstractIrTextTestBase> : - AbstractKotlinCompilerWithTargetBackendTest(TargetBackend.JVM_IR) +abstract class AbstractIrTextTestBase>(targetBackend: TargetBackend) : + AbstractKotlinCompilerWithTargetBackendTest(targetBackend) { abstract val frontend: FrontendKind<*> abstract val frontendFacade: Constructor> @@ -57,7 +57,7 @@ abstract class AbstractIrTextTestBase> : frontend = this@AbstractIrTextTestBase.frontend targetPlatform = JvmPlatforms.defaultJvmPlatform artifactKind = BinaryKind.NoArtifact - targetBackend = TargetBackend.JVM_IR + targetBackend = this@AbstractIrTextTestBase.targetBackend dependencyKind = DependencyKind.Source } @@ -99,7 +99,7 @@ abstract class AbstractIrTextTestBase> : } } -open class AbstractIrTextTest : AbstractIrTextTestBase() { +open class AbstractClassicJvmIrTextTest : AbstractIrTextTestBase(TargetBackend.JVM_IR) { override val frontend: FrontendKind<*> get() = FrontendKinds.ClassicFrontend override val frontendFacade: Constructor> @@ -117,7 +117,10 @@ open class AbstractIrTextTest : AbstractIrTextTestBase() { +open class AbstractFirIrTextTestBase( + val parser: FirParser, + targetBackend: TargetBackend +) : AbstractIrTextTestBase(targetBackend) { override val frontend: FrontendKind<*> get() = FrontendKinds.FIR override val frontendFacade: Constructor> @@ -143,12 +146,12 @@ open class AbstractFirIrTextTestBase(val parser: FirParser) : AbstractIrTextTest } } -open class AbstractFirLightTreeIrTextTest : AbstractFirIrTextTestBase(FirParser.LightTree) +open class AbstractFirLightTreeJvmIrTextTest : AbstractFirIrTextTestBase(FirParser.LightTree, TargetBackend.JVM_IR) @FirPsiCodegenTest -open class AbstractFirPsiIrTextTest : AbstractFirIrTextTestBase(FirParser.Psi) +open class AbstractFirPsiJvmIrTextTest : AbstractFirIrTextTestBase(FirParser.Psi, TargetBackend.JVM_IR) -open class AbstractFirIrJsTextTestBase(parser: FirParser) : AbstractFirIrTextTestBase(parser) { +open class AbstractFirJsIrTextTestBase(parser: FirParser) : AbstractFirIrTextTestBase(parser, TargetBackend.JS_IR) { override fun TestConfigurationBuilder.applyConfigurators() { useConfigurators( ::CommonEnvironmentConfigurator, @@ -164,11 +167,10 @@ open class AbstractFirIrJsTextTestBase(parser: FirParser) : AbstractFirIrTextTes globalDefaults { targetPlatform = JsPlatforms.defaultJsPlatform artifactKind = BinaryKind.NoArtifact - targetBackend = TargetBackend.JS_IR dependencyKind = DependencyKind.Source } } } } -open class AbstractFirLightTreeIrJsTextTest : AbstractFirIrJsTextTestBase(FirParser.LightTree) +open class AbstractFirLightTreeJsIrTextTest : AbstractFirJsIrTextTestBase(FirParser.LightTree) diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrJsTextTestCase.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractClassicJsIrTextTestCase.kt similarity index 87% rename from compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrJsTextTestCase.kt rename to compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractClassicJsIrTextTestCase.kt index dfc331aa35f..560ba76b0c0 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractIrJsTextTestCase.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/ir/AbstractClassicJsIrTextTestCase.kt @@ -8,7 +8,7 @@ package org.jetbrains.kotlin.ir import org.jetbrains.kotlin.ir.declarations.IrModuleFragment import org.jetbrains.kotlin.psi2ir.Psi2IrTranslator -abstract class AbstractIrJsTextTestCase : AbstractIrTextTestCase() { +abstract class AbstractClassicJsIrTextTestCase : AbstractIrTextTestCase() { override fun doGenerateIrModule(psi2IrTranslator: Psi2IrTranslator): IrModuleFragment = generateIrModuleWithJsResolve(myFiles.psiFiles, myEnvironment, psi2IrTranslator) } diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/klib/AbstractKlibTextTestCase.kt b/compiler/tests-common/tests/org/jetbrains/kotlin/klib/AbstractKlibIrTextTestCase.kt similarity index 99% rename from compiler/tests-common/tests/org/jetbrains/kotlin/klib/AbstractKlibTextTestCase.kt rename to compiler/tests-common/tests/org/jetbrains/kotlin/klib/AbstractKlibIrTextTestCase.kt index 7734f0494b7..80ffe0d68bb 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/klib/AbstractKlibTextTestCase.kt +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/klib/AbstractKlibIrTextTestCase.kt @@ -62,7 +62,7 @@ import java.util.* /** * Compares compiled and deserialized IR */ -abstract class AbstractKlibTextTestCase : CodegenTestCase() { +abstract class AbstractKlibIrTextTestCase : CodegenTestCase() { companion object { val SKIP_KLIB_TEST = Regex("""// SKIP_KLIB_TEST""") @@ -297,4 +297,4 @@ abstract class AbstractKlibTextTestCase : CodegenTestCase() { } } -abstract class AbstractKlibJsTextTestCase : AbstractKlibTextTestCase() +abstract class AbstractKlibJsIrTextTestCase : AbstractKlibIrTextTestCase() diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt index f6d19ab3b16..6899c3ccbaf 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit3CompilerTests.kt @@ -29,15 +29,15 @@ import org.jetbrains.kotlin.generators.util.TestGeneratorUtil.KT_OR_KTS_WITHOUT_ import org.jetbrains.kotlin.generators.util.TestGeneratorUtil.KT_WITHOUT_DOTS_IN_NAME import org.jetbrains.kotlin.integration.AbstractAntTaskTest import org.jetbrains.kotlin.ir.AbstractIrCfgTestCase -import org.jetbrains.kotlin.ir.AbstractIrJsTextTestCase +import org.jetbrains.kotlin.ir.AbstractClassicJsIrTextTestCase import org.jetbrains.kotlin.ir.AbstractIrSourceRangesTestCase import org.jetbrains.kotlin.jvm.compiler.* import org.jetbrains.kotlin.jvm.compiler.ir.AbstractIrCompileJavaAgainstKotlinTest import org.jetbrains.kotlin.jvm.compiler.ir.AbstractIrCompileKotlinAgainstJavaTest import org.jetbrains.kotlin.jvm.compiler.ir.AbstractIrLoadJavaTest import org.jetbrains.kotlin.jvm.compiler.javac.AbstractLoadJavaUsingJavacTest -import org.jetbrains.kotlin.klib.AbstractKlibJsTextTestCase -import org.jetbrains.kotlin.klib.AbstractKlibTextTestCase +import org.jetbrains.kotlin.klib.AbstractKlibJsIrTextTestCase +import org.jetbrains.kotlin.klib.AbstractKlibIrTextTestCase import org.jetbrains.kotlin.lexer.kdoc.AbstractKDocLexerTest import org.jetbrains.kotlin.lexer.kotlin.AbstractKotlinLexerTest import org.jetbrains.kotlin.modules.xml.AbstractModuleXmlParserTest @@ -116,15 +116,15 @@ fun generateJUnit3CompilerTests(args: Array) { model("codegen/customScript", pattern = "^(.*)$") } - testClass { + testClass { model("ir/irJsText", pattern = "^(.+)\\.kt(s)?\$") } - testClass { + testClass { model("ir/irJsText", pattern = "^(.+)\\.kt\$", targetBackend = TargetBackend.JS_IR) } - testClass { + testClass { model("ir/irText", pattern = "^(.+)\\.kt\$", targetBackend = TargetBackend.JS_IR) } diff --git a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt index 92fbd77eebb..8819ca757f6 100644 --- a/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt +++ b/compiler/tests-for-compiler-generator/tests/org/jetbrains/kotlin/test/generators/GenerateJUnit5CompilerTests.kt @@ -128,7 +128,7 @@ fun generateJUnit5CompilerTests(args: Array) { model("codegen/box/compileKotlinAgainstKotlin") } - testClass { + testClass { model("ir/irText") } @@ -354,14 +354,14 @@ fun generateJUnit5CompilerTests(args: Array) { model("codegen/boxWithStdLib") } - testClass( - suiteTestClassName = "FirLightTreeIrSpecificTextTestGenerated" + testClass( + suiteTestClassName = "FirLightTreeJvmIrSpecificTextTestGenerated" ) { model("ir/irText") } - testClass( - suiteTestClassName = "FirPsiIrSpecificTextTestGenerated" + testClass( + suiteTestClassName = "FirPsiJvmIrSpecificTextTestGenerated" ) { model("ir/irText") } @@ -392,11 +392,11 @@ fun generateJUnit5CompilerTests(args: Array) { } testGroup(testsRoot = "compiler/fir/fir2ir/tests-gen", testDataRoot = "compiler/testData") { - testClass { + testClass { model("ir/irText") } - testClass { + testClass { model("ir/irText") } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/ir/IrJsTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/ir/ClassicJsIrTextTestCaseGenerated.java similarity index 96% rename from compiler/tests-gen/org/jetbrains/kotlin/ir/IrJsTextTestCaseGenerated.java rename to compiler/tests-gen/org/jetbrains/kotlin/ir/ClassicJsIrTextTestCaseGenerated.java index a7daa4162ef..44c9605d822 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/ir/IrJsTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/ir/ClassicJsIrTextTestCaseGenerated.java @@ -20,7 +20,7 @@ import java.util.regex.Pattern; @TestMetadata("compiler/testData/ir/irJsText") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) -public class IrJsTextTestCaseGenerated extends AbstractIrJsTextTestCase { +public class ClassicJsIrTextTestCaseGenerated extends AbstractClassicJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -32,7 +32,7 @@ public class IrJsTextTestCaseGenerated extends AbstractIrJsTextTestCase { @TestMetadata("compiler/testData/ir/irJsText/dynamic") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Dynamic extends AbstractIrJsTextTestCase { + public static class Dynamic extends AbstractClassicJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -155,7 +155,7 @@ public class IrJsTextTestCaseGenerated extends AbstractIrJsTextTestCase { @TestMetadata("compiler/testData/ir/irJsText/external") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class External extends AbstractIrJsTextTestCase { + public static class External extends AbstractClassicJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } @@ -173,7 +173,7 @@ public class IrJsTextTestCaseGenerated extends AbstractIrJsTextTestCase { @TestMetadata("compiler/testData/ir/irJsText/native") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Native extends AbstractIrJsTextTestCase { + public static class Native extends AbstractClassicJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, this, testDataFilePath); } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java similarity index 98% rename from compiler/tests-gen/org/jetbrains/kotlin/klib/KlibTextTestCaseGenerated.java rename to compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java index 35e96bc5d44..3a16576cc8f 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibIrTextTestCaseGenerated.java @@ -21,7 +21,7 @@ import java.util.regex.Pattern; @TestMetadata("compiler/testData/ir/irText") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) -public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { +public class KlibIrTextTestCaseGenerated extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -33,7 +33,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/classes") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Classes extends AbstractKlibTextTestCase { + public static class Classes extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -245,7 +245,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/classes/dataClasses") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class DataClasses extends AbstractKlibTextTestCase { + public static class DataClasses extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -299,7 +299,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/declarations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Declarations extends AbstractKlibTextTestCase { + public static class Declarations extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -431,7 +431,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/declarations/annotations") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Annotations extends AbstractKlibTextTestCase { + public static class Annotations extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -609,7 +609,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/declarations/contextReceivers") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class ContextReceivers extends AbstractKlibTextTestCase { + public static class ContextReceivers extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -686,7 +686,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class FromKEEP extends AbstractKlibTextTestCase { + public static class FromKEEP extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -700,7 +700,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/declarations/jvmRecord") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class JvmRecord extends AbstractKlibTextTestCase { + public static class JvmRecord extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -713,7 +713,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/declarations/multiplatform") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Multiplatform extends AbstractKlibTextTestCase { + public static class Multiplatform extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -746,7 +746,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/declarations/parameters") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Parameters extends AbstractKlibTextTestCase { + public static class Parameters extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -824,7 +824,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/declarations/provideDelegate") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class ProvideDelegate extends AbstractKlibTextTestCase { + public static class ProvideDelegate extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -868,7 +868,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/errors") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Errors extends AbstractKlibTextTestCase { + public static class Errors extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -891,7 +891,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/expressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Expressions extends AbstractKlibTextTestCase { + public static class Expressions extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -1613,7 +1613,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/expressions/callableReferences") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class CallableReferences extends AbstractKlibTextTestCase { + public static class CallableReferences extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -1726,7 +1726,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/expressions/floatingPointComparisons") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class FloatingPointComparisons extends AbstractKlibTextTestCase { + public static class FloatingPointComparisons extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -1794,7 +1794,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/expressions/funInterface") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class FunInterface extends AbstractKlibTextTestCase { + public static class FunInterface extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -1852,7 +1852,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/expressions/sam") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Sam extends AbstractKlibTextTestCase { + public static class Sam extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -1866,7 +1866,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/firProblems") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class FirProblems extends AbstractKlibTextTestCase { + public static class FirProblems extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -2054,7 +2054,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/lambdas") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Lambdas extends AbstractKlibTextTestCase { + public static class Lambdas extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -2107,7 +2107,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/regressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Regressions extends AbstractKlibTextTestCase { + public static class Regressions extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -2150,7 +2150,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/singletons") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Singletons extends AbstractKlibTextTestCase { + public static class Singletons extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -2178,7 +2178,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/stubs") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Stubs extends AbstractKlibTextTestCase { + public static class Stubs extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -2216,7 +2216,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/types") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Types extends AbstractKlibTextTestCase { + public static class Types extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -2358,7 +2358,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/types/nullChecks") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class NullChecks extends AbstractKlibTextTestCase { + public static class NullChecks extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -2370,7 +2370,7 @@ public class KlibTextTestCaseGenerated extends AbstractKlibTextTestCase { @TestMetadata("compiler/testData/ir/irText/types/nullChecks/nullCheckOnLambdaResult") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class NullCheckOnLambdaResult extends AbstractKlibTextTestCase { + public static class NullCheckOnLambdaResult extends AbstractKlibIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsTextTestCaseGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsIrTextTestCaseGenerated.java similarity index 96% rename from compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsTextTestCaseGenerated.java rename to compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsIrTextTestCaseGenerated.java index 49dc53def5b..6c09a98dfa4 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsTextTestCaseGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/klib/KlibJsIrTextTestCaseGenerated.java @@ -21,7 +21,7 @@ import java.util.regex.Pattern; @TestMetadata("compiler/testData/ir/irJsText") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) -public class KlibJsTextTestCaseGenerated extends AbstractKlibJsTextTestCase { +public class KlibJsIrTextTestCaseGenerated extends AbstractKlibJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -33,7 +33,7 @@ public class KlibJsTextTestCaseGenerated extends AbstractKlibJsTextTestCase { @TestMetadata("compiler/testData/ir/irJsText/dynamic") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Dynamic extends AbstractKlibJsTextTestCase { + public static class Dynamic extends AbstractKlibJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -156,7 +156,7 @@ public class KlibJsTextTestCaseGenerated extends AbstractKlibJsTextTestCase { @TestMetadata("compiler/testData/ir/irJsText/external") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class External extends AbstractKlibJsTextTestCase { + public static class External extends AbstractKlibJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } @@ -174,7 +174,7 @@ public class KlibJsTextTestCaseGenerated extends AbstractKlibJsTextTestCase { @TestMetadata("compiler/testData/ir/irJsText/native") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Native extends AbstractKlibJsTextTestCase { + public static class Native extends AbstractKlibJsIrTextTestCase { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JS_IR, testDataFilePath); } diff --git a/js/js.tests/build.gradle.kts b/js/js.tests/build.gradle.kts index 4c7d6e9aa67..6e0439fd3bb 100644 --- a/js/js.tests/build.gradle.kts +++ b/js/js.tests/build.gradle.kts @@ -258,7 +258,6 @@ fun Test.setUpJsBoxTests(jsEnabled: Boolean, jsIrEnabled: Boolean, firEnabled: B when { firEnabled -> { include("org/jetbrains/kotlin/js/test/fir/*") - include("org/jetbrains/kotlin/test/runners/ir/Fir2IrJsTextTestGenerated.class") } es6Enabled -> { include("org/jetbrains/kotlin/js/test/ir/IrBoxJsES6TestGenerated.class") diff --git a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt index 982522b6e47..dd8f48fc462 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/generators/tests/GenerateJsTests.kt @@ -16,7 +16,7 @@ import org.jetbrains.kotlin.js.test.ir.* import org.jetbrains.kotlin.js.testOld.AbstractDceTest import org.jetbrains.kotlin.js.testOld.compatibility.binary.AbstractJsKlibBinaryCompatibilityTest import org.jetbrains.kotlin.test.TargetBackend -import org.jetbrains.kotlin.test.runners.ir.AbstractFirLightTreeIrJsTextTest +import org.jetbrains.kotlin.test.runners.ir.AbstractFirLightTreeJsIrTextTest fun main(args: Array) { System.setProperty("java.awt.headless", "true") @@ -179,7 +179,7 @@ fun main(args: Array) { model("diagnostics/testsWithJsStdLib", pattern = "^([^_](.+))\\.kt$", excludedPattern = excludedFirTestdataPattern) } - testClass( + testClass( suiteTestClassName = "FirLightTreeJsIrTextTestGenerated" ) { model("ir/irJsText") diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJsIrTextTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJsIrTextTestGenerated.java index c880e2feb20..f2ac2fb75d5 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJsIrTextTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/test/runners/ir/FirLightTreeJsIrTextTestGenerated.java @@ -19,10 +19,10 @@ import java.util.regex.Pattern; @SuppressWarnings("all") @TestMetadata("compiler/testData/ir/irJsText") @TestDataPath("$PROJECT_ROOT") -public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeIrJsTextTest { +public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeJsIrTextTest { @Test public void testAllFilesPresentInIrJsText() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } @Nested @@ -31,7 +31,7 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeIrJsT public class Dynamic { @Test public void testAllFilesPresentInDynamic() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/dynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/dynamic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } @Test @@ -173,7 +173,7 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeIrJsT public class External { @Test public void testAllFilesPresentInExternal() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/external"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/external"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } @Test @@ -189,7 +189,7 @@ public class FirLightTreeJsIrTextTestGenerated extends AbstractFirLightTreeIrJsT public class Native { @Test public void testAllFilesPresentInNative() throws Exception { - KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/native"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irJsText/native"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } @Test