[Tests] Add diagnostic tests for sealed class inheritors

- Fix unrelated resolution errors in an existing test
- Add separate test for sealed classes and interfaces in HMPP projects,
located in different source sets

KT-64919
This commit is contained in:
Pavel Kirpichenkov
2024-01-31 17:51:43 +02:00
committed by Space Team
parent 3db7df6898
commit 3dede06d51
11 changed files with 184 additions and 24 deletions
@@ -26632,12 +26632,30 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/intermediateWithActualAndExpect.kt");
}
@Test
@TestMetadata("sealedInheritorsCorrectExpect.kt")
public void testSealedInheritorsCorrectExpect() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsCorrectExpect.kt");
}
@Test
@TestMetadata("sealedInheritorsInComplexModuleStructure.kt")
public void testSealedInheritorsInComplexModuleStructure() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.kt");
}
@Test
@TestMetadata("sealedInheritorsIncorrectExpect.kt")
public void testSealedInheritorsIncorrectExpect() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsIncorrectExpect.kt");
}
@Test
@TestMetadata("sealedInheritorsIncorrectNonExpect.kt")
public void testSealedInheritorsIncorrectNonExpect() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsIncorrectNonExpect.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/annotationMatching")
@TestDataPath("$PROJECT_ROOT")
@@ -26632,12 +26632,30 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/intermediateWithActualAndExpect.kt");
}
@Test
@TestMetadata("sealedInheritorsCorrectExpect.kt")
public void testSealedInheritorsCorrectExpect() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsCorrectExpect.kt");
}
@Test
@TestMetadata("sealedInheritorsInComplexModuleStructure.kt")
public void testSealedInheritorsInComplexModuleStructure() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsInComplexModuleStructure.kt");
}
@Test
@TestMetadata("sealedInheritorsIncorrectExpect.kt")
public void testSealedInheritorsIncorrectExpect() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsIncorrectExpect.kt");
}
@Test
@TestMetadata("sealedInheritorsIncorrectNonExpect.kt")
public void testSealedInheritorsIncorrectNonExpect() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/sealedInheritorsIncorrectNonExpect.kt");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/annotationMatching")
@TestDataPath("$PROJECT_ROOT")