mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] Add test for obsolete issue
^KTIJ-10245 Obsolete GitOrigin-RevId: 76acc582d82ae65903ffefa11acb14e551e2e9a2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
06fa081e6d
commit
228ab8643b
+5
@@ -25,6 +25,7 @@ import junit.framework.TestCase
|
||||
import org.jetbrains.kotlin.formatter.FormatSettingsUtil
|
||||
import org.jetbrains.kotlin.idea.KotlinLanguage
|
||||
import org.jetbrains.kotlin.idea.codeInsight.hints.KotlinAbstractHintsProvider
|
||||
import org.jetbrains.kotlin.idea.core.script.ScriptConfigurationManager
|
||||
import org.jetbrains.kotlin.idea.test.*
|
||||
import org.jetbrains.kotlin.idea.util.application.executeCommand
|
||||
import org.jetbrains.kotlin.idea.util.application.executeWriteCommand
|
||||
@@ -124,6 +125,10 @@ abstract class AbstractIntentionTestBase : KotlinLightCodeInsightFixtureTestCase
|
||||
val pathToFiles = mapOf(*(sourceFilePaths zip psiFiles).toTypedArray())
|
||||
|
||||
ConfigLibraryUtil.configureLibrariesByDirective(module, fileText)
|
||||
if ((myFixture.file as? KtFile)?.isScript() == true) {
|
||||
ScriptConfigurationManager.updateScriptDependenciesSynchronously(myFixture.file)
|
||||
}
|
||||
|
||||
configureCodeStyleAndRun(project, { FormatSettingsUtil.createConfigurator(fileText, it).configureSettings() }) {
|
||||
configureRegistryAndRun(fileText) {
|
||||
try {
|
||||
|
||||
+5
@@ -14107,6 +14107,11 @@ public abstract class K1IntentionTestGenerated extends AbstractK1IntentionTest {
|
||||
public void testRedeclarationPropertyConflict() throws Exception {
|
||||
runTest("testData/intentions/moveMemberToTopLevel/redeclarationPropertyConflict.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("script.kts")
|
||||
public void testScript() throws Exception {
|
||||
runTest("testData/intentions/moveMemberToTopLevel/script.kts");
|
||||
}
|
||||
}
|
||||
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// RUNTIME_WITH_SCRIPT_RUNTIME
|
||||
object Foo {
|
||||
fun <caret>foo() = 1
|
||||
val a = 1
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// RUNTIME_WITH_SCRIPT_RUNTIME
|
||||
object Foo {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
fun foo() = 1
|
||||
Reference in New Issue
Block a user