aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-06-12 12:44:48 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-06-15 13:15:30 +0200
commit4c9952dbfa2d9b304b10d6d3e43e2424e69fdfe8 (patch)
treee361f1e0874f4ff3eb008143604d75c52d882d32
parentc804fab6e15ce7974453388afbdeed1cae33ea83 (diff)
downloaddokka-4c9952dbfa2d9b304b10d6d3e43e2424e69fdfe8.tar.gz
dokka-4c9952dbfa2d9b304b10d6d3e43e2424e69fdfe8.tar.bz2
dokka-4c9952dbfa2d9b304b10d6d3e43e2424e69fdfe8.zip
Fix tests
-rw-r--r--core/src/test/kotlin/model/DocumentableTest.kt14
-rw-r--r--plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt1
-rw-r--r--plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt14
-rw-r--r--plugins/base/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt14
-rw-r--r--testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt4
5 files changed, 24 insertions, 23 deletions
diff --git a/core/src/test/kotlin/model/DocumentableTest.kt b/core/src/test/kotlin/model/DocumentableTest.kt
index e3031a50..a801d549 100644
--- a/core/src/test/kotlin/model/DocumentableTest.kt
+++ b/core/src/test/kotlin/model/DocumentableTest.kt
@@ -24,7 +24,7 @@ class DocumentableTest {
modifier = emptyMap(),
properties = emptyList(),
sources = emptyMap(),
- sourceSets = emptyList(),
+ sourceSets = emptySet(),
supertypes = emptyMap(),
functions = listOf(
DFunction(
@@ -37,7 +37,7 @@ class DocumentableTest {
generics = emptyList(),
modifier = emptyMap(),
sources = emptyMap(),
- sourceSets = emptyList(),
+ sourceSets = emptySet(),
type = Void,
receiver = null,
isConstructor = false,
@@ -48,7 +48,7 @@ class DocumentableTest {
documentation = emptyMap(),
expectPresentInSet = null,
extra = PropertyContainer.empty(),
- sourceSets = emptyList(),
+ sourceSets = emptySet(),
type = Void
),
DParameter(
@@ -57,7 +57,7 @@ class DocumentableTest {
documentation = emptyMap(),
expectPresentInSet = null,
extra = PropertyContainer.empty(),
- sourceSets = emptyList(),
+ sourceSets = emptySet(),
type = Void
)
)
@@ -72,7 +72,7 @@ class DocumentableTest {
generics = emptyList(),
modifier = emptyMap(),
sources = emptyMap(),
- sourceSets = emptyList(),
+ sourceSets = emptySet(),
type = Void,
receiver = null,
isConstructor = false,
@@ -83,7 +83,7 @@ class DocumentableTest {
documentation = emptyMap(),
expectPresentInSet = null,
extra = PropertyContainer.empty(),
- sourceSets = emptyList(),
+ sourceSets = emptySet(),
type = Void
),
DParameter(
@@ -92,7 +92,7 @@ class DocumentableTest {
documentation = emptyMap(),
expectPresentInSet = null,
extra = PropertyContainer.empty(),
- sourceSets = emptyList(),
+ sourceSets = emptySet(),
type = Void
)
)
diff --git a/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt b/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt
index b96b5b46..05c408ab 100644
--- a/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt
+++ b/plugins/base/src/test/kotlin/content/signatures/SkippingParenthesisForConstructorsTest.kt
@@ -12,7 +12,6 @@ class ConstructorsSignaturesTest : AbstractCoreTest() {
pass {
sourceRoots = listOf("src/")
analysisPlatform = "jvm"
- targets = listOf("jvm")
}
}
}
diff --git a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt
index d49ec8a5..c2596ba3 100644
--- a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt
+++ b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt
@@ -30,7 +30,7 @@ class LinkableContentTest : AbstractCoreTest() {
sourceRoots = listOf("jsMain", "commonMain", "jvmAndJsSecondCommonMain").map {
Paths.get("$testDataDir/$it/kotlin").toString()
}
- sourceSetName = "js"
+ sourceSetID = "js"
includes = listOf(Paths.get("$includesDir/include2.md").toString())
}
pass {
@@ -39,7 +39,7 @@ class LinkableContentTest : AbstractCoreTest() {
sourceRoots = listOf("jvmMain", "commonMain", "jvmAndJsSecondCommonMain").map {
Paths.get("$testDataDir/$it/kotlin").toString()
}
- sourceSetName = "jvm"
+ sourceSetID = "jvm"
includes = listOf(Paths.get("$includesDir/include1.md").toString())
}
}
@@ -74,7 +74,7 @@ class LinkableContentTest : AbstractCoreTest() {
lineSuffix = "#L"
)
)
- sourceSetName = "js"
+ sourceSetID = "js"
}
pass {
moduleName = "example"
@@ -87,7 +87,7 @@ class LinkableContentTest : AbstractCoreTest() {
lineSuffix = "#L"
)
)
- sourceSetName = "jvm"
+ sourceSetID = "jvm"
}
}
}
@@ -130,14 +130,14 @@ class LinkableContentTest : AbstractCoreTest() {
moduleName = "example"
analysisPlatform = "js"
sourceRoots = listOf("$testDataDir/jsMain/kotlin")
- sourceSetName = "js"
+ sourceSetID = "js"
samples = listOf("$testDataDir/jsMain/resources/Samples.kt")
}
pass {
moduleName = "example"
analysisPlatform = "jvm"
sourceRoots = listOf("$testDataDir/jvmMain/kotlin")
- sourceSetName = "jvm"
+ sourceSetID = "jvm"
samples = listOf("$testDataDir/jvmMain/resources/Samples.kt")
}
}
@@ -193,7 +193,7 @@ class LinkableContentTest : AbstractCoreTest() {
pass {
sourceRoots = listOf("src/")
analysisPlatform = "jvm"
- sourceSetName = "js"
+ sourceSetID = "js"
}
}
}
diff --git a/plugins/base/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt b/plugins/base/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt
index 9b6c50da..f05abb1a 100644
--- a/plugins/base/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt
+++ b/plugins/base/src/test/kotlin/transformers/ReportUndocumentedTransformerTest.kt
@@ -458,16 +458,17 @@ class ReportUndocumentedTransformerTest : AbstractCoreTest() {
pass {
reportUndocumented = true
analysisPlatform = Platform.common.toString()
- sourceSetName = "commonMain"
+ sourceSetID = "commonMain"
+ displayName = "commonMain"
sourceRoots = listOf("src/commonMain/kotlin")
}
pass {
reportUndocumented = true
analysisPlatform = Platform.jvm.toString()
- sourceSetName = "jvmMain"
+ sourceSetID = "jvmMain"
+ displayName = "jvmMain"
sourceRoots = listOf("src/jvmMain/kotlin")
- dependentSourceRoots = listOf("src/commonMain/kotlin")
dependentSourceSets = listOf("commonMain")
}
}
@@ -500,16 +501,17 @@ class ReportUndocumentedTransformerTest : AbstractCoreTest() {
pass {
reportUndocumented = true
analysisPlatform = Platform.common.toString()
- sourceSetName = "commonMain"
+ sourceSetID = "commonMain"
+ displayName = "commonMain"
sourceRoots = listOf("src/commonMain/kotlin")
}
pass {
reportUndocumented = true
analysisPlatform = Platform.jvm.toString()
- sourceSetName = "jvmMain"
+ sourceSetID = "jvmMain"
+ displayName = "jvmMain"
sourceRoots = listOf("src/jvmMain/kotlin")
- dependentSourceRoots = listOf("src/commonMain/kotlin")
dependentSourceSets = listOf("commonMain")
}
}
diff --git a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
index 3aec2909..edfc9049 100644
--- a/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
+++ b/testApi/src/main/kotlin/testApi/testRunner/TestRunner.kt
@@ -169,7 +169,7 @@ abstract class AbstractCoreTest {
@DokkaConfigurationDsl
protected class DokkaPassConfigurationBuilder(
var moduleName: String = "root",
- var sourceSetName: String = "main",
+ var sourceSetID: String = "main",
var displayName: String = "JVM",
var classpath: List<String> = emptyList(),
var sourceRoots: List<String> = emptyList(),
@@ -195,7 +195,7 @@ abstract class AbstractCoreTest {
fun build() = PassConfigurationImpl(
moduleName = moduleName,
displayName = displayName,
- sourceSetID = sourceSetName,
+ sourceSetID = sourceSetID,
classpath = classpath,
sourceRoots = sourceRoots.map { SourceRootImpl(it) },
dependentSourceSets = dependentSourceSets,