[Analysis API] fix "KotlinIllegalStateExceptionWithAttachments: expected as maximum one expect for the actual"
^KT-61597 fixed
This commit is contained in:
committed by
Space Team
parent
f39153b6e6
commit
56910b70a3
+6
-3
@@ -24,13 +24,16 @@ abstract class AbstractExpectForActualTest : AbstractAnalysisApiBasedTest() {
|
||||
|
||||
val expectedSymbolText: String? = executeOnPooledThreadInReadAction {
|
||||
analyseForTest(declaration) {
|
||||
val expectedSymbol = declaration.getSymbol().getExpectForActual() ?: return@analyseForTest null
|
||||
expectedSymbol.psi?.containingFile?.name + " : " + expectedSymbol.render()
|
||||
val expectedSymbols = declaration.getSymbol().getExpectsForActual()
|
||||
expectedSymbols.joinToString(separator = "\n") { expectedSymbol ->
|
||||
expectedSymbol.psi?.containingFile?.name + " : " + expectedSymbol.render()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val actual = buildString {
|
||||
appendLine("expected symbol: $expectedSymbolText")
|
||||
appendLine("expected symbols:")
|
||||
appendLine(expectedSymbolText)
|
||||
}
|
||||
|
||||
testServices.assertions.assertEqualsToTestDataFileSibling(actual)
|
||||
|
||||
Reference in New Issue
Block a user