aboutsummaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
Diffstat (limited to 'test/src')
-rw-r--r--test/src/format/MarkdownFormatTest.kt10
-rw-r--r--test/src/model/PropertyTest.kt43
2 files changed, 5 insertions, 48 deletions
diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt
index 7e379cf9..4b207b75 100644
--- a/test/src/format/MarkdownFormatTest.kt
+++ b/test/src/format/MarkdownFormatTest.kt
@@ -83,13 +83,9 @@ public class MarkdownFormatTest {
}
Test fun accessor() {
- verifyOutput("test/data/format/accessor.kt", ".get.md") { model, output ->
- val propertyNode = model.members.single().members.first { it.name == "C" }.members.first { it.name == "x" }
- markdownService.appendNodes(tempLocation, output, listOf(propertyNode.members[0]))
- }
- verifyOutput("test/data/format/accessor.kt", ".set.md") { model, output ->
- val propertyNode = model.members.single().members.first { it.name == "C" }.members.first { it.name == "x" }
- markdownService.appendNodes(tempLocation, output, listOf(propertyNode.members[1]))
+ verifyOutput("test/data/format/accessor.kt", ".md") { model, output ->
+ val propertyNode = model.members.single().members.first { it.name == "C" }.members.filter { it.name == "x" }
+ markdownService.appendNodes(tempLocation, output, propertyNode)
}
}
diff --git a/test/src/model/PropertyTest.kt b/test/src/model/PropertyTest.kt
index 1a9ef995..93a0f681 100644
--- a/test/src/model/PropertyTest.kt
+++ b/test/src/model/PropertyTest.kt
@@ -39,14 +39,7 @@ public class PropertyTest {
assertEquals(Content.Empty, content)
assertEquals("String", detail(DocumentationNode.Kind.Type).name)
assertTrue(links.none())
- with(members.single()) {
- assertEquals("get", name)
- assertEquals(DocumentationNode.Kind.PropertyAccessor, kind)
- assertEquals(Content.Empty, content)
- assertEquals("String", detail(DocumentationNode.Kind.Type).name)
- assertTrue(links.none())
- assertTrue(members.none())
- }
+ assertTrue(members.none())
}
}
}
@@ -64,39 +57,7 @@ public class PropertyTest {
assertTrue("internal" in modifiers)
assertTrue("var" in modifiers)
assertTrue(links.none())
-
- assertEquals(2, members.count())
- with(members.elementAt(0)) {
- assertEquals("get", name)
- assertEquals(DocumentationNode.Kind.PropertyAccessor, kind)
- assertEquals(Content.Empty, content)
- val get_modifiers = details(DocumentationNode.Kind.Modifier).map { it.name }
- assertTrue("final" in get_modifiers)
- assertTrue("internal" in get_modifiers)
- assertEquals("String", detail(DocumentationNode.Kind.Type).name)
- assertTrue(links.none())
- assertTrue(members.none())
- }
- with(members.elementAt(1)) {
- assertEquals("set", name)
- assertEquals(DocumentationNode.Kind.PropertyAccessor, kind)
- assertEquals(Content.Empty, content)
- assertEquals(4, details.count())
- assertEquals("Unit", detail(DocumentationNode.Kind.Type).name)
- val set_modifiers = details(DocumentationNode.Kind.Modifier).map { it.name }
- assertTrue("final" in set_modifiers)
- assertTrue("internal" in set_modifiers)
- with(detail(DocumentationNode.Kind.Parameter)) {
- assertEquals("value", name)
- assertEquals(DocumentationNode.Kind.Parameter, kind)
- assertEquals(Content.Empty, content)
- assertEquals("String", detail(DocumentationNode.Kind.Type).name)
- assertTrue(links.none())
- assertTrue(members.none())
- }
- assertTrue(links.none())
- assertTrue(members.none())
- }
+ assertTrue(members.none())
}
}
}