aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2015-01-13 17:15:52 +0100
committerDmitry Jemerov <yole@jetbrains.com>2015-01-13 17:15:52 +0100
commit6d23430e9ebc6866d9c41523a1364cc9616e1222 (patch)
tree80ceae612c0ac3874fabdeef9230575ebc8ef1f2 /test
parentec6fcb4f0a00c66c410c2735af58bb0c5275f9a9 (diff)
downloaddokka-6d23430e9ebc6866d9c41523a1364cc9616e1222.tar.gz
dokka-6d23430e9ebc6866d9c41523a1364cc9616e1222.tar.bz2
dokka-6d23430e9ebc6866d9c41523a1364cc9616e1222.zip
don't show methods as open if their containing class is final
Diffstat (limited to 'test')
-rw-r--r--test/data/classes/notOpenClass.kt7
-rw-r--r--test/src/model/ClassTest.kt10
2 files changed, 17 insertions, 0 deletions
diff --git a/test/data/classes/notOpenClass.kt b/test/data/classes/notOpenClass.kt
new file mode 100644
index 00000000..edee2c1a
--- /dev/null
+++ b/test/data/classes/notOpenClass.kt
@@ -0,0 +1,7 @@
+open class C() {
+ open fun f() {}
+}
+
+class D() : C() {
+ override fun f() {}
+}
diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt
index f21c5c57..61bc68bd 100644
--- a/test/src/model/ClassTest.kt
+++ b/test/src/model/ClassTest.kt
@@ -222,4 +222,14 @@ public class ClassTest {
}
}
}
+
+ Test fun notOpenClass() {
+ verifyModel("test/data/classes/notOpenClass.kt") { model ->
+ with(model.members.single().members.first { it.name == "D"}.members.first { it.name == "f" }) {
+ val modifiers = details(DocumentationNode.Kind.Modifier)
+ assertEquals(2, modifiers.size())
+ assertEquals("final", modifiers[1].name)
+ }
+ }
+ }
}