[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:
Dmitrii Gridin
2023-10-05 11:46:50 +02:00
committed by Space Team
parent e452113a7a
commit 2cac922cd0
45 changed files with 1158 additions and 17 deletions
@@ -1,10 +1,11 @@
/*
* Copyright 2010-2020 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.
*/
package org.jetbrains.kotlin.test.services
import com.intellij.codeInsight.ExternalAnnotationsManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.vfs.StandardFileSystems
import com.intellij.psi.PsiManager
@@ -139,6 +140,9 @@ val TestFile.isMjsFile: Boolean
val TestModule.javaFiles: List<TestFile>
get() = files.filter { it.isJavaFile }
val TestFile.isExternalAnnotation: Boolean
get() = name == ExternalAnnotationsManager.ANNOTATIONS_XML
fun SourceFileProvider.getRealJavaFiles(module: TestModule): List<File> {
return module.javaFiles.map { getRealFileForSourceFile(it) }
}