From 87f325c44b5a10e6036a02b02b8230f1a750b64e Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Mon, 22 Jun 2015 20:45:34 +0300 Subject: [PATCH] Use common Kotlin test supertype to avoid invalid root access assert --- .../kotlin/idea/codeInsight/AbstractJetInspectionTest.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/AbstractJetInspectionTest.kt b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/AbstractJetInspectionTest.kt index 817b996b216..ff573c7e1be 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/codeInsight/AbstractJetInspectionTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/codeInsight/AbstractJetInspectionTest.kt @@ -31,11 +31,12 @@ import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl import org.jetbrains.kotlin.idea.test.JetLightProjectDescriptor import org.jetbrains.kotlin.idea.test.PluginTestCaseBase import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil +import org.jetbrains.kotlin.idea.test.JetLightCodeInsightFixtureTestCase import org.jetbrains.kotlin.test.InTextDirectivesUtils import org.jetbrains.kotlin.test.JetTestUtils import java.io.File -public abstract class AbstractJetInspectionTest: LightCodeInsightFixtureTestCase() { +public abstract class AbstractJetInspectionTest: JetLightCodeInsightFixtureTestCase() { companion object { val ENTRY_POINT_ANNOTATION = "test.anno.EntryPoint" } @@ -74,7 +75,7 @@ public abstract class AbstractJetInspectionTest: LightCodeInsightFixtureTestCase if (text.startsWith("package") || !file.getName().endsWith(".kt")) text else - "package ${file.getName().trimTrailing(".kt")};$text" + "package ${file.getName().removeSuffix(".kt")};$text" configureByText(file.getName(), fileText)!! }