Mpp tests: allow to test java code in highlighting and quickfix tests

This commit is contained in:
Pavel V. Talanov
2018-04-27 15:53:34 +02:00
committed by Pavel V. Talanov
parent 0157d7bd5d
commit 9e493d8b73
10 changed files with 72 additions and 39 deletions
@@ -22,7 +22,7 @@ import java.io.File
abstract class AbstractMultiPlatformCompletionTest : AbstractMultiModuleTest() {
protected fun doTest(testPath: String) {
setupMppProjectFromDirStructure(File(testPath))
val file = project.findFileWithCaret()
val file = project.findFileWithCaret() as KtFile
val doc = PsiDocumentManager.getInstance(myProject).getDocument(file)!!
val offset = doc.extractMarkerOffset(project)
val editor = EditorFactory.getInstance().createEditor(doc, myProject)!!