[Test] Require specifying parser for FIR test. Unify names for FIR tests

Now all tests with `Fir` in name are named accordingly to parser which
  is used in them -- `FirPsi` or `FirLightTree`. This is needed to keep
  consistency between different types of tests, because there is no
  single default in parser mode between different scenarios of using FIR
This commit is contained in:
Dmitriy Novozhilov
2023-02-20 12:14:46 +02:00
committed by Space Team
parent 7e36a88b82
commit da581f38e1
95 changed files with 361 additions and 306 deletions
@@ -18,7 +18,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/diagnostics/firTestWithJvmBackend")
@TestDataPath("$PROJECT_ROOT")
public class FirDiagnosticsTestWithJvmIrBackendGenerated extends AbstractFirDiagnosticsTestWithJvmIrBackend {
public class FirPsiDiagnosticsTestWithJvmIrBackendGenerated extends AbstractFirPsiDiagnosticsTestWithJvmIrBackend {
@Test
public void testAllFilesPresentInFirTestWithJvmBackend() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/firTestWithJvmBackend"), Pattern.compile("^(.+)\\.kt$"), null, true);
@@ -18,7 +18,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend")
@TestDataPath("$PROJECT_ROOT")
public class FirOldDiagnosticsTestWithJvmIrBackendGenerated extends AbstractFirDiagnosticsTestWithJvmIrBackend {
public class FirPsiOldDiagnosticsTestWithJvmIrBackendGenerated extends AbstractFirPsiDiagnosticsTestWithJvmIrBackend {
@Test
public void testAllFilesPresentInTestsWithJvmBackend() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
@@ -20,7 +20,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/box")
@TestDataPath("$PROJECT_ROOT")
public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenTest {
public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTreeBlackBoxCodegenTest {
@Test
public void testAllFilesPresentInBox() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/boxInline")
@TestDataPath("$PROJECT_ROOT")
public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxInlineCodegenTest {
public class FirLightTreeBlackBoxInlineCodegenTestGenerated extends AbstractFirLightTreeBlackBoxInlineCodegenTest {
@Test
public void testAllFilesPresentInBoxInline() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
@@ -20,7 +20,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/boxModernJdk")
@TestDataPath("$PROJECT_ROOT")
public class FirBlackBoxModernJdkCodegenTestGenerated extends AbstractFirBlackBoxCodegenTest {
public class FirLightTreeBlackBoxModernJdkCodegenTestGenerated extends AbstractFirLightTreeBlackBoxCodegenTest {
@Test
public void testAllFilesPresentInBoxModernJdk() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxModernJdk"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/bytecodeText")
@TestDataPath("$PROJECT_ROOT")
public class FirBytecodeTextTestGenerated extends AbstractFirBytecodeTextTest {
public class FirLightTreeBytecodeTextTestGenerated extends AbstractFirLightTreeBytecodeTextTest {
@Test
@TestMetadata("accessorForOverridenVal.kt")
public void testAccessorForOverridenVal() throws Exception {
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/debug/localVariables")
@TestDataPath("$PROJECT_ROOT")
public class FirLocalVariableTestGenerated extends AbstractFirLocalVariableTest {
public class FirLightTreeLocalVariableTestGenerated extends AbstractFirLightTreeLocalVariableTest {
@Test
public void testAllFilesPresentInLocalVariables() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/localVariables"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/boxInline")
@TestDataPath("$PROJECT_ROOT")
public class FirSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractFirSerializeCompileKotlinAgainstInlineKotlinTest {
public class FirLightTreeSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractFirLightTreeSerializeCompileKotlinAgainstInlineKotlinTest {
@Test
public void testAllFilesPresentInBoxInline() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxInline"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR_SERIALIZE, true);
@@ -17,7 +17,7 @@ import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.test.generators.GenerateCompilerTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
public class FirSpecificBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenTest {
public class FirLightTreeSpecificBlackBoxCodegenTestGenerated extends AbstractFirLightTreeBlackBoxCodegenTest {
@Nested
@TestMetadata("compiler/fir/fir2ir/testData/codegen/box")
@TestDataPath("$PROJECT_ROOT")
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing")
@TestDataPath("$PROJECT_ROOT")
public class Fir2IrSpecificBytecodeListingPsiTestGenerated extends AbstractFirPsiBytecodeListingTest {
public class FirLightTreeSpecificBytecodeListingTestGenerated extends AbstractFirLightTreeBytecodeListingTest {
@Test
public void testAllFilesPresentInBytecodeListing() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/debug/stepping")
@TestDataPath("$PROJECT_ROOT")
public class FirSteppingTestGenerated extends AbstractFirSteppingTest {
public class FirLightTreeSteppingTestGenerated extends AbstractFirLightTreeSteppingTest {
@Test
public void testAllFilesPresentInStepping() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/debug/stepping"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/fir/fir2ir/testData/codegen/bytecodeListing")
@TestDataPath("$PROJECT_ROOT")
public class Fir2IrSpecificBytecodeListingTestGenerated extends AbstractFirBytecodeListingTest {
public class FirPsiSpecificBytecodeListingTestGenerated extends AbstractFirPsiBytecodeListingTest {
@Test
public void testAllFilesPresentInBytecodeListing() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/fir2ir/testData/codegen/bytecodeListing"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/fir/fir2ir/testData/ir/irText")
@TestDataPath("$PROJECT_ROOT")
public class LightTreeFir2IrSpecificTextTestGenerated extends AbstractFirPsi2IrTextTest {
public class FirLightTreeIrSpecificTextTestGenerated extends AbstractFirLightTreeIrTextTest {
@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);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/ir/irText")
@TestDataPath("$PROJECT_ROOT")
public class FirPsi2IrTextTestGenerated extends AbstractFirPsi2IrTextTest {
public class FirLightTreeIrTextTestGenerated extends AbstractFirLightTreeIrTextTest {
@Test
public void testAllFilesPresentInIrText() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/fir/fir2ir/testData/ir/irText")
@TestDataPath("$PROJECT_ROOT")
public class Fir2IrSpecificTextTestGenerated extends AbstractFir2IrTextTest {
public class FirPsiIrSpecificTextTestGenerated extends AbstractFirPsiIrTextTest {
@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);
@@ -19,7 +19,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/ir/irText")
@TestDataPath("$PROJECT_ROOT")
public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
public class FirPsiIrTextTestGenerated extends AbstractFirPsiIrTextTest {
@Test
public void testAllFilesPresentInIrText() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/ir/irText"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);