Add test cases for FQ-name parsing in IC
This commit is contained in:
+50
@@ -39,6 +39,56 @@ class ClassesFqNamesTest : KtUsefulTestCase() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testComplexPackage() {
|
||||||
|
doTest(
|
||||||
|
setOf("foo.bar.юникод.Foo"),
|
||||||
|
"""
|
||||||
|
// package simpleComment
|
||||||
|
package foo . bar . `юникод`
|
||||||
|
/*
|
||||||
|
package multiLineComment
|
||||||
|
*/
|
||||||
|
|
||||||
|
class Foo""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testDifferentTypeOfClasses() {
|
||||||
|
doTest(
|
||||||
|
setOf("test.C", "test.I", "test.O", "test.E", "test.A"),
|
||||||
|
"""
|
||||||
|
package test
|
||||||
|
|
||||||
|
class C
|
||||||
|
interface I
|
||||||
|
object O
|
||||||
|
enum class E
|
||||||
|
annotation class A
|
||||||
|
typealias T""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun testLocalClass() {
|
||||||
|
doTest(
|
||||||
|
setOf("test.Foo"),
|
||||||
|
"""
|
||||||
|
package test
|
||||||
|
|
||||||
|
fun f() {
|
||||||
|
class Fizz
|
||||||
|
}
|
||||||
|
|
||||||
|
class Foo {
|
||||||
|
fun m() {
|
||||||
|
class Buzz
|
||||||
|
}
|
||||||
|
}""".trimIndent()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testMultipleClasses() {
|
fun testMultipleClasses() {
|
||||||
doTest(
|
doTest(
|
||||||
|
|||||||
Reference in New Issue
Block a user