diff options
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/format/MarkdownFormatTest.kt | 12 | ||||
-rw-r--r-- | test/src/model/CommentTest.kt | 55 |
2 files changed, 26 insertions, 41 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..98585b18 100644 --- a/test/src/model/CommentTest.kt +++ b/test/src/model/CommentTest.kt @@ -67,32 +67,22 @@ 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("one", label) + assertEquals(1, content.sections.count()) + with (content.findSectionByTag("one")!!) { + assertEquals("One", tag) assertEquals("", toTestString()) } } } } - 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("one", label) + assertEquals(1, content.sections.count()) + with (content.findSectionByTag("one")!!) { + assertEquals("One", tag) assertEquals("section one", toTestString()) } } @@ -103,13 +93,13 @@ 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("one", label) + assertEquals(2, content.sections.count()) + with (content.findSectionByTag("one")!!) { + assertEquals("One", tag) assertEquals("section one", toTestString()) } - with (content.sections["two"]!!) { - assertEquals("two", label) + with (content.findSectionByTag("two")!!) { + assertEquals("Two", tag) assertEquals("section two", toTestString()) } } @@ -120,9 +110,9 @@ 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("one", label) + assertEquals(1, content.sections.count()) + with (content.findSectionByTag("one")!!) { + assertEquals("One", tag) 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) |