diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/src/TestAPI.kt | 1 | ||||
-rw-r--r-- | test/src/model/KotlinAsJavaTest.kt | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/src/TestAPI.kt b/test/src/TestAPI.kt index c4be6623..4a0e4fb4 100644 --- a/test/src/TestAPI.kt +++ b/test/src/TestAPI.kt @@ -133,6 +133,7 @@ fun StringBuilder.appendNode(node: ContentNode): StringBuilder { is ContentBlock -> { appendChildren(node) } + is ContentEmpty -> { /* nothing */ } else -> throw IllegalStateException("Don't know how to format node $node") } return this diff --git a/test/src/model/KotlinAsJavaTest.kt b/test/src/model/KotlinAsJavaTest.kt index 25ee5fad..0b609a2b 100644 --- a/test/src/model/KotlinAsJavaTest.kt +++ b/test/src/model/KotlinAsJavaTest.kt @@ -19,6 +19,15 @@ class KotlinAsJavaTest { assertEquals(DocumentationNode.Kind.CompanionObjectFunction, fn.kind) } } + + @Test fun propertyWithComment() { + verifyModelAsJava("test/data/comments/oneLineDoc.kt") { model -> + val facadeClass = model.members.single().members.single { it.name == "OneLineDocKt" } + val getter = facadeClass.members.single { it.name == "getProperty" } + assertEquals(DocumentationNode.Kind.CompanionObjectFunction, getter.kind) + assertEquals("doc", getter.content.summary.toTestString()) + } + } } fun verifyModelAsJava(source: String, |