aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt42
1 files changed, 24 insertions, 18 deletions
diff --git a/plugins/base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt b/plugins/base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt
index 13431bd2..e386f95c 100644
--- a/plugins/base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt
+++ b/plugins/base/src/test/kotlin/pageMerger/PageNodeMergerTest.kt
@@ -4,11 +4,11 @@ import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
import org.jetbrains.dokka.model.dfs
import org.jetbrains.dokka.model.withDescendants
import org.jetbrains.dokka.pages.*
-import org.junit.jupiter.api.Assertions.assertTrue
-import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.RepeatedTest
-import org.junit.jupiter.api.Test
+import kotlin.test.Ignore
+import kotlin.test.Test
import kotlin.test.assertEquals
+import kotlin.test.assertTrue
class PageNodeMergerTest : BaseAbstractTest() {
@@ -42,16 +42,16 @@ class PageNodeMergerTest : BaseAbstractTest() {
val testT = allChildren.filter { it.name == "testT" }
val test = allChildren.filter { it.name == "test" }
- assertTrue(testT.size == 1) { "There can be only one testT page" }
- assertTrue(testT.first().dri.size == 2) { "testT page should have 2 DRI, but has ${testT.first().dri.size}" }
+ assertTrue(testT.size == 1, "There can be only one testT page")
+ assertTrue(testT.first().dri.size == 2, "testT page should have 2 DRI, but has ${testT.first().dri.size}")
- assertTrue(test.size == 1) { "There can be only one test page" }
- assertTrue(test.first().dri.size == 2) { "test page should have 2 DRI, but has ${test.first().dri.size}" }
+ assertTrue(test.size == 1, "There can be only one test page")
+ assertTrue(test.first().dri.size == 2, "test page should have 2 DRI, but has ${test.first().dri.size}")
}
}
}
- @Disabled("TODO: reenable when we have infrastructure for turning off extensions")
+ @Ignore("TODO: reenable when we have infrastructure for turning off extensions")
@Test
fun defaultStrategyTest() {
val strList: MutableList<String> = mutableListOf()
@@ -76,13 +76,13 @@ class PageNodeMergerTest : BaseAbstractTest() {
val testT = allChildren.filter { it.name == "testT" }
val test = allChildren.filter { it.name == "test" }
- assertTrue(testT.size == 1) { "There can be only one testT page" }
- assertTrue(testT.first().dri.size == 1) { "testT page should have single DRI, but has ${testT.first().dri.size}" }
+ assertTrue(testT.size == 1, "There can be only one testT page")
+ assertTrue(testT.first().dri.size == 1, "testT page should have single DRI, but has ${testT.first().dri.size}")
- assertTrue(test.size == 1) { "There can be only one test page" }
- assertTrue(test.first().dri.size == 1) { "test page should have single DRI, but has ${test.first().dri.size}" }
+ assertTrue(test.size == 1, "There can be only one test page")
+ assertTrue(test.first().dri.size == 1, "test page should have single DRI, but has ${test.first().dri.size}")
- assertTrue(strList.count() == 2) { "Expected 2 warnings, got ${strList.count()}" }
+ assertTrue(strList.count() == 2, "Expected 2 warnings, got ${strList.count()}")
}
}
}
@@ -142,13 +142,19 @@ class PageNodeMergerTest : BaseAbstractTest() {
val jvmClass = allChildren.filter { it.name == "[jvm]DoNotMerge" }
val jsClass = allChildren.filter { it.name == "[js]DoNotMerge" }
val noClass = allChildren.filter { it.name == "DoNotMerge" }
- assertTrue(jvmClass.size == 1) { "There can be only one DoNotMerge(jvm) page" }
- assertTrue(jvmClass.first().documentables.firstOrNull()?.sourceSets?.single()?.analysisPlatform?.key == "jvm") { "[jvm]DoNotMerge should have only jvm sources" }
+ assertTrue(jvmClass.size == 1, "There can be only one DoNotMerge(jvm) page")
+ assertTrue(
+ jvmClass.first().documentables.firstOrNull()?.sourceSets?.single()?.analysisPlatform?.key == "jvm",
+ "[jvm]DoNotMerge should have only jvm sources"
+ )
- assertTrue(jsClass.size == 1) { "There can be only one DoNotMerge(js) page" }
- assertTrue(jsClass.first().documentables.firstOrNull()?.sourceSets?.single()?.analysisPlatform?.key == "js") { "[js]DoNotMerge should have only js sources" }
+ assertTrue(jsClass.size == 1, "There can be only one DoNotMerge(js) page")
+ assertTrue(
+ jsClass.first().documentables.firstOrNull()?.sourceSets?.single()?.analysisPlatform?.key == "js",
+ "[js]DoNotMerge should have only js sources"
+ )
- assertTrue(noClass.isEmpty()) { "There can't be any DoNotMerge page" }
+ assertTrue(noClass.isEmpty(), "There can't be any DoNotMerge page")
}
}
}