diff options
author | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-16 14:02:10 +0100 |
---|---|---|
committer | Dmitry Jemerov <yole@jetbrains.com> | 2015-02-16 14:02:10 +0100 |
commit | 6d5d88b88039799f19ecc4be74deb6a775bb462d (patch) | |
tree | ff994a998fae0143fe90f2aa22a94a6788218826 /test/src/model | |
parent | 15e95f16eccbc3667ee86fc7ed78533f84e67ddd (diff) | |
download | dokka-6d5d88b88039799f19ecc4be74deb6a775bb462d.tar.gz dokka-6d5d88b88039799f19ecc4be74deb6a775bb462d.tar.bz2 dokka-6d5d88b88039799f19ecc4be74deb6a775bb462d.zip |
represent fields as Kotlin properties
Diffstat (limited to 'test/src/model')
-rw-r--r-- | test/src/model/JavaTest.kt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt index 3ff04b14..15efa90b 100644 --- a/test/src/model/JavaTest.kt +++ b/test/src/model/JavaTest.kt @@ -122,4 +122,15 @@ public class JavaTest { assertTrue(psiType.details(DocumentationNode.Kind.Type).isEmpty()) } } + + Test fun fields() { + verifyPackageMember("test/data/java/field.java") { cls -> + val i = cls.members(DocumentationNode.Kind.Property).single { it.name == "i" } + assertEquals("Int", i.detail(DocumentationNode.Kind.Type).name) + assertTrue("var" in i.details(DocumentationNode.Kind.Modifier).map { it.name }) + val s = cls.members(DocumentationNode.Kind.ClassObjectProperty).single { it.name == "s" } + assertEquals("String", s.detail(DocumentationNode.Kind.Type).name) + assertFalse("var" in s.details(DocumentationNode.Kind.Modifier).map { it.name }) + } + } } |