From 6d1e25756c3e8c43ce4d5721e7665f439a19e47c Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Wed, 8 Jul 2020 10:33:26 +0200 Subject: Move common base test utils to submodule --- plugins/gfm/src/main/kotlin/GfmPlugin.kt | 8 ++++---- plugins/gfm/src/test/kotlin/renderers/gfm/DivergentTest.kt | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/gfm/src') diff --git a/plugins/gfm/src/main/kotlin/GfmPlugin.kt b/plugins/gfm/src/main/kotlin/GfmPlugin.kt index 671b87f8..df9d032f 100644 --- a/plugins/gfm/src/main/kotlin/GfmPlugin.kt +++ b/plugins/gfm/src/main/kotlin/GfmPlugin.kt @@ -149,7 +149,7 @@ open class CommonmarkRenderer( platforms.joinToString( prefix = " [", postfix = "] $text " - ) { it.sourceSetID.toString() }) + ) { "${it.moduleDisplayName}/${it.displayName}" }) buildNewLine() } } @@ -166,7 +166,7 @@ open class CommonmarkRenderer( ) { if (node.dci.kind == ContentKind.Sample || node.dci.kind == ContentKind.Parameters) { node.sourceSets.forEach { sourcesetData -> - append(sourcesetData.sourceSetID.toString()) + append("${sourcesetData.moduleDisplayName}/${sourcesetData.displayName}") buildNewLine() buildTable( node.copy( @@ -251,7 +251,7 @@ open class CommonmarkRenderer( distinct.values.forEach { entry -> val (instance, sourceSets) = entry.getInstanceAndSourceSets() - append(sourceSets.joinToString(prefix = "#### [", postfix = "]") { it.sourceSetID.toString() }) + append(sourceSets.joinToString(prefix = "#### [", postfix = "]") { "${it.moduleDisplayName}/${it.displayName}" }) buildNewLine() instance.before?.let { append("##### Brief description") @@ -266,7 +266,7 @@ open class CommonmarkRenderer( .values.forEach { innerEntry -> val (innerInstance, innerSourceSets) = innerEntry.getInstanceAndSourceSets() if(sourceSets.size > 1) { - append(innerSourceSets.joinToString(prefix = "###### [", postfix = "]") { it.sourceSetID.toString() }) + append(innerSourceSets.joinToString(prefix = "###### [", postfix = "]") { "${it.moduleDisplayName}/${it.displayName}" }) buildNewLine() } innerInstance.divergent.build(this@buildDivergent, pageContext) diff --git a/plugins/gfm/src/test/kotlin/renderers/gfm/DivergentTest.kt b/plugins/gfm/src/test/kotlin/renderers/gfm/DivergentTest.kt index 035a9264..634f427a 100644 --- a/plugins/gfm/src/test/kotlin/renderers/gfm/DivergentTest.kt +++ b/plugins/gfm/src/test/kotlin/renderers/gfm/DivergentTest.kt @@ -13,21 +13,21 @@ import renderers.TestPage class DivergentTest : GfmRenderingOnlyTestBase() { private val js = defaultSourceSet.copy( "root", - "JS", + "js", DokkaSourceSetID("root", "js"), analysisPlatform = Platform.js, sourceRoots = listOf(SourceRootImpl("pl1")) ) private val jvm = defaultSourceSet.copy( "root", - "JVM", + "jvm", DokkaSourceSetID("root", "jvm"), analysisPlatform = Platform.jvm, sourceRoots = listOf(SourceRootImpl("pl1")) ) private val native = defaultSourceSet.copy( "root", - "NATIVE", + "native", DokkaSourceSetID("root", "native"), analysisPlatform = Platform.native, sourceRoots = listOf(SourceRootImpl("pl1")) -- cgit