mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Inline getLocalPath()
GitOrigin-RevId: 8a3fc7b6284cf0edc814a311f1c94bbfd07c4332
This commit is contained in:
committed by
intellij-monorepo-bot
parent
02cffbd146
commit
7765fd3df4
+5
-1
@@ -12,11 +12,15 @@ import org.jetbrains.kotlin.idea.test.KotlinWithJdkAndRuntimeLightProjectDescrip
|
||||
import org.jetbrains.kotlin.idea.test.withCustomCompilerOptions
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||
import org.junit.Assert
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractCompletionWeigherTest(val completionType: CompletionType, val relativeTestDataPath: String) :
|
||||
KotlinLightCodeInsightFixtureTestCase() {
|
||||
fun doTest(path: String) {
|
||||
myFixture.configureWithExtraFile(getLocalPath(path), ".Data", ".Data1", ".Data2", ".Data3", ".Data4", ".Data5", ".Data6")
|
||||
myFixture.configureWithExtraFile(
|
||||
File(path).toRelativeString(File(testDataPath)),
|
||||
".Data", ".Data1", ".Data2", ".Data3", ".Data4", ".Data5", ".Data6"
|
||||
)
|
||||
|
||||
val text = myFixture.editor.document.text
|
||||
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ abstract class AbstractCodeMoverTest : KotlinLightCodeInsightFixtureTestCase() {
|
||||
if (isApplicableExpected) {
|
||||
val afterFile = File("$path.after")
|
||||
try {
|
||||
myFixture.checkResultByFile(getLocalPath(afterFile.absolutePath))
|
||||
myFixture.checkResultByFile(afterFile.toRelativeString(File(testDataPath)))
|
||||
} catch (e: ComparisonFailure) {
|
||||
KotlinTestUtils.assertEqualsToFile(afterFile, editor)
|
||||
}
|
||||
|
||||
-2
@@ -70,8 +70,6 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix
|
||||
|
||||
protected open fun fileName(): String = KotlinTestUtils.getTestDataFileName(this::class.java, this.name) ?: (getTestName(false) + ".kt")
|
||||
|
||||
protected fun getLocalPath(path: String): String = File(path).toRelativeString(File(testDataPath))
|
||||
|
||||
override fun getTestDataPath(): String = TestMetadataUtil.getTestDataPath(javaClass)
|
||||
|
||||
override fun setUp() {
|
||||
|
||||
Reference in New Issue
Block a user