plugin fixes: incorrect reformatting on }, incorrect parsing of class minidocs
This commit is contained in:
1 parent
1d9befe101
commit
9e138367ef
4 files changed
+73
-6
No files matched your search
@@ -115,6 +115,23 @@ class MiniAstTest {
|
||||
assertNotNull(vd.initRange)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun miniAst_captures_class_doc_with_members() = runTest {
|
||||
val code = """
|
||||
/** Class C docs */
|
||||
class C {
|
||||
fun foo() {}
|
||||
}
|
||||
"""
|
||||
val (_, sink) = compileWithMini(code)
|
||||
val mini = sink.build()
|
||||
assertNotNull(mini)
|
||||
val cd = mini!!.declarations.filterIsInstance<MiniClassDecl>().firstOrNull { it.name == "C" }
|
||||
assertNotNull(cd)
|
||||
assertNotNull(cd.doc, "Class doc should be preserved even with members")
|
||||
assertTrue(cd.doc!!.raw.contains("Class C docs"))
|
||||
}
|
||||
|
||||
@Test
|
||||
fun miniAst_captures_class_bases_and_doc() = runTest {
|
||||
val code = """
|
||||
|
||||
Reference in new issue
Block a user