Fix UnusedSymbolInspection for parameterless and suspend main functions
#KT-26574 Fixed
This commit is contained in:
@@ -25,7 +25,9 @@ import com.intellij.testFramework.TestLoggerFactory
|
||||
import org.jdom.Document
|
||||
import org.jdom.input.SAXBuilder
|
||||
import org.jetbrains.kotlin.idea.inspections.runInspection
|
||||
import org.jetbrains.kotlin.idea.test.*
|
||||
import org.jetbrains.kotlin.idea.test.KotlinLightCodeInsightFixtureTestCase
|
||||
import org.jetbrains.kotlin.idea.test.TestFixtureExtension
|
||||
import org.jetbrains.kotlin.idea.test.configureCompilerOptions
|
||||
import org.jetbrains.kotlin.idea.util.application.runWriteAction
|
||||
import org.jetbrains.kotlin.idea.versions.bundledRuntimeVersion
|
||||
import org.jetbrains.kotlin.test.InTextDirectivesUtils
|
||||
@@ -68,6 +70,8 @@ abstract class AbstractInspectionTest : KotlinLightCodeInsightFixtureTestCase()
|
||||
|
||||
val fixtureClasses = InTextDirectivesUtils.findListWithPrefixes(options, "// FIXTURE_CLASS: ")
|
||||
|
||||
configureCompilerOptions(options, project, module)
|
||||
|
||||
val inspectionsTestDir = optionsFile.parentFile!!
|
||||
val srcDir = inspectionsTestDir.parentFile!!
|
||||
|
||||
|
||||
+5
@@ -409,6 +409,11 @@ public class InspectionTestGenerated extends AbstractInspectionTest {
|
||||
runTest("idea/testData/inspections/unusedSymbol/function/inspectionData/inspections.test");
|
||||
}
|
||||
|
||||
@TestMetadata("unusedSymbol/functionMain/inspectionData/inspections.test")
|
||||
public void testUnusedSymbol_functionMain_inspectionData_Inspections_test() throws Exception {
|
||||
runTest("idea/testData/inspections/unusedSymbol/functionMain/inspectionData/inspections.test");
|
||||
}
|
||||
|
||||
@TestMetadata("unusedSymbol/js/inspectionData/inspections.test")
|
||||
public void testUnusedSymbol_js_inspectionData_Inspections_test() throws Exception {
|
||||
runTest("idea/testData/inspections/unusedSymbol/js/inspectionData/inspections.test");
|
||||
|
||||
Reference in New Issue
Block a user