aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-02-16 14:11:57 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-02-16 14:11:57 +0100
commit3e3a4af652358214815ea28e094d6f4d2554bde8 (patch)
tree4695c9f077c018a161679c50ed8752246060da18 /test
parent6d5d88b88039799f19ecc4be74deb6a775bb462d (diff)
downloaddokka-3e3a4af652358214815ea28e094d6f4d2554bde8.tar.gz
dokka-3e3a4af652358214815ea28e094d6f4d2554bde8.tar.bz2
dokka-3e3a4af652358214815ea28e094d6f4d2554bde8.zip
represent static methods as class object functions
Diffstat (limited to 'test')
-rw-r--r--test/data/java/staticMethod.java6
-rw-r--r--test/src/model/JavaTest.kt7
2 files changed, 13 insertions, 0 deletions
diff --git a/test/data/java/staticMethod.java b/test/data/java/staticMethod.java
new file mode 100644
index 00000000..2bbbbf1b
--- /dev/null
+++ b/test/data/java/staticMethod.java
@@ -0,0 +1,6 @@
+package test;
+
+class C {
+ public static void foo() {
+ }
+}
diff --git a/test/src/model/JavaTest.kt b/test/src/model/JavaTest.kt
index 15efa90b..2e055d65 100644
--- a/test/src/model/JavaTest.kt
+++ b/test/src/model/JavaTest.kt
@@ -133,4 +133,11 @@ public class JavaTest {
assertFalse("var" in s.details(DocumentationNode.Kind.Modifier).map { it.name })
}
}
+
+ Test fun staticMethod() {
+ verifyPackageMember("test/data/java/staticMethod.java") { cls ->
+ val m = cls.members(DocumentationNode.Kind.ClassObjectFunction).single { it.name == "foo" }
+ assertFalse("static" in m.details(DocumentationNode.Kind.Modifier).map { it.name })
+ }
+ }
}