diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/format/propertyVar.kt | 1 | ||||
-rw-r--r-- | test/data/format/propertyVar.md | 12 | ||||
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 6 | ||||
-rw-r--r-- | test/src/model/PropertyTest.kt | 3 |
4 files changed, 21 insertions, 1 deletions
diff --git a/test/data/format/propertyVar.kt b/test/data/format/propertyVar.kt new file mode 100644 index 00000000..88be1a7a --- /dev/null +++ b/test/data/format/propertyVar.kt @@ -0,0 +1 @@ +var x = 1
\ No newline at end of file diff --git a/test/data/format/propertyVar.md b/test/data/format/propertyVar.md new file mode 100644 index 00000000..6b14fca3 --- /dev/null +++ b/test/data/format/propertyVar.md @@ -0,0 +1,12 @@ +[test](out.md) / [](out.md) / [x](out.md) + + +# x + + +``` +var x: Int +``` + + + diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index 580acd7c..293b9cb2 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -69,4 +69,10 @@ public class MarkdownFormatTest { } } + + Test fun propertyVar() { + verifyOutput("test/data/format/propertyVar.kt", ".md") { model, output -> + markdownService.appendNodes(tempLocation, output, model.members.single().members) + } + } } diff --git a/test/src/model/PropertyTest.kt b/test/src/model/PropertyTest.kt index 14c43f78..d6de84bb 100644 --- a/test/src/model/PropertyTest.kt +++ b/test/src/model/PropertyTest.kt @@ -57,11 +57,12 @@ public class PropertyTest { assertEquals("property", name) assertEquals(DocumentationNode.Kind.Property, kind) assertEquals(Content.Empty, content) - assertEquals(3, details.count()) + assertEquals(4, details.count()) assertEquals("String", detail(DocumentationNode.Kind.Type).name) val modifiers = details(DocumentationNode.Kind.Modifier).map { it.name } assertTrue("final" in modifiers) assertTrue("internal" in modifiers) + assertTrue("var" in modifiers) assertTrue(links.none()) assertEquals(2, members.count()) |