UAST Kotlin: make super type lookup test robust

Newly added directive IGNORE_FIR bothers lookup for object "O".
This commit is contained in:
Jinseong Jeon
2021-05-02 02:26:17 -07:00
committed by Ilya Kirillov
parent 03d4cb0dfa
commit dad198cb67
@@ -315,8 +315,8 @@ class KotlinUastApiTest : AbstractKotlinUastTest() {
@Test
fun testSuperTypes() {
doTest("SuperCalls") { _, file ->
file.checkUastSuperTypes("B", listOf("A"))
file.checkUastSuperTypes("O", listOf("A"))
file.checkUastSuperTypes("class B", listOf("A"))
file.checkUastSuperTypes("object O", listOf("A"))
file.checkUastSuperTypes("InnerClass", listOf("A"))
file.checkUastSuperTypes("object : A(\"textForAnon\")", listOf("A"))
}
@@ -725,4 +725,4 @@ class KotlinUastApiTest : AbstractKotlinUastTest() {
fun <T, R> Iterable<T>.assertedFind(value: R, transform: (T) -> R): T =
find { transform(it) == value } ?: throw AssertionError("'$value' not found, only ${this.joinToString { transform(it).toString() }}")
fun runAll(vararg asserts: () -> Unit) = RunAll(*asserts.map { ThrowableRunnable<Throwable>(it) }.toTypedArray()).run()
fun runAll(vararg asserts: () -> Unit) = RunAll(*asserts.map { ThrowableRunnable<Throwable>(it) }.toTypedArray()).run()