Add annotations-13.0 in classpath of those tests where the annotations from stdlib were used

This commit is contained in:
Ilya Gorbunov
2018-09-12 05:58:32 +03:00
parent f340bc9f91
commit 3cc606577c
2 changed files with 6 additions and 2 deletions
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.asJava.classes.KtLightClassForFacade
import org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration
import org.jetbrains.kotlin.asJava.elements.*
import org.jetbrains.kotlin.asJava.toLightClass
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
import org.jetbrains.kotlin.idea.KotlinDaemonAnalyzerTestCase
import org.jetbrains.kotlin.idea.caches.lightClasses.IDELightClassConstructionContext
import org.jetbrains.kotlin.idea.caches.resolve.LightClassLazinessChecker.Tracker.Level.*
@@ -91,7 +92,8 @@ abstract class AbstractIdeCompiledLightClassTest : KotlinDaemonAnalyzerTestCase(
Assert.assertNotNull("Test file not found!", testFile)
val libraryJar = MockLibraryUtil.compileJvmLibraryToJar(testFile!!.canonicalPath, libName())
val libraryJar = MockLibraryUtil.compileJvmLibraryToJar(testFile!!.canonicalPath, libName(),
extraClasspath = listOf(ForTestCompileRuntime.jetbrainsAnnotationsForTests().path))
val jarUrl = "jar://" + FileUtilRt.toSystemIndependentName(libraryJar.absolutePath) + "!/"
ModuleRootModificationUtil.addModuleLibrary(module, jarUrl)
}