[Tests] Refactor: move annotation arguments lazy resolve test for

...`ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT` checker near to
other tests of this diagnostic. This is because now such tests
are run in lazy resolve test suite, so no need to store them
separately.

^KT-62559
This commit is contained in:
Roman Efremov
2023-11-10 12:13:17 +01:00
committed by Space Team
parent c20a5fc650
commit 99bf96e747
10 changed files with 64 additions and 32 deletions
@@ -23048,12 +23048,6 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/multimodule/dependsOnModule.kt");
}
@Test
@TestMetadata("expectActualAnnotationsWithLazyResolve.kt")
public void testExpectActualAnnotationsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/expectActualAnnotationsWithLazyResolve.kt");
}
@Test
@TestMetadata("friendModule.kt")
public void testFriendModule() throws Exception {
@@ -23863,6 +23857,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsDefaults.kt");
}
@Test
@TestMetadata("annotationArgumentsWithLazyResolve.kt")
public void testAnnotationArgumentsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsWithLazyResolve.kt");
}
@Test
@TestMetadata("annotationMatching_oldLanguageVersion.kt")
public void testAnnotationMatching_oldLanguageVersion() throws Exception {
@@ -23048,12 +23048,6 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/multimodule/dependsOnModule.kt");
}
@Test
@TestMetadata("expectActualAnnotationsWithLazyResolve.kt")
public void testExpectActualAnnotationsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/expectActualAnnotationsWithLazyResolve.kt");
}
@Test
@TestMetadata("friendModule.kt")
public void testFriendModule() throws Exception {
@@ -23863,6 +23857,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsDefaults.kt");
}
@Test
@TestMetadata("annotationArgumentsWithLazyResolve.kt")
public void testAnnotationArgumentsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsWithLazyResolve.kt");
}
@Test
@TestMetadata("annotationMatching_oldLanguageVersion.kt")
public void testAnnotationMatching_oldLanguageVersion() throws Exception {
@@ -23042,12 +23042,6 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/multimodule/dependsOnModule.kt");
}
@Test
@TestMetadata("expectActualAnnotationsWithLazyResolve.kt")
public void testExpectActualAnnotationsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/expectActualAnnotationsWithLazyResolve.kt");
}
@Test
@TestMetadata("friendModule.kt")
public void testFriendModule() throws Exception {
@@ -454,6 +454,12 @@ public class FirOldFrontendMPPDiagnosticsWithLightTreeTestGenerated extends Abst
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsDefaults.kt");
}
@Test
@TestMetadata("annotationArgumentsWithLazyResolve.kt")
public void testAnnotationArgumentsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsWithLazyResolve.kt");
}
@Test
@TestMetadata("annotationMatching_oldLanguageVersion.kt")
public void testAnnotationMatching_oldLanguageVersion() throws Exception {
@@ -454,6 +454,12 @@ public class FirOldFrontendMPPDiagnosticsWithPsiTestGenerated extends AbstractFi
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsDefaults.kt");
}
@Test
@TestMetadata("annotationArgumentsWithLazyResolve.kt")
public void testAnnotationArgumentsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsWithLazyResolve.kt");
}
@Test
@TestMetadata("annotationMatching_oldLanguageVersion.kt")
public void testAnnotationMatching_oldLanguageVersion() throws Exception {
@@ -23048,12 +23048,6 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/multimodule/dependsOnModule.kt");
}
@Test
@TestMetadata("expectActualAnnotationsWithLazyResolve.kt")
public void testExpectActualAnnotationsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/expectActualAnnotationsWithLazyResolve.kt");
}
@Test
@TestMetadata("friendModule.kt")
public void testFriendModule() throws Exception {
@@ -0,0 +1,34 @@
// Test for ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT diagnostic when annotations arguments are lazily resolved.
// MODULE: common
// TARGET_PLATFORM: Common
@Target(AnnotationTarget.TYPE, AnnotationTarget.FUNCTION)
annotation class Ann(val s: String = "default")
expect fun onType_negative(): @Ann("") Any
expect fun onType_positive(): @Ann("") Any
@Ann("")
expect fun onFunction_negative()
@Ann("")
expect fun onFunction_positive()
@Ann
expect fun withEmptyArguments_negative()
@Ann
expect fun withEmptyArguments_positive()
// MODULE: main()()(common)
// TARGET_PLATFORM: JVM
actual fun onType_negative(): @Ann("") Any = Any()
<!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>onType_positive<!>(): @Ann("incorrect") Any = Any()<!>
@Ann("")
actual fun onFunction_negative() {}
<!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>@Ann("incorrect")
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>onFunction_positive<!>() {}<!>
@Ann
actual fun withEmptyArguments_negative() {}
<!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>@Ann("incorrect")
actual fun <!ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT!>withEmptyArguments_positive<!>() {}<!>
@@ -1,6 +1,5 @@
// Test for ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT diagnostic when annotations arguments are lazily resolved.
// LANGUAGE: +MultiPlatformProjects
// MODULE: common
// TARGET_PLATFORM: Common
@Target(AnnotationTarget.TYPE, AnnotationTarget.FUNCTION)
@@ -1,6 +1,5 @@
// Test for ACTUAL_ANNOTATIONS_NOT_MATCH_EXPECT diagnostic when annotations arguments are lazily resolved.
// LANGUAGE: +MultiPlatformProjects
// MODULE: common
// TARGET_PLATFORM: Common
@Target(AnnotationTarget.TYPE, AnnotationTarget.FUNCTION)
@@ -23048,12 +23048,6 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/multimodule/dependsOnModule.kt");
}
@Test
@TestMetadata("expectActualAnnotationsWithLazyResolve.kt")
public void testExpectActualAnnotationsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multimodule/expectActualAnnotationsWithLazyResolve.kt");
}
@Test
@TestMetadata("friendModule.kt")
public void testFriendModule() throws Exception {
@@ -23863,6 +23857,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsDefaults.kt");
}
@Test
@TestMetadata("annotationArgumentsWithLazyResolve.kt")
public void testAnnotationArgumentsWithLazyResolve() throws Exception {
runTest("compiler/testData/diagnostics/tests/multiplatform/actualAnnotationsNotMatchExpect/annotationArgumentsWithLazyResolve.kt");
}
@Test
@TestMetadata("annotationMatching_oldLanguageVersion.kt")
public void testAnnotationMatching_oldLanguageVersion() throws Exception {