[FIR] add tests on external annotations
Tests are excluded in COMPILED_JAVA mode because in this mode external annotations are not present at all ^KT-62310
This commit is contained in:
committed by
Space Team
parent
e452113a7a
commit
2cac922cd0
+12
@@ -136,6 +136,18 @@ public class FirStandaloneNormalAnalysisSourceModuleSymbolByReferenceTestGenerat
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/javaMethod.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaMethodWithExternalNotNullAnnotation.kt")
|
||||
public void testJavaMethodWithExternalNotNullAnnotation() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/javaMethodWithExternalNotNullAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaMethodWithNotNullAnnotation.kt")
|
||||
public void testJavaMethodWithNotNullAnnotation() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/symbols/symbolByReference/javaMethodWithNotNullAnnotation.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaStaticField.kt")
|
||||
public void testJavaStaticField() throws Exception {
|
||||
|
||||
+6
-2
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -16,10 +16,12 @@ import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisA
|
||||
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.AnalysisApiTestServiceRegistrar
|
||||
import org.jetbrains.kotlin.analysis.test.framework.test.configurators.FrontendKind
|
||||
import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder
|
||||
import org.jetbrains.kotlin.test.preprocessors.ExternalAnnotationsSourcePreprocessor
|
||||
import org.jetbrains.kotlin.test.services.TestModuleStructure
|
||||
import org.jetbrains.kotlin.test.services.TestServices
|
||||
import org.jetbrains.kotlin.test.services.configuration.ExternalAnnotationsEnvironmentConfigurator
|
||||
|
||||
public object StandaloneModeConfigurator : AnalysisApiTestConfigurator() {
|
||||
object StandaloneModeConfigurator : AnalysisApiTestConfigurator() {
|
||||
override val analyseInDependentSession: Boolean get() = false
|
||||
override val frontendKind: FrontendKind get() = FrontendKind.Fir
|
||||
|
||||
@@ -31,6 +33,8 @@ public object StandaloneModeConfigurator : AnalysisApiTestConfigurator() {
|
||||
useAdditionalService<KtModuleFactory> { KtSourceModuleFactory() }
|
||||
useDirectives(SealedClassesInheritorsCaclulatorPreAnalysisHandler.Directives)
|
||||
usePreAnalysisHandlers(::SealedClassesInheritorsCaclulatorPreAnalysisHandler)
|
||||
useConfigurators(::ExternalAnnotationsEnvironmentConfigurator)
|
||||
useSourcePreprocessor(::ExternalAnnotationsSourcePreprocessor)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user