aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/kotlin/enums/EnumsTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/kotlin/enums/EnumsTest.kt')
-rw-r--r--core/src/test/kotlin/enums/EnumsTest.kt45
1 files changed, 0 insertions, 45 deletions
diff --git a/core/src/test/kotlin/enums/EnumsTest.kt b/core/src/test/kotlin/enums/EnumsTest.kt
deleted file mode 100644
index efc46595..00000000
--- a/core/src/test/kotlin/enums/EnumsTest.kt
+++ /dev/null
@@ -1,45 +0,0 @@
-package enums
-
-import org.jetbrains.dokka.pages.ClasslikePageNode
-import org.jetbrains.dokka.pages.ModulePageNode
-import org.junit.Test
-import testApi.testRunner.AbstractCoreTest
-
-class EnumsTest : AbstractCoreTest() {
-
- @Test
- fun basicEnums() {
- val configuration = dokkaConfiguration {
- passes {
- pass {
- sourceRoots = listOf("src/")
- }
- }
- }
-
- testInline(
- """
- |/src/main/kotlin/basic/Test.kt
- |package enums
- |
- |enum class Test {
- | E1,
- | E2
- |}
- """.trimMargin(),
- configuration
- ) {
- pagesGenerationStage = {
- val map = it.getClasslikeToMemberMap()
- val test = map.filterKeys { it.name == "Test" }.values.firstOrNull()
- assert(test != null) { "Test not found" }
- assert(test!!.any { it.name == "E1" } && test.any { it.name == "E2" }) { "Enum entries missing in parent" }
- assert(map.keys.any { it.name == "E1" } && map.keys.any { it.name == "E2" }) { "Enum entries missing" }
- }
- }
- }
-
-
- fun ModulePageNode.getClasslikeToMemberMap() =
- this.parentMap.filterValues { it is ClasslikePageNode }.entries.groupBy({ it.value }) { it.key }
-} \ No newline at end of file