diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2014-12-30 16:34:08 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2014-12-30 16:37:19 +0100 |
commit | ef51f7e2466e28db0943d528b6b489aefd098c0d (patch) | |
tree | fed7da99ea57a6cd5443d2fb40ae90c38431d800 /test/src/model | |
parent | 5f47bc17630ef1457b36054dc8b19011d9d14132 (diff) | |
download | dokka-ef51f7e2466e28db0943d528b6b489aefd098c0d.tar.gz dokka-ef51f7e2466e28db0943d528b6b489aefd098c0d.tar.bz2 dokka-ef51f7e2466e28db0943d528b6b489aefd098c0d.zip |
annotations work in progress
Diffstat (limited to 'test/src/model')
-rw-r--r-- | test/src/model/ClassTest.kt | 14 | ||||
-rw-r--r-- | test/src/model/FunctionTest.kt | 30 | ||||
-rw-r--r-- | test/src/model/PropertyTest.kt | 13 |
3 files changed, 56 insertions, 1 deletions
diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt index b95a31dc..b9be30bf 100644 --- a/test/src/model/ClassTest.kt +++ b/test/src/model/ClassTest.kt @@ -167,3 +167,17 @@ public class ClassTest { } } } + + Test fun annotatedClass() { + verifyModel("test/data/classes/annotatedClass.kt") { model -> + with(model.members.single().members.single()) { + assertEquals(1, annotations.count()) + with(annotations[0]) { + assertEquals("data", name) + assertEquals(Content.Empty, content) + assertEquals(DocumentationNode.Kind.Annotation, kind) + } + } + } + } +} diff --git a/test/src/model/FunctionTest.kt b/test/src/model/FunctionTest.kt index 2a4ad0a5..d3d7843a 100644 --- a/test/src/model/FunctionTest.kt +++ b/test/src/model/FunctionTest.kt @@ -135,4 +135,32 @@ Documentation""", content.description.toTestString()) } } } -}
\ No newline at end of file + + Test fun annotatedFunction() { + verifyModel("test/data/functions/annotatedFunction.kt") { model -> + with(model.members.single().members.single()) { + assertEquals(1, annotations.count()) + with(annotations[0]) { + assertEquals("inline", name) + assertEquals(Content.Empty, content) + assertEquals(DocumentationNode.Kind.Annotation, kind) + } + } + } + } + + Test fun functionWithAnnotatedParam() { + verifyModel("test/data/functions/functionWithAnnotatedParam.kt") { model -> + with(model.members.single().members.single()) { + with(details.elementAt(2)) { + assertEquals(1, annotations.count()) + with(annotations[0]) { + assertEquals("noinline", name) + assertEquals(Content.Empty, content) + assertEquals(DocumentationNode.Kind.Annotation, kind) + } + } + } + } + } +} diff --git a/test/src/model/PropertyTest.kt b/test/src/model/PropertyTest.kt index 103da170..0bf9714d 100644 --- a/test/src/model/PropertyTest.kt +++ b/test/src/model/PropertyTest.kt @@ -99,4 +99,17 @@ public class PropertyTest { } } } + + Test fun annotatedProperty() { + verifyModel("test/data/properties/annotatedProperty.kt") { model -> + with(model.members.single().members.single()) { + assertEquals(1, annotations.count()) + with(annotations[0]) { + assertEquals("inline", name) + assertEquals(Content.Empty, content) + assertEquals(DocumentationNode.Kind.Annotation, kind) + } + } + } + } } |