FIR IDE: handle . after package name in completion tests
This commit is contained in:
committed by
TeamCityServer
parent
4785f36d8d
commit
a926a1f534
+12
-1
@@ -64,7 +64,18 @@ object ExpectedCompletionUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun matches(expectedProposal: CompletionProposal): Boolean = expectedProposal.map.entries.none { it.value != map[it.key] }
|
fun matches(expectedProposal: CompletionProposal): Boolean {
|
||||||
|
return expectedProposal.map.entries.none { expected ->
|
||||||
|
val actualValues = when (expected.key) {
|
||||||
|
"lookupString" -> {
|
||||||
|
// FIR IDE adds `.` after package names in completion
|
||||||
|
listOf(map[expected.key]?.removeSuffix("."), map[expected.key])
|
||||||
|
}
|
||||||
|
else -> listOf(map[expected.key])
|
||||||
|
}
|
||||||
|
expected.value !in actualValues
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
val jsonObject = JsonObject()
|
val jsonObject = JsonObject()
|
||||||
|
|||||||
Reference in New Issue
Block a user