[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
@@ -16,7 +16,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 FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnosticsWithLightTreeTest {
public class FirLightTreeDiagnosticsTestGenerated extends AbstractFirLightTreeDiagnosticsTest {
@Nested
@TestMetadata("compiler/fir/analysis-tests/testData/resolve")
@TestDataPath("$PROJECT_ROOT")
@@ -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 FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnosticsWithLightTreeTest {
public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFirLightTreeDiagnosticsTest {
@Nested
@TestMetadata("compiler/testData/diagnostics/tests")
@TestDataPath("$PROJECT_ROOT")
@@ -18,7 +18,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/diagnostics/nativeTests")
@TestDataPath("$PROJECT_ROOT")
public class FirOldFrontendNativeDiagnosticsWithLightTreeTestGenerated extends AbstractFirNativeDiagnosticsWithLightTreeTest {
public class FirLightTreeOldFrontendNativeDiagnosticsTestGenerated extends AbstractFirLightTreeNativeDiagnosticsTest {
@Test
public void testAllFilesPresentInNativeTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/nativeTests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);
@@ -16,7 +16,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 FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
public class FirPsiDiagnosticTestGenerated extends AbstractFirPsiDiagnosticTest {
@Nested
@TestMetadata("compiler/fir/analysis-tests/testData/resolve")
@TestDataPath("$PROJECT_ROOT")
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -18,7 +18,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/tests-spec/testData/diagnostics")
@TestDataPath("$PROJECT_ROOT")
public class FirDiagnosticTestSpecGenerated extends AbstractFirDiagnosticTestSpec {
public class FirPsiDiagnosticTestSpecGenerated extends AbstractFirPsiDiagnosticTestSpec {
@Test
public void testAllFilesPresentInDiagnostics() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true, "helpers", "linked/annotations", "linked/built-in-types-and-their-semantics", "linked/control--and-data-flow-analysis.control-flow-graph.expressions-1.conditional-expressions", "linked/control--and-data-flow-analysis/performing-analysis-on-the-control-flow-graph", "linked/declarations/classifier-declaration/class-declaration/nested-and-inner-classifiers", "linked/declarations/classifier-declaration/classifier-initialization", "linked/declarations/classifier-declaration/data-class-declaration", "linked/declarations/function-declaration", "linked/declarations/property-declaration/property-initialization", "linked/declarations/type-alias", "linked/expressions/call-and-property-access-expressions", "linked/expressions/function-literals", "linked/inheritance", "linked/overload-resolution/c-level-partition", "linked/overload-resolution/determining-function-applicability-for-a-specific-call/rationale", "linked/overloadable-operators", "linked/statements/assignments/simple-assignments", "linked/type-inference/local-type-inference", "linked/type-inference/smart-casts/smart-cast-types", "linked/type-system/subtyping/subtyping-for-nullable-types", "linked/type-system/type-kinds/type-parameters");
@@ -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 FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosticTest {
public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDiagnosticTest {
@Nested
@TestMetadata("compiler/testData/diagnostics/tests")
@TestDataPath("$PROJECT_ROOT")
@@ -16,7 +16,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 FirOldFrontendForeignAnnotationsSourceJavaTestGenerated extends AbstractFirForeignAnnotationsSourceJavaTest {
public class FirPsiOldFrontendForeignAnnotationsCompiledJavaTestGenerated extends AbstractFirPsiForeignAnnotationsCompiledJavaTest {
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/tests")
@TestDataPath("$PROJECT_ROOT")
@@ -16,7 +16,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 FirOldFrontendForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated extends AbstractFirForeignAnnotationsCompiledJavaWithPsiClassReadingTest {
public class FirPsiOldFrontendForeignAnnotationsCompiledJavaWithPsiClassReadingTestGenerated extends AbstractFirPsiForeignAnnotationsCompiledJavaWithPsiClassReadingTest {
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/tests")
@TestDataPath("$PROJECT_ROOT")
@@ -16,7 +16,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 FirOldFrontendForeignAnnotationsCompiledJavaTestGenerated extends AbstractFirForeignAnnotationsCompiledJavaTest {
public class FirPsiOldFrontendForeignAnnotationsSourceJavaTestGenerated extends AbstractFirPsiForeignAnnotationsSourceJavaTest {
@Nested
@TestMetadata("compiler/testData/diagnostics/foreignAnnotationsTests/tests")
@TestDataPath("$PROJECT_ROOT")
@@ -18,7 +18,7 @@ import java.util.regex.Pattern;
@SuppressWarnings("all")
@TestMetadata("compiler/testData/diagnostics/nativeTests")
@TestDataPath("$PROJECT_ROOT")
public class FirOldFrontendNativeDiagnosticsTestGenerated extends AbstractFirNativeDiagnosticsTest {
public class FirPsiOldFrontendNativeDiagnosticsTestGenerated extends AbstractFirPsiNativeDiagnosticsTest {
@Test
public void testAllFilesPresentInNativeTests() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/nativeTests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(fir|ll)\\.kts?$"), true);