diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/comments/emptySection.kt | 2 | ||||
-rw-r--r-- | test/data/comments/emptySectionOnOneLine.kt | 2 | ||||
-rw-r--r-- | test/data/comments/multilineSection.kt | 2 | ||||
-rw-r--r-- | test/data/comments/section1.kt | 2 | ||||
-rw-r--r-- | test/data/comments/section2.kt | 4 | ||||
-rw-r--r-- | test/data/comments/sectionOnOneLine.kt | 2 | ||||
-rw-r--r-- | test/data/comments/sectionWithBracedLabel.kt | 2 | ||||
-rw-r--r-- | test/src/model/CommentTest.kt | 49 | ||||
-rw-r--r-- | test/src/model/FunctionTest.kt | 14 |
9 files changed, 40 insertions, 39 deletions
diff --git a/test/data/comments/emptySection.kt b/test/data/comments/emptySection.kt index 0e618b2a..7112c578 100644 --- a/test/data/comments/emptySection.kt +++ b/test/data/comments/emptySection.kt @@ -1,6 +1,6 @@ /** * Summary - * $one + * $one: */ val property = "test"
\ No newline at end of file diff --git a/test/data/comments/emptySectionOnOneLine.kt b/test/data/comments/emptySectionOnOneLine.kt index 4bb6c6f6..b0d5defd 100644 --- a/test/data/comments/emptySectionOnOneLine.kt +++ b/test/data/comments/emptySectionOnOneLine.kt @@ -1,2 +1,2 @@ -/** Summary $one*/ +/** Summary $one:*/ val property = "test"
\ No newline at end of file diff --git a/test/data/comments/multilineSection.kt b/test/data/comments/multilineSection.kt index be83b641..514348cd 100644 --- a/test/data/comments/multilineSection.kt +++ b/test/data/comments/multilineSection.kt @@ -1,6 +1,6 @@ /** * Summary - * $one + * $one: * line one * line two */ diff --git a/test/data/comments/section1.kt b/test/data/comments/section1.kt index 0a27d394..e4c9adf4 100644 --- a/test/data/comments/section1.kt +++ b/test/data/comments/section1.kt @@ -1,5 +1,5 @@ /** * Summary - * $one section one + * $one: section one */ val property = "test"
\ No newline at end of file diff --git a/test/data/comments/section2.kt b/test/data/comments/section2.kt index a34aa853..e0a35551 100644 --- a/test/data/comments/section2.kt +++ b/test/data/comments/section2.kt @@ -1,6 +1,6 @@ /** * Summary - * $one section one - * $two section two + * $one: section one + * $two: section two */ val property = "test"
\ No newline at end of file diff --git a/test/data/comments/sectionOnOneLine.kt b/test/data/comments/sectionOnOneLine.kt index cab5c69c..8bd3dd64 100644 --- a/test/data/comments/sectionOnOneLine.kt +++ b/test/data/comments/sectionOnOneLine.kt @@ -1,2 +1,2 @@ -/** Summary $one same line */ +/** Summary $one: same line */ val property = "test"
\ No newline at end of file diff --git a/test/data/comments/sectionWithBracedLabel.kt b/test/data/comments/sectionWithBracedLabel.kt index 306917ec..aa8dbfe6 100644 --- a/test/data/comments/sectionWithBracedLabel.kt +++ b/test/data/comments/sectionWithBracedLabel.kt @@ -1,5 +1,5 @@ /** * Summary - * ${this.label.is.really.long} section one + * ${this.label.is.really.long}: section one */ val property = "test"
\ No newline at end of file diff --git a/test/src/model/CommentTest.kt b/test/src/model/CommentTest.kt index 6b976db9..7f56f688 100644 --- a/test/src/model/CommentTest.kt +++ b/test/src/model/CommentTest.kt @@ -24,8 +24,8 @@ public class CommentTest { Test fun multilineDoc() { verifyModel("test/data/comments/multilineDoc.kt") { model -> with(model.members.single().members.single()) { - assertEquals("doc1", doc.summary) - assertEquals("doc2\ndoc3", doc.description) + assertEquals("doc1".toRichString(), doc.summary) + assertEquals("doc2\ndoc3".toRichString(), doc.description) } } } @@ -33,8 +33,8 @@ public class CommentTest { Test fun multipleDocs() { verifyModel("test/data/comments/multipleDocs.kt") { model -> with(model.members.single().members.single()) { - assertEquals("doc1", doc.summary) - assertEquals("doc2\ndoc3", doc.description) + assertEquals("doc1".toRichString(), doc.summary) + assertEquals("doc2\ndoc3".toRichString(), doc.description) } } } @@ -42,8 +42,8 @@ public class CommentTest { Test fun multilineDocWithComment() { verifyModel("test/data/comments/multilineDocWithComment.kt") { model -> with(model.members.single().members.single()) { - assertEquals("doc1", doc.summary) - assertEquals("doc2\ndoc3", doc.description) + assertEquals("doc1".toRichString(), doc.summary) + assertEquals("doc2\ndoc3".toRichString(), doc.description) } } } @@ -51,7 +51,7 @@ public class CommentTest { Test fun oneLineDoc() { verifyModel("test/data/comments/oneLineDoc.kt") { model -> with(model.members.single().members.single()) { - assertEquals("doc", doc.summary) + assertEquals("doc".toRichString(), doc.summary) } } } @@ -59,7 +59,7 @@ public class CommentTest { Test fun oneLineDocWithComment() { verifyModel("test/data/comments/oneLineDocWithComment.kt") { model -> with(model.members.single().members.single()) { - assertEquals("doc", doc.summary) + assertEquals("doc".toRichString(), doc.summary) } } } @@ -67,7 +67,7 @@ public class CommentTest { Test fun oneLineDocWithEmptyLine() { verifyModel("test/data/comments/oneLineDocWithEmptyLine.kt") { model -> with(model.members.single().members.single()) { - assertEquals("doc", doc.summary) + assertEquals("doc".toRichString(), doc.summary) } } } @@ -75,11 +75,12 @@ public class CommentTest { Test fun emptySection() { verifyModel("test/data/comments/emptySection.kt") { model -> with(model.members.single().members.single()) { - assertEquals("Summary", doc.summary) + assertEquals(NormalStyle, NormalStyle) + assertEquals("Summary".toRichString(), doc.summary) assertEquals(1, doc.sections.count()) with (doc.sections.elementAt(0)) { assertEquals("one", label) - assertEquals("", text) + assertEquals(RichString.empty, text) } } } @@ -88,11 +89,11 @@ public class CommentTest { Test fun section1() { verifyModel("test/data/comments/section1.kt") { model -> with(model.members.single().members.single()) { - assertEquals("Summary", doc.summary) + assertEquals("Summary".toRichString(), doc.summary) assertEquals(1, doc.sections.count()) with (doc.sections.elementAt(0)) { assertEquals("one", label) - assertEquals("section one", text) + assertEquals("section one".toRichString(), text) } } } @@ -101,15 +102,15 @@ public class CommentTest { Test fun section2() { verifyModel("test/data/comments/section2.kt") { model -> with(model.members.single().members.single()) { - assertEquals("Summary", doc.summary) + assertEquals("Summary".toRichString(), doc.summary) assertEquals(2, doc.sections.count()) with (doc.sections.elementAt(0)) { assertEquals("one", label) - assertEquals("section one", text) + assertEquals("section one".toRichString(), text) } with (doc.sections.elementAt(1)) { assertEquals("two", label) - assertEquals("section two", text) + assertEquals("section two".toRichString(), text) } } } @@ -118,11 +119,11 @@ public class CommentTest { Test fun sectionOnOneLine() { verifyModel("test/data/comments/sectionOnOneLine.kt") { model -> with(model.members.single().members.single()) { - assertEquals("Summary", doc.summary) + assertEquals("Summary".toRichString(), doc.summary) assertEquals(1, doc.sections.count()) with (doc.sections.elementAt(0)) { assertEquals("one", label) - assertEquals("same line", text) + assertEquals("same line".toRichString(), text) } } } @@ -131,11 +132,11 @@ public class CommentTest { Test fun emptySectionOnOneLine() { verifyModel("test/data/comments/emptySectionOnOneLine.kt") { model -> with(model.members.single().members.single()) { - assertEquals("Summary", doc.summary) + assertEquals("Summary".toRichString(), doc.summary) assertEquals(1, doc.sections.count()) with (doc.sections.elementAt(0)) { assertEquals("one", label) - assertEquals("", text) + assertEquals(RichString.empty, text) } } } @@ -144,12 +145,12 @@ public class CommentTest { Test fun multilineSection() { verifyModel("test/data/comments/multilineSection.kt") { model -> with(model.members.single().members.single()) { - assertEquals("Summary", doc.summary) + assertEquals("Summary".toRichString(), doc.summary) assertEquals(1, doc.sections.count()) with (doc.sections.elementAt(0)) { assertEquals("one", label) assertEquals("""line one -line two""", text) +line two""".toRichString(), text) } } } @@ -158,11 +159,11 @@ line two""", text) Test fun sectionWithBracedLabel() { verifyModel("test/data/comments/sectionWithBracedLabel.kt") { model -> with(model.members.single().members.single()) { - assertEquals("Summary", doc.summary) + assertEquals("Summary".toRichString(), doc.summary) assertEquals(1, doc.sections.count()) with (doc.sections.elementAt(0)) { assertEquals("this.label.is.really.long", label) - assertEquals("section one", text) + assertEquals("section one".toRichString(), text) } } } diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index 19769019..f090fcd5 100644 --- a/test/src/model/FunctionTest.kt +++ b/test/src/model/FunctionTest.kt @@ -10,7 +10,7 @@ public class FunctionTest { with(model.members.single().members.single()) { assertEquals("fn", name) assertEquals(DocumentationNode.Kind.Function, kind) - assertEquals("Function fn", doc.summary) + assertEquals("Function fn".toRichString(), doc.summary) assertEquals("Unit", detail(DocumentationNode.Kind.Type).name) assertTrue(members.none()) assertTrue(links.none()) @@ -23,7 +23,7 @@ public class FunctionTest { with(model.members.single().members.single()) { assertEquals("fn", name) assertEquals(DocumentationNode.Kind.Function, kind) - assertEquals("Function with receiver", doc.summary) + assertEquals("Function with receiver".toRichString(), doc.summary) assertEquals("Unit", details.elementAt(0).name) assertEquals(4, details.count()) @@ -48,7 +48,7 @@ public class FunctionTest { with(model.members.single().members.single()) { assertEquals("generic", name) assertEquals(DocumentationNode.Kind.Function, kind) - assertEquals("generic function", doc.summary) + assertEquals("generic function".toRichString(), doc.summary) assertEquals(4, details.count()) assertEquals("Unit", details.elementAt(0).name) @@ -73,7 +73,7 @@ public class FunctionTest { with(model.members.single().members.single()) { assertEquals("generic", name) assertEquals(DocumentationNode.Kind.Function, kind) - assertEquals("generic function", doc.summary) + assertEquals("generic function".toRichString(), doc.summary) assertEquals(5, details.count()) assertEquals("Unit", details.elementAt(0).name) @@ -113,9 +113,9 @@ public class FunctionTest { with(model.members.single().members.single()) { assertEquals("function", name) assertEquals(DocumentationNode.Kind.Function, kind) - assertEquals("Multiline", doc.summary) + assertEquals("Multiline".toRichString(), doc.summary) assertEquals("""Function -Documentation""" +Documentation""".toRichString() , doc.description) assertEquals(4, details.count()) @@ -125,7 +125,7 @@ Documentation""" with(details.elementAt(3)) { assertEquals("x", name) assertEquals(DocumentationNode.Kind.Parameter, kind) - assertEquals("parameter", doc.summary) + assertEquals("parameter".toRichString(), doc.summary) assertEquals("Int", details.single().name) assertTrue(members.none()) assertTrue(links.none()) |