Navigation: add expect declarations as supers #KT-16892 Fixed
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ import java.util.regex.Pattern;
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class GotoSuperTestGenerated extends AbstractGotoSuperTest {
|
||||
public void testAllFilesPresentInGotoSuper() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoSuper"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoSuper"), Pattern.compile("^(.+)\\.test$"), TargetBackend.ANY, false);
|
||||
}
|
||||
|
||||
@TestMetadata("BadPositionLambdaParameter.test")
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2000-2018 JetBrains s.r.o. 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.idea.navigation
|
||||
|
||||
import com.intellij.codeInsight.navigation.GotoTargetHandler
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.intellij.psi.PsiFile
|
||||
import org.jetbrains.kotlin.idea.codeInsight.GotoSuperActionHandler
|
||||
import org.jetbrains.kotlin.idea.test.PluginTestCaseBase
|
||||
import java.io.File
|
||||
|
||||
class KotlinGotoSuperMultiModuleTest : AbstractKotlinNavigationMultiModuleTest() {
|
||||
override fun doNavigate(editor: Editor, file: PsiFile): GotoTargetHandler.GotoData {
|
||||
val gotoAction = GotoSuperActionHandler()
|
||||
val (superDeclarations, _) = gotoAction.allSuperDeclarationsAndDescriptor(editor, file)
|
||||
return GotoTargetHandler.GotoData(file.findElementAt(editor.caretModel.offset)!!, superDeclarations.toTypedArray(), emptyList())
|
||||
}
|
||||
|
||||
override fun getTestDataPath() =
|
||||
File(PluginTestCaseBase.getTestDataPathBase(), "/navigation/gotoSuper/multiModule").path + File.separator
|
||||
|
||||
fun testActualClass() {
|
||||
doMultiPlatformTest("jvm.kt")
|
||||
}
|
||||
|
||||
fun testActualFunction() {
|
||||
doMultiPlatformTest("jvm.kt")
|
||||
}
|
||||
|
||||
fun testActualProperty() {
|
||||
doMultiPlatformTest("jvm.kt")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user