Add test cases for FQ-name parsing in IC

This commit is contained in:
Alexey Tsvetkov
2018-04-23 00:52:50 +03:00
parent 01b40d4d02
commit 2b4aa74c0b
@@ -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
fun testMultipleClasses() {
doTest(