Tests: do not report backend diagnostics if there's frontend error
In most affected tests, the backend diagnostic such as "conflicting JVM signature" or "accidental override" is directly caused by some already existing error reported by frontend, so it doesn't make sense to check backend diagnostics there. Tests where that was not the case were moved/copied to `testsWithJvmBackend`.
This commit is contained in:
committed by
Space Team
parent
dca6c21d7f
commit
55f9f74d5c
-6
@@ -42480,12 +42480,6 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNames.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmNamesDuplicate.kt")
|
||||
public void testJvmNamesDuplicate() {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNamesDuplicate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmOverloads.kt")
|
||||
public void testJvmOverloads() {
|
||||
|
||||
-6
@@ -42618,12 +42618,6 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNames.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmNamesDuplicate.kt")
|
||||
public void testJvmNamesDuplicate() {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/duplicateJvmSignature/jvmNamesDuplicate.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("jvmOverloads.kt")
|
||||
public void testJvmOverloads() {
|
||||
|
||||
+50
@@ -294,6 +294,12 @@ public class FirLightTreeDiagnosticsTestWithJvmIrBackendGenerated extends Abstra
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/extensionProperties.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericFunctions.kt")
|
||||
public void testGenericFunctions() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/genericFunctions.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericType.kt")
|
||||
public void testGenericType() {
|
||||
@@ -306,6 +312,12 @@ public class FirLightTreeDiagnosticsTestWithJvmIrBackendGenerated extends Abstra
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritGenericMethodsWithDifferentSubstitution.kt")
|
||||
public void testInheritGenericMethodsWithDifferentSubstitution() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/inheritGenericMethodsWithDifferentSubstitution.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kotlinAndJavaCollections.kt")
|
||||
public void testKotlinAndJavaCollections() {
|
||||
@@ -517,6 +529,44 @@ public class FirLightTreeDiagnosticsTestWithJvmIrBackendGenerated extends Abstra
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/javaInterop")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class JavaInterop {
|
||||
@Test
|
||||
public void testAllFilesPresentInJavaInterop() {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/javaInterop"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritFromJavaCollectionSubclassWithContainsOverload.kt")
|
||||
public void testInheritFromJavaCollectionSubclassWithContainsOverload() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/javaInterop/inheritFromJavaCollectionSubclassWithContainsOverload.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("supertypeDifferentParameterNullability.kt")
|
||||
public void testSupertypeDifferentParameterNullability() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/javaInterop/supertypeDifferentParameterNullability.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/jvmName")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class JvmName {
|
||||
@Test
|
||||
public void testAllFilesPresentInJvmName() {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/jvmName"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("conflictsWIthJvmNameInClass.kt")
|
||||
public void testConflictsWIthJvmNameInClass() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/jvmName/conflictsWIthJvmNameInClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
+50
@@ -294,6 +294,12 @@ public class FirPsiDiagnosticsTestWithJvmIrBackendGenerated extends AbstractFirP
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/extensionProperties.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericFunctions.kt")
|
||||
public void testGenericFunctions() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/genericFunctions.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("genericType.kt")
|
||||
public void testGenericType() {
|
||||
@@ -306,6 +312,12 @@ public class FirPsiDiagnosticsTestWithJvmIrBackendGenerated extends AbstractFirP
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/inheritFromTwoTraits.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritGenericMethodsWithDifferentSubstitution.kt")
|
||||
public void testInheritGenericMethodsWithDifferentSubstitution() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/erasure/inheritGenericMethodsWithDifferentSubstitution.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kotlinAndJavaCollections.kt")
|
||||
public void testKotlinAndJavaCollections() {
|
||||
@@ -517,6 +529,44 @@ public class FirPsiDiagnosticsTestWithJvmIrBackendGenerated extends AbstractFirP
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/javaInterop")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class JavaInterop {
|
||||
@Test
|
||||
public void testAllFilesPresentInJavaInterop() {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/javaInterop"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inheritFromJavaCollectionSubclassWithContainsOverload.kt")
|
||||
public void testInheritFromJavaCollectionSubclassWithContainsOverload() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/javaInterop/inheritFromJavaCollectionSubclassWithContainsOverload.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("supertypeDifferentParameterNullability.kt")
|
||||
public void testSupertypeDifferentParameterNullability() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/javaInterop/supertypeDifferentParameterNullability.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/jvmName")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
public class JvmName {
|
||||
@Test
|
||||
public void testAllFilesPresentInJvmName() {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/jvmName"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("conflictsWIthJvmNameInClass.kt")
|
||||
public void testConflictsWIthJvmNameInClass() {
|
||||
runTest("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/jvmName/conflictsWIthJvmNameInClass.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
@TestMetadata("compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/specialNames")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
|
||||
Reference in New Issue
Block a user