aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-04-08 17:08:38 +0200
committerBarkingBad <32793002+BarkingBad@users.noreply.github.com>2020-04-22 10:37:59 +0200
commit8ee246fe89011506d8456c48c5dfc04d92ef88cf (patch)
tree36370fe7a015bbdcecf1d2e02729f900967a8245
parenta5557f43c004d34026807d2d25b39fe1144bae94 (diff)
downloaddokka-8ee246fe89011506d8456c48c5dfc04d92ef88cf.tar.gz
dokka-8ee246fe89011506d8456c48c5dfc04d92ef88cf.tar.bz2
dokka-8ee246fe89011506d8456c48c5dfc04d92ef88cf.zip
Fix test
-rw-r--r--core/src/main/kotlin/model/Documentable.kt9
-rw-r--r--plugins/base/src/test/kotlin/enums/EnumsTest.kt5
2 files changed, 6 insertions, 8 deletions
diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt
index 2155b00d..f3eb6b9a 100644
--- a/core/src/main/kotlin/model/Documentable.kt
+++ b/core/src/main/kotlin/model/Documentable.kt
@@ -7,7 +7,6 @@ import org.jetbrains.dokka.model.properties.PropertyContainer
import org.jetbrains.dokka.model.properties.WithExtraProperties
import org.jetbrains.dokka.pages.PlatformData
import org.jetbrains.kotlin.descriptors.DeclarationDescriptor
-import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor
import org.jetbrains.kotlin.load.kotlin.toSourceElement
abstract class Documentable {
@@ -423,10 +422,10 @@ interface DocumentableSource {
val path: String
}
-class DescriptorDocumentableSource(source: DeclarationDescriptor) : DocumentableSource {
- override val path = source.toSourceElement.containingFile.toString()
+class DescriptorDocumentableSource(val descriptor: DeclarationDescriptor) : DocumentableSource {
+ override val path = descriptor.toSourceElement.containingFile.toString()
}
-class PsiDocumentableSource(source: PsiNamedElement) : DocumentableSource {
- override val path = source.containingFile.virtualFile.path
+class PsiDocumentableSource(val psi: PsiNamedElement) : DocumentableSource {
+ override val path = psi.containingFile.virtualFile.path
}
diff --git a/plugins/base/src/test/kotlin/enums/EnumsTest.kt b/plugins/base/src/test/kotlin/enums/EnumsTest.kt
index e765d203..5f8bf8c8 100644
--- a/plugins/base/src/test/kotlin/enums/EnumsTest.kt
+++ b/plugins/base/src/test/kotlin/enums/EnumsTest.kt
@@ -63,9 +63,8 @@ class EnumsTest : AbstractCoreTest() {
""".trimMargin(),
configuration
) {
- documentablesCreationStage = {m ->
- assertTrue(m.isNotEmpty(), "Module list cannot be empty")
- m.first().packages.let { p ->
+ documentablesTransformationStage = { m ->
+ m.packages.let { p ->
assertTrue(p.isNotEmpty(), "Package list cannot be empty")
p.first().classlikes.let { c ->
assertTrue(c.isNotEmpty(), "Classlikes list cannot be empty")