Add tests for JetRefactoringUtil.selectExpression
Add tests for JetRefactoringUtil.selectExpression, which is invoked by e.g. extract variable when some text is selected. Test cases under idea/testData/expressionSelection/ should contain Kotlin files with the usual <selection> tags, with the expected result of selectExpression in the last comment of the file.
This commit is contained in:
committed by
Nikolay Krasko
parent
4968afebf8
commit
998d2c5ec8
@@ -95,6 +95,7 @@ import org.jetbrains.jet.checkers.AbstractJetDiagnosticsTestWithStdLib
|
||||
import org.jetbrains.jet.plugin.codeInsight.AbstractInsertImportOnPasteTest
|
||||
import org.jetbrains.jet.resolve.AbstractReferenceToJavaWithWrongFileStructureTest
|
||||
import org.jetbrains.jet.plugin.navigation.AbstractKotlinGotoTest
|
||||
import org.jetbrains.jet.plugin.AbstractExpressionSelectionTest
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("java.awt.headless", "true")
|
||||
@@ -483,6 +484,10 @@ fun main(args: Array<String>) {
|
||||
testClass(javaClass<AbstractSmartSelectionTest>()) {
|
||||
model("smartSelection", testMethod = "doTestSmartSelection", pattern = """^([^\.]+)\.kt$""")
|
||||
}
|
||||
|
||||
testClass(javaClass<AbstractExpressionSelectionTest>()) {
|
||||
model("expressionSelection", testMethod = "doTestExpressionSelection", pattern = """^([^\.]+)\.kt$""")
|
||||
}
|
||||
}
|
||||
|
||||
testGroup("j2k/tests/test", "j2k/tests/testData") {
|
||||
|
||||
Reference in New Issue
Block a user