From dad198cb6713e766c715b0ef6bef06e6cd06c3bf Mon Sep 17 00:00:00 2001 From: Jinseong Jeon Date: Sun, 2 May 2021 02:26:17 -0700 Subject: [PATCH] UAST Kotlin: make super type lookup test robust Newly added directive IGNORE_FIR bothers lookup for object "O". --- plugins/uast-kotlin/tests/KotlinUastApiTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/uast-kotlin/tests/KotlinUastApiTest.kt b/plugins/uast-kotlin/tests/KotlinUastApiTest.kt index d466db80105..d31dcc69ab7 100644 --- a/plugins/uast-kotlin/tests/KotlinUastApiTest.kt +++ b/plugins/uast-kotlin/tests/KotlinUastApiTest.kt @@ -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 Iterable.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(it) }.toTypedArray()).run() \ No newline at end of file +fun runAll(vararg asserts: () -> Unit) = RunAll(*asserts.map { ThrowableRunnable(it) }.toTypedArray()).run()