[inlay tests] removed psi dump, added more logging

This commit is contained in:
Yaroslav Lepenkin
2017-01-26 18:44:10 +03:00
parent 6e1b659f29
commit 78ed389448
3 changed files with 7 additions and 3 deletions
@@ -91,7 +91,13 @@ object JavaInlayHintsProvider {
private fun createUnclearInlays(args: List<CallArgumentInfo>): List<InlayInfo> {
return args
.filter { isUnclearExpression(it.argument) }
.mapNotNull { createInlayInfo(it.argument, it.parameter) }
.mapNotNull {
val inlayInfo = createInlayInfo(it.argument, it.parameter)
if (ParameterHintsPassFactory.isDebug()) {
println("Hint for ${it.argument} : ${inlayInfo?.text}")
}
inlayInfo
}
}
private fun getVarArgInlay(info: CallInfo): InlayInfo? {
@@ -67,7 +67,6 @@ abstract class InlayParameterHintsTest : LightCodeInsightFixtureTestCase() {
assertThat(actualInlays.size)
.withFailMessage("Expected ${expectedInlays.size} elements with hints, Actual elements count ${actualInlays.size}" +
", file text: \n\n ${file.text} \n\n isCommitted ${isCommitted(file)} \n\n" +
"Psi: \n ${DebugUtil.psiToString(file, true)}\n" +
"All inlays: ${actualInlays}")
.isEqualTo(expectedInlays.size)
@@ -58,7 +58,6 @@ public class ParameterHintsPassFactory extends AbstractProjectComponent implemen
isDebug = value;
}
@TestOnly
public static boolean isDebug() {
return isDebug;
}