Test minor: output all available fixes in local inspection tests

This commit is contained in:
Mikhail Glukhikh
2017-12-26 17:55:36 +03:00
parent 2f987f08fa
commit 1534488dd1
@@ -155,12 +155,12 @@ abstract class AbstractLocalInspectionTest : KotlinLightCodeInsightFixtureTestCa
problemDescriptors.all { it.highlightType.toString() == highlightExpectedString })
}
val localFixActions = problemDescriptors.flatMap { problem ->
val allLocalFixActions = problemDescriptors.flatMap { problem ->
val fixes = problem.fixes
fixes?.toList() ?: emptyList()
}.filter { fix -> localFixTextString == null || fix.name == localFixTextString }
val availableDescription = localFixActions.joinToString { it.name }
}
val localFixActions = allLocalFixActions.filter { fix -> localFixTextString == null || fix.name == localFixTextString }
val availableDescription = allLocalFixActions.joinToString { it.name }
val fixDescription = localFixTextString?.let { "with specified text '$localFixTextString'"} ?: ""
TestCase.assertTrue("No fix action $fixDescription\n" +