Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vmishenev committed Jun 6, 2022
1 parent b210387 commit a8285e4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
Expand Up @@ -9,6 +9,7 @@ import utils.A
import utils.Span
import utils.TestOutputWriterPlugin
import utils.match
import java.lang.IllegalStateException

class FunctionalTypeConstructorsSignatureTest : BaseAbstractTest() {
private val configuration = dokkaConfiguration {
Expand All @@ -24,6 +25,19 @@ class FunctionalTypeConstructorsSignatureTest : BaseAbstractTest() {
}
}

private val jvmConfiguration = dokkaConfiguration {
sourceSets {
sourceSet {
sourceRoots = listOf("src/")
classpath = listOf(jvmStdlibPath ?: throw IllegalStateException("JVM stdlib is not found"))
externalDocumentationLinks = listOf(
stdlibExternalDocumentationLink,
DokkaConfiguration.ExternalDocumentationLink.Companion.jdk(8)
)
}
}
}

fun source(signature: String) =
"""
|/src/main/kotlin/test/Test.kt
Expand Down Expand Up @@ -282,7 +296,7 @@ class FunctionalTypeConstructorsSignatureTest : BaseAbstractTest() {

testInline(
source,
configuration,
jvmConfiguration,
pluginOverrides = listOf(writerPlugin)
) {
renderingStage = { _, _ ->
Expand Down
3 changes: 2 additions & 1 deletion plugins/base/src/test/kotlin/signatures/SignatureTest.kt
Expand Up @@ -4,14 +4,15 @@ import org.jetbrains.dokka.DokkaSourceSetID
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
import org.junit.jupiter.api.Test
import utils.*
import java.lang.IllegalStateException
import kotlin.test.assertFalse

class SignatureTest : BaseAbstractTest() {
private val configuration = dokkaConfiguration {
sourceSets {
sourceSet {
sourceRoots = listOf("src/")
classpath = listOf(commonStdlibPath!!)
classpath = listOf(commonStdlibPath ?: throw IllegalStateException("Common stdlib is not found"), jvmStdlibPath ?: throw IllegalStateException("JVM stdlib is not found"))
externalDocumentationLinks = listOf(stdlibExternalDocumentationLink)
}
}
Expand Down

0 comments on commit a8285e4

Please sign in to comment.