aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDmitry Jemerov <intelliyole@gmail.com>2015-01-13 17:32:39 +0100
committerDmitry Jemerov <intelliyole@gmail.com>2015-01-13 17:32:39 +0100
commitcd21e1fea43c0b7fa8013e3db7f49fe2b600b7f8 (patch)
tree80ceae612c0ac3874fabdeef9230575ebc8ef1f2 /test
parentec6fcb4f0a00c66c410c2735af58bb0c5275f9a9 (diff)
parent6d23430e9ebc6866d9c41523a1364cc9616e1222 (diff)
downloaddokka-cd21e1fea43c0b7fa8013e3db7f49fe2b600b7f8.tar.gz
dokka-cd21e1fea43c0b7fa8013e3db7f49fe2b600b7f8.tar.bz2
dokka-cd21e1fea43c0b7fa8013e3db7f49fe2b600b7f8.zip
Merge pull request #13 from orangy/not-open
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)
+ }
+ }
+ }
}