Test minor: output all available fixes in local inspection tests
This commit is contained in:
@@ -155,12 +155,12 @@ abstract class AbstractLocalInspectionTest : KotlinLightCodeInsightFixtureTestCa
|
|||||||
problemDescriptors.all { it.highlightType.toString() == highlightExpectedString })
|
problemDescriptors.all { it.highlightType.toString() == highlightExpectedString })
|
||||||
}
|
}
|
||||||
|
|
||||||
val localFixActions = problemDescriptors.flatMap { problem ->
|
val allLocalFixActions = problemDescriptors.flatMap { problem ->
|
||||||
val fixes = problem.fixes
|
val fixes = problem.fixes
|
||||||
fixes?.toList() ?: emptyList()
|
fixes?.toList() ?: emptyList()
|
||||||
}.filter { fix -> localFixTextString == null || fix.name == localFixTextString }
|
}
|
||||||
|
val localFixActions = allLocalFixActions.filter { fix -> localFixTextString == null || fix.name == localFixTextString }
|
||||||
val availableDescription = localFixActions.joinToString { it.name }
|
val availableDescription = allLocalFixActions.joinToString { it.name }
|
||||||
|
|
||||||
val fixDescription = localFixTextString?.let { "with specified text '$localFixTextString'"} ?: ""
|
val fixDescription = localFixTextString?.let { "with specified text '$localFixTextString'"} ?: ""
|
||||||
TestCase.assertTrue("No fix action $fixDescription\n" +
|
TestCase.assertTrue("No fix action $fixDescription\n" +
|
||||||
|
|||||||
Reference in New Issue
Block a user