diff options
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) + } + } + } + } } |