aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/data/classes/sealedClass.kt1
-rw-r--r--test/src/model/ClassTest.kt7
2 files changed, 8 insertions, 0 deletions
diff --git a/test/data/classes/sealedClass.kt b/test/data/classes/sealedClass.kt
new file mode 100644
index 00000000..93350393
--- /dev/null
+++ b/test/data/classes/sealedClass.kt
@@ -0,0 +1 @@
+sealed class Foo() {}
diff --git a/test/src/model/ClassTest.kt b/test/src/model/ClassTest.kt
index bcedf49c..8c3adb7f 100644
--- a/test/src/model/ClassTest.kt
+++ b/test/src/model/ClassTest.kt
@@ -169,6 +169,13 @@ public class ClassTest {
}
}
+ @Test fun sealedClass() {
+ verifyPackageMember("test/data/classes/sealedClass.kt") { cls ->
+ val modifiers = cls.details(DocumentationNode.Kind.Modifier).map { it.name }
+ assertEquals(1, modifiers.count { it == "sealed" })
+ }
+ }
+
Test fun annotatedClassWithAnnotationParameters() {
verifyModel("test/data/classes/annotatedClassWithAnnotationParameters.kt") { model ->
with(model.members.single().members.single()) {