diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-09-29 20:54:59 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-09-29 20:54:59 +0400 |
commit | 778e2b3f7ff62971e18a49d81a8825e5dd894c2e (patch) | |
tree | f7fb9506800262ecabb9050ffee4a97e39812ccb /test/src/model/FunctionTest.kt | |
parent | 2e3dc238275073a5c7a2e5a14c79337d12492dad (diff) | |
download | dokka-778e2b3f7ff62971e18a49d81a8825e5dd894c2e.tar.gz dokka-778e2b3f7ff62971e18a49d81a8825e5dd894c2e.tar.bz2 dokka-778e2b3f7ff62971e18a49d81a8825e5dd894c2e.zip |
Extract content model, make doc model independent from descriptors, parse doccomments with custom parser, some tests failing due to hanging new lines.
Diffstat (limited to 'test/src/model/FunctionTest.kt')
-rw-r--r-- | test/src/model/FunctionTest.kt | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index f090fcd5..fe8b6397 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".toRichString(), doc.summary) + assertEquals("Function fn", doc.summary.toTestString()) 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".toRichString(), doc.summary) + assertEquals("Function with receiver", doc.summary.toTestString()) assertEquals("Unit", details.elementAt(0).name) assertEquals(4, details.count()) @@ -32,7 +32,7 @@ public class FunctionTest { with(details.elementAt(3)) { assertEquals("<this>", name) assertEquals(DocumentationNode.Kind.Receiver, kind) - assertEquals(DocumentationContent.Empty, doc) + assertEquals(Content.Empty, doc) assertEquals("String", details.single().name) assertTrue(members.none()) assertTrue(links.none()) @@ -48,7 +48,7 @@ public class FunctionTest { with(model.members.single().members.single()) { assertEquals("generic", name) assertEquals(DocumentationNode.Kind.Function, kind) - assertEquals("generic function".toRichString(), doc.summary) + assertEquals("generic function", doc.summary.toTestString()) assertEquals(4, details.count()) assertEquals("Unit", details.elementAt(0).name) @@ -57,7 +57,7 @@ public class FunctionTest { with(details.elementAt(3)) { assertEquals("T", name) assertEquals(DocumentationNode.Kind.TypeParameter, kind) - assertEquals(DocumentationContent.Empty, doc) + assertEquals(Content.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) @@ -73,7 +73,7 @@ public class FunctionTest { with(model.members.single().members.single()) { assertEquals("generic", name) assertEquals(DocumentationNode.Kind.Function, kind) - assertEquals("generic function".toRichString(), doc.summary) + assertEquals("generic function", doc.summary.toTestString()) assertEquals(5, details.count()) assertEquals("Unit", details.elementAt(0).name) @@ -82,11 +82,11 @@ public class FunctionTest { with(details.elementAt(3)) { assertEquals("T", name) assertEquals(DocumentationNode.Kind.TypeParameter, kind) - assertEquals(DocumentationContent.Empty, doc) + assertEquals(Content.Empty, doc) with(details.single()) { assertEquals("R", name) assertEquals(DocumentationNode.Kind.UpperBound, kind) - assertEquals(DocumentationContent.Empty, doc) + assertEquals(Content.Empty, doc) assertTrue(details.none()) assertTrue(members.none()) assertTrue(links.none()) @@ -97,7 +97,7 @@ public class FunctionTest { with(details.elementAt(4)) { assertEquals("R", name) assertEquals(DocumentationNode.Kind.TypeParameter, kind) - assertEquals(DocumentationContent.Empty, doc) + assertEquals(Content.Empty, doc) assertTrue(members.none()) assertTrue(links.none()) } @@ -113,10 +113,9 @@ public class FunctionTest { with(model.members.single().members.single()) { assertEquals("function", name) assertEquals(DocumentationNode.Kind.Function, kind) - assertEquals("Multiline".toRichString(), doc.summary) + assertEquals("Multiline", doc.summary.toTestString()) assertEquals("""Function -Documentation""".toRichString() - , doc.description) +Documentation""", doc.description.toTestString()) assertEquals(4, details.count()) assertEquals("Unit", details.elementAt(0).name) @@ -125,7 +124,7 @@ Documentation""".toRichString() with(details.elementAt(3)) { assertEquals("x", name) assertEquals(DocumentationNode.Kind.Parameter, kind) - assertEquals("parameter".toRichString(), doc.summary) + assertEquals("parameter", doc.summary.toTestString()) assertEquals("Int", details.single().name) assertTrue(members.none()) assertTrue(links.none()) |