forked from AVSystem/intellij-hocon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minimal tests for go to prev/next actions
- Loading branch information
Showing
5 changed files
with
34 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
test/org/jetbrains/plugins/hocon/navigation/HoconNavigationTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.jetbrains.plugins.hocon | ||
package navigation | ||
|
||
import com.intellij.openapi.editor.Editor | ||
import com.intellij.psi.PsiFile | ||
|
||
abstract class HoconNavigationTest(actionId: String, subPath: String) | ||
extends HoconActionTest(actionId, subPath) { | ||
protected def extractResult(file: PsiFile, editor: Editor): String = { | ||
val lp = editor.getCaretModel.getLogicalPosition | ||
s"${lp.line + 1}:${lp.column + 1}" | ||
} | ||
} | ||
|
||
import com.intellij.openapi.actionSystem.IdeActions | ||
|
||
class HoconSubstitutionResolutionTest extends HoconNavigationTest(IdeActions.ACTION_GOTO_DECLARATION, "substitution") | ||
object HoconSubstitutionResolutionTest extends TestSuiteCompanion[HoconSubstitutionResolutionTest] | ||
|
||
class HoconGoToNextTest extends HoconNavigationTest("HoconGotoNext", "gotoNext") | ||
object HoconGoToNextTest extends TestSuiteCompanion[HoconGoToNextTest] | ||
|
||
class HoconGoToPrevTest extends HoconNavigationTest("HoconGotoPrev", "gotoPrev") | ||
object HoconGoToPrevTest extends TestSuiteCompanion[HoconGoToPrevTest] |
14 changes: 0 additions & 14 deletions
14
test/org/jetbrains/plugins/hocon/resolution/HoconSubstitutionResolutionTest.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
a<caret> = 5 | ||
a = 10 | ||
----- | ||
2:1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
a = 5 | ||
a<caret> = 10 | ||
----- | ||
1:1 |