mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
more verbose test diagnostics
GitOrigin-RevId: 41ea26d38c68238bcc2890a4d511aaadbdb92108
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b05b2ce42a
commit
ecf22d34c8
@@ -94,6 +94,6 @@ public class EmptyIntentionInspectionQuickFixTest extends LightQuickFixTestCase
|
||||
return;
|
||||
}
|
||||
}
|
||||
fail("Missed inspection setting action");
|
||||
fail("Missing EditInspectionToolsSettingsAction; all emptyActions="+emptyActions);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ abstract class AbstractLocalInspectionTest : KotlinLightCodeInsightFixtureTestCa
|
||||
|
||||
val fixDescription = localFixTextString?.let { "with specified text '$localFixTextString'" } ?: ""
|
||||
if (localFixTextString != "none") {
|
||||
assertTrue("Fix $fixDescription not found among ${allLocalFixActions.size} actions available:\n $availableDescription",
|
||||
assertTrue("Fix '$fixDescription' not found among ${allLocalFixActions.size} actions available:\n $availableDescription",
|
||||
localFixActions.isNotEmpty()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -146,18 +146,19 @@ object DirectiveBasedActionUtils {
|
||||
actionsToExclude,
|
||||
) { expectedActionsDirectives, actualActionsDirectives ->
|
||||
if (expectedActionsDirectives != actualActionsDirectives) {
|
||||
val actual = fileText.let { text ->
|
||||
val lines = text.split('\n')
|
||||
val firstActionIndex = lines.indexOfFirst { it.startsWith(ACTION_DIRECTIVE) }.takeIf { it != -1 }
|
||||
val textWithoutActions = lines.filterNot { it.startsWith(ACTION_DIRECTIVE) }
|
||||
textWithoutActions.subList(0, firstActionIndex ?: 1)
|
||||
.plus(actualActionsDirectives)
|
||||
.plus(textWithoutActions.drop(firstActionIndex ?: 1))
|
||||
.joinToString("\n")
|
||||
}
|
||||
assertEqualsToFile(
|
||||
description = "Some unexpected actions available at current position. Use '$ACTION_DIRECTIVE' directive",
|
||||
description = "Some unexpected actions available at current position. Use '$ACTION_DIRECTIVE' directive in $file",
|
||||
expected = file,
|
||||
actual = fileText.let { text ->
|
||||
val lines = text.split('\n')
|
||||
val firstActionIndex = lines.indexOfFirst { it.startsWith(ACTION_DIRECTIVE) }.takeIf { it != -1 }
|
||||
val textWithoutActions = lines.filterNot { it.startsWith(ACTION_DIRECTIVE) }
|
||||
textWithoutActions.subList(0, firstActionIndex ?: 1)
|
||||
.plus(actualActionsDirectives)
|
||||
.plus(textWithoutActions.drop(firstActionIndex ?: 1))
|
||||
.joinToString("\n")
|
||||
}
|
||||
actual = actual
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user