aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/kotlin/model
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/test/kotlin/model')
-rw-r--r--core/src/test/kotlin/model/CompositeSourceSetIDTest.kt6
-rw-r--r--core/src/test/kotlin/model/DisplaySourceSetTest.kt10
2 files changed, 9 insertions, 7 deletions
diff --git a/core/src/test/kotlin/model/CompositeSourceSetIDTest.kt b/core/src/test/kotlin/model/CompositeSourceSetIDTest.kt
index 472581e7..aa5a801d 100644
--- a/core/src/test/kotlin/model/CompositeSourceSetIDTest.kt
+++ b/core/src/test/kotlin/model/CompositeSourceSetIDTest.kt
@@ -2,7 +2,6 @@ package model
import org.jetbrains.dokka.DokkaSourceSetID
import org.jetbrains.dokka.model.CompositeSourceSetID
-import org.jetbrains.dokka.model.plus
import kotlin.test.*
class CompositeSourceSetIDTest {
@@ -65,4 +64,9 @@ class CompositeSourceSetIDTest {
"Expected all three source sets being merged in order"
)
}
+
+ operator fun DokkaSourceSetID.plus(other: DokkaSourceSetID): CompositeSourceSetID {
+ return CompositeSourceSetID(listOf(this, other))
+ }
+
}
diff --git a/core/src/test/kotlin/model/DisplaySourceSetTest.kt b/core/src/test/kotlin/model/DisplaySourceSetTest.kt
index adabdbdb..04ad07d6 100644
--- a/core/src/test/kotlin/model/DisplaySourceSetTest.kt
+++ b/core/src/test/kotlin/model/DisplaySourceSetTest.kt
@@ -2,9 +2,7 @@ package model
import org.jetbrains.dokka.DokkaSourceSetID
import org.jetbrains.dokka.Platform
-import org.jetbrains.dokka.model.CompositeSourceSetID
-import org.jetbrains.dokka.model.DisplaySourceSet
-import org.jetbrains.dokka.model.sourceSetIDs
+import org.jetbrains.dokka.model.*
import kotlin.test.Test
import kotlin.test.assertFalse
import kotlin.test.assertTrue
@@ -44,17 +42,17 @@ class DisplaySourceSetTest {
)
assertFalse(
- DokkaSourceSetID("m3", "s3") in listOf(contentSourceSet).sourceSetIDs,
+ DokkaSourceSetID("m3", "s3") in listOf(contentSourceSet).computeSourceSetIds(),
"Expected source set id not being contained in content source set"
)
assertTrue(
- DokkaSourceSetID("m1", "s1") in listOf(contentSourceSet).sourceSetIDs,
+ DokkaSourceSetID("m1", "s1") in listOf(contentSourceSet).computeSourceSetIds(),
"Expected source set id being contained in content source set"
)
assertTrue(
- DokkaSourceSetID("m1+m2", "s1+s2") in listOf(contentSourceSet).sourceSetIDs,
+ DokkaSourceSetID("m1+m2", "s1+s2") in listOf(contentSourceSet).computeSourceSetIds(),
"Expected merged source set being contained in content source set"
)
}