diff options
author | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-12 17:38:16 +0400 |
---|---|---|
committer | Ilya Ryzhenkov <orangy@jetbrains.com> | 2014-07-12 17:38:16 +0400 |
commit | a77f01b4308945e44d05e7e05dc242512e5132eb (patch) | |
tree | fdb131cfb0005844df95b0765285e5cbdc1ca614 /test/src/model/FunctionTest.kt | |
parent | 1da7b0d28cc101c58e58b4ba00a7ed5890df34f5 (diff) | |
download | dokka-a77f01b4308945e44d05e7e05dc242512e5132eb.tar.gz dokka-a77f01b4308945e44d05e7e05dc242512e5132eb.tar.bz2 dokka-a77f01b4308945e44d05e7e05dc242512e5132eb.zip |
Process Modality (final, open, abstract) and Visibility (public, protected, internal, private)
Diffstat (limited to 'test/src/model/FunctionTest.kt')
-rw-r--r-- | test/src/model/FunctionTest.kt | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index e501d3c0..331c59ba 100644 --- a/test/src/model/FunctionTest.kt +++ b/test/src/model/FunctionTest.kt @@ -11,7 +11,7 @@ public class FunctionTest { assertEquals("fn", name) assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("Function fn", doc.summary) - assertEquals("Unit", details.single().name) + assertEquals("Unit", detail(DocumentationNode.Kind.Type).name) assertTrue(members.none()) assertTrue(links.none()) } @@ -26,8 +26,10 @@ public class FunctionTest { assertEquals("Function with receiver", doc.summary) assertEquals("Unit", details.elementAt(0).name) - assertEquals(2, details.count()) - with(details.elementAt(1)) { + assertEquals(4, details.count()) + assertEquals("final", details.elementAt(1).name) + assertEquals("internal", details.elementAt(2).name) + with(details.elementAt(3)) { assertEquals("<this>", name) assertEquals(DocumentationNode.Kind.Receiver, kind) assertEquals(DocumentationContent.Empty, doc) @@ -48,9 +50,11 @@ public class FunctionTest { assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("generic function", doc.summary) - assertEquals(2, details.count()) + assertEquals(4, details.count()) assertEquals("Unit", details.elementAt(0).name) - with(details.elementAt(1)) { + assertEquals("final", details.elementAt(1).name) + assertEquals("private", details.elementAt(2).name) + with(details.elementAt(3)) { assertEquals("T", name) assertEquals(DocumentationNode.Kind.TypeParameter, kind) assertEquals(DocumentationContent.Empty, doc) @@ -71,9 +75,11 @@ public class FunctionTest { assertEquals(DocumentationNode.Kind.Function, kind) assertEquals("generic function", doc.summary) - assertEquals(3, details.count()) + assertEquals(5, details.count()) assertEquals("Unit", details.elementAt(0).name) - with(details.elementAt(1)) { + assertEquals("final", details.elementAt(1).name) + assertEquals("public", details.elementAt(2).name) + with(details.elementAt(3)) { assertEquals("T", name) assertEquals(DocumentationNode.Kind.TypeParameter, kind) assertEquals(DocumentationContent.Empty, doc) @@ -88,7 +94,7 @@ public class FunctionTest { assertTrue(members.none()) assertTrue(links.none()) } - with(details.elementAt(2)) { + with(details.elementAt(4)) { assertEquals("R", name) assertEquals(DocumentationNode.Kind.TypeParameter, kind) assertEquals(DocumentationContent.Empty, doc) @@ -112,9 +118,11 @@ Function Documentation""" , doc.summary) - assertEquals(2, details.count()) + assertEquals(4, details.count()) assertEquals("Unit", details.elementAt(0).name) - with(details.elementAt(1)) { + assertEquals("final", details.elementAt(1).name) + assertEquals("internal", details.elementAt(2).name) + with(details.elementAt(3)) { assertEquals("x", name) assertEquals(DocumentationNode.Kind.Parameter, kind) assertEquals("parameter", doc.summary) |