aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-08-19 04:30:52 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-08-19 13:34:10 +0200
commit6d22fac04d7a5e22379485ed62731f45f6b2d618 (patch)
tree1724ce628633d438087f25e650a4cfee03997ba8 /plugins/base/src/test/kotlin
parentc4e4343bdb8df16e49d4da118fccc076abdc928a (diff)
downloaddokka-6d22fac04d7a5e22379485ed62731f45f6b2d618.tar.gz
dokka-6d22fac04d7a5e22379485ed62731f45f6b2d618.tar.bz2
dokka-6d22fac04d7a5e22379485ed62731f45f6b2d618.zip
Fix tests after the Gradle plugin update
Diffstat (limited to 'plugins/base/src/test/kotlin')
-rw-r--r--plugins/base/src/test/kotlin/signatures/SignatureTest.kt69
1 files changed, 13 insertions, 56 deletions
diff --git a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt b/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
index 1f875a0d..f7439d67 100644
--- a/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
+++ b/plugins/base/src/test/kotlin/signatures/SignatureTest.kt
@@ -11,7 +11,7 @@ class SignatureTest : AbstractCoreTest() {
private val configuration = dokkaConfiguration {
sourceSets {
sourceSet {
- sourceRoots = listOf("src/main/kotlin/test/Test.kt")
+ sourceRoots = listOf("src/")
classpath = listOf(commonStdlibPath!!)
externalDocumentationLinks = listOf(stdlibExternalDocumentationLink)
}
@@ -178,15 +178,6 @@ class SignatureTest : AbstractCoreTest() {
@Test
fun `class with no supertype`() {
-
- val configuration = dokkaConfiguration {
- sourceSets {
- sourceSet {
- sourceRoots = listOf("src/main/kotlin/test/Test.kt")
- }
- }
- }
-
val source = source("class SimpleClass")
val writerPlugin = TestOutputWriterPlugin()
@@ -205,15 +196,6 @@ class SignatureTest : AbstractCoreTest() {
@Test
fun `class with generic supertype`() {
-
- val configuration = dokkaConfiguration {
- sourceSets {
- sourceSet {
- sourceRoots = listOf("src/main/kotlin/test/Test.kt")
- }
- }
- }
-
val source = source("class InheritingClassFromGenericType<T : Number, R : CharSequence> : Comparable<T>, Collection<R>")
val writerPlugin = TestOutputWriterPlugin()
@@ -352,12 +334,16 @@ class SignatureTest : AbstractCoreTest() {
moduleName = "test"
name = "common"
sourceRoots = listOf("src/main/kotlin/common/Test.kt")
+ classpath = listOf(commonStdlibPath!!)
+ externalDocumentationLinks = listOf(stdlibExternalDocumentationLink)
}
sourceSet {
moduleName = "test"
name = "jvm"
dependentSourceSets = setOf(DokkaSourceSetID("test", "common"))
sourceRoots = listOf("src/main/kotlin/jvm/Test.kt")
+ classpath = listOf(commonStdlibPath!!)
+ externalDocumentationLinks = listOf(stdlibExternalDocumentationLink)
}
}
}
@@ -392,16 +378,6 @@ class SignatureTest : AbstractCoreTest() {
@Test
fun `plain typealias of plain class`() {
- val configuration = dokkaConfiguration {
- sourceSets {
- sourceSet {
- moduleName = "test"
- name = "common"
- sourceRoots = listOf("src/main/kotlin/common/Test.kt")
- }
- }
- }
-
val writerPlugin = TestOutputWriterPlugin()
testInline(
@@ -416,8 +392,8 @@ class SignatureTest : AbstractCoreTest() {
pluginOverrides = listOf(writerPlugin)
) {
renderingStage = { _, _ ->
- writerPlugin.writer.renderedContent("test/example.html").signature().first().match(
- "typealias ", A("PlainTypealias"), " = ", A("Int"), Span()
+ writerPlugin.writer.renderedContent("root/example.html").signature().first().match(
+ "typealias ", Span("PlainTypealias"), " = ", A("Int"), Span()
)
}
}
@@ -426,16 +402,6 @@ class SignatureTest : AbstractCoreTest() {
@Test
fun `plain typealias of generic class`() {
- val configuration = dokkaConfiguration {
- sourceSets {
- sourceSet {
- moduleName = "test"
- name = "common"
- sourceRoots = listOf("src/main/kotlin/common/Test.kt")
- }
- }
- }
-
val writerPlugin = TestOutputWriterPlugin()
testInline(
@@ -450,8 +416,8 @@ class SignatureTest : AbstractCoreTest() {
pluginOverrides = listOf(writerPlugin)
) {
renderingStage = { _, _ ->
- writerPlugin.writer.renderedContent("test/example.html").signature().first().match(
- "typealias ", A("PlainTypealias"), " = ", A("Comparable"),
+ writerPlugin.writer.renderedContent("root/example.html").signature().first().match(
+ "typealias ", Span("PlainTypealias"), " = ", A("Comparable"),
"<", A("Int"), ">", Span()
)
}
@@ -461,15 +427,6 @@ class SignatureTest : AbstractCoreTest() {
@Test
fun `typealias with generics params`() {
- val configuration = dokkaConfiguration {
- sourceSets {
- sourceSet {
- moduleName = "test"
- name = "common"
- sourceRoots = listOf("src/main/kotlin/common/Test.kt")
- }
- }
- }
val writerPlugin = TestOutputWriterPlugin()
@@ -485,9 +442,9 @@ class SignatureTest : AbstractCoreTest() {
pluginOverrides = listOf(writerPlugin)
) {
renderingStage = { _, _ ->
- writerPlugin.writer.renderedContent("test/example.html").signature().first().match(
- "typealias ", A("GenericTypealias"), "<", A("T"), "> = ", A("Comparable"),
- "<", A("T"), ">", Span()
+ writerPlugin.writer.renderedContent("root/example.html").signature().first().match(
+ "typealias ", Span("GenericTypealias"), "<", Span("T"), "> = ", A("Comparable"),
+ "<", Span("T"), ">", Span()
)
}
}
@@ -499,4 +456,4 @@ class SignatureTest : AbstractCoreTest() {
private fun Element.signature() = select("div.symbol.monospace")
private fun Element.firstSignature() = signature().first()
-} \ No newline at end of file
+}