diff options
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 12 | ||||
-rw-r--r-- | test/src/model/CommentTest.kt | 45 |
2 files changed, 21 insertions, 36 deletions
diff --git a/test/src/format/MarkdownFormatTest.kt b/test/src/format/MarkdownFormatTest.kt index efde3139..77c03ed2 100644 --- a/test/src/format/MarkdownFormatTest.kt +++ b/test/src/format/MarkdownFormatTest.kt @@ -92,4 +92,16 @@ public class MarkdownFormatTest { markdownService.appendNodes(tempLocation, output, listOf(propertyNode.members[1])) } } + + Test fun paramTag() { + verifyOutput("test/data/format/paramTag.kt", ".md") { model, output -> + markdownService.appendNodes(tempLocation, output, model.members.single().members) + } + } + + Test fun throwsTag() { + verifyOutput("test/data/format/throwsTag.kt", ".md") { model, output -> + markdownService.appendNodes(tempLocation, output, model.members.single().members) + } + } } diff --git a/test/src/model/CommentTest.kt b/test/src/model/CommentTest.kt index 828deaa4..353336d6 100644 --- a/test/src/model/CommentTest.kt +++ b/test/src/model/CommentTest.kt @@ -67,8 +67,8 @@ public class CommentTest { verifyModel("test/data/comments/emptySection.kt") { model -> with(model.members.single().members.single()) { assertEquals("Summary", content.summary.toTestString()) - assertEquals(2, content.sections.count()) - with (content.sections["one"]!!) { + assertEquals(1, content.sections.count()) + with (content.findSectionByName("one")!!) { assertEquals("one", label) assertEquals("", toTestString()) } @@ -76,22 +76,12 @@ public class CommentTest { } } - Test fun explicitSummary() { - verifyModel("test/data/comments/explicitSummary.kt") { model -> - with(model.members.single().members.single()) { - assertEquals("Summary", content.summary.toTestString()) - assertEquals("Description", content.description.toTestString()) - assertEquals(2, content.sections.count()) - } - } - } - Test fun section1() { verifyModel("test/data/comments/section1.kt") { model -> with(model.members.single().members.single()) { assertEquals("Summary", content.summary.toTestString()) - assertEquals(2, content.sections.count()) - with (content.sections["one"]!!) { + assertEquals(1, content.sections.count()) + with (content.findSectionByName("one")!!) { assertEquals("one", label) assertEquals("section one", toTestString()) } @@ -103,12 +93,12 @@ public class CommentTest { verifyModel("test/data/comments/section2.kt") { model -> with(model.members.single().members.single()) { assertEquals("Summary", content.summary.toTestString()) - assertEquals(3, content.sections.count()) - with (content.sections["one"]!!) { + assertEquals(2, content.sections.count()) + with (content.findSectionByName("one")!!) { assertEquals("one", label) assertEquals("section one", toTestString()) } - with (content.sections["two"]!!) { + with (content.findSectionByName("two")!!) { assertEquals("two", label) assertEquals("section two", toTestString()) } @@ -120,8 +110,8 @@ public class CommentTest { verifyModel("test/data/comments/multilineSection.kt") { model -> with(model.members.single().members.single()) { assertEquals("Summary", content.summary.toTestString()) - assertEquals(2, content.sections.count()) - with (content.sections["one"]!!) { + assertEquals(1, content.sections.count()) + with (content.findSectionByName("one")!!) { assertEquals("one", label) assertEquals("""line one line two""", toTestString()) @@ -130,43 +120,26 @@ line two""", toTestString()) } } - Test fun sectionWithBracedLabel() { - verifyModel("test/data/comments/sectionWithBracedLabel.kt") { model -> - with(model.members.single().members.single()) { - assertEquals("Summary", content.summary.toTestString()) - assertEquals(2, content.sections.count()) - with (content.sections["this.label.is.really.long"]!!) { - assertEquals("this.label.is.really.long", label) - assertEquals("section one", toTestString()) - } - } - } - } - Test fun directive() { verifyModel("test/data/comments/directive.kt") { model -> with(model.members.single().members.first()) { assertEquals("Summary", content.summary.toTestString()) - assertEquals(2, content.sections.count()) with (content.description) { assertEqualsIgnoringSeparators("""[code] if (true) { println(property) } [/code] - [code] if (true) { println(property) } [/code] - [code] if (true) { println(property) } [/code] - [code] if (true) { println(property) |