From 902c4688a270cacae102507f4d0cc35327444453 Mon Sep 17 00:00:00 2001 From: Natalia Selezneva Date: Thu, 15 Nov 2018 12:44:10 +0300 Subject: [PATCH] Tests: register jdk in project table to avoid leaking of VirtualPointer --- .../navigation/NavigateToStdlibSourceTest.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToStdlibSourceTest.kt b/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToStdlibSourceTest.kt index ebee10c54ee..7f970c44eb0 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToStdlibSourceTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/navigation/NavigateToStdlibSourceTest.kt @@ -19,10 +19,7 @@ package org.jetbrains.kotlin.idea.decompiler.navigation import com.intellij.psi.PsiElement import junit.framework.TestCase import org.jetbrains.kotlin.idea.KotlinFileType -import org.jetbrains.kotlin.idea.test.KotlinCodeInsightTestCase -import org.jetbrains.kotlin.idea.test.ModuleKind -import org.jetbrains.kotlin.idea.test.closeAndDeleteProject -import org.jetbrains.kotlin.idea.test.configureAs +import org.jetbrains.kotlin.idea.test.* class NavigateToStdlibSourceTest : KotlinCodeInsightTestCase() { @@ -49,6 +46,12 @@ class NavigateToStdlibSourceTest : KotlinCodeInsightTestCase() { TestCase.assertEquals(sourceFileName, navigationElement.containingFile.name) } + override fun setUp() { + super.setUp() + + PluginTestCaseBase.addJdk(testRootDisposable) { ProjectDescriptorWithStdlibSources.INSTANCE.sdk } + } + override fun tearDown() { super.tearDown() // Workaround for IDEA's bug during tests.