mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 06:51:17 +07:00
[kotlin] fix tests after migration to ModCommand API
After migration "Make 'open'" intention is available for local declaration and suggests adding modifier to containing non-local declaration KTIJ-26974 GitOrigin-RevId: 250517cce4ad91aeb25b8335585acaba157b2f49
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7b86113420
commit
ed6e25b59d
+7
@@ -21,6 +21,13 @@ abstract class AbstractK2IntentionTest : AbstractIntentionTestBase() {
|
||||
else super.afterFileNameSuffix(ktFilePath)
|
||||
}
|
||||
|
||||
override fun fileName(): String {
|
||||
val fileName = super.fileName()
|
||||
val firFileName = IgnoreTests.deriveFirFileName(fileName)
|
||||
|
||||
return if (File(testDataDirectory, firFileName).exists()) firFileName else fileName
|
||||
}
|
||||
|
||||
override fun isFirPlugin() = true
|
||||
|
||||
override fun getDefaultProjectDescriptor(): KotlinLightProjectDescriptor {
|
||||
|
||||
+3
-1
@@ -339,6 +339,8 @@ object IgnoreTests {
|
||||
|
||||
private fun deriveFirTestFile(originalTestFile: File): File {
|
||||
val name = originalTestFile.name
|
||||
return originalTestFile.parentFile.resolve(name.substringBeforeLast('.') + ".fir." + name.substringAfterLast('.'))
|
||||
return originalTestFile.parentFile.resolve(deriveFirFileName(name))
|
||||
}
|
||||
|
||||
fun deriveFirFileName(fileName: String): String = fileName.substringBeforeLast('.') + ".fir." + fileName.substringAfterLast('.')
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
open class Foo {
|
||||
fun bar() {
|
||||
fun<caret> foo() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
open class Foo {
|
||||
open fun bar() {
|
||||
fun foo() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
open class Foo {
|
||||
fun bar() {
|
||||
fun <caret> foo() {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// AFTER-WARNING: Variable 'foo' is never used
|
||||
open class Foo {
|
||||
fun bar() {
|
||||
var<caret> foo = 1
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// AFTER-WARNING: Variable 'foo' is never used
|
||||
open class Foo {
|
||||
open fun bar() {
|
||||
var foo = 1
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
// IS_APPLICABLE: false
|
||||
|
||||
open class Foo {
|
||||
fun bar() {
|
||||
var<caret> foo = 1
|
||||
|
||||
Reference in New Issue
Block a user