aboutsummaryrefslogtreecommitdiff
path: root/integration-tests/src/main/kotlin/org/jetbrains/dokka
diff options
context:
space:
mode:
Diffstat (limited to 'integration-tests/src/main/kotlin/org/jetbrains/dokka')
-rw-r--r--integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt12
-rw-r--r--integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt6
-rw-r--r--integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt9
-rw-r--r--integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt8
4 files changed, 18 insertions, 17 deletions
diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt
index 6a20ca20..ec96ac01 100644
--- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt
+++ b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/AbstractIntegrationTest.kt
@@ -13,19 +13,19 @@ import kotlin.test.assertFalse
import kotlin.test.assertNotNull
import kotlin.test.assertTrue
-abstract class AbstractIntegrationTest {
+public abstract class AbstractIntegrationTest {
@field:TempDir
- lateinit var tempFolder: File
+ public lateinit var tempFolder: File
- val projectDir get() = File(tempFolder, "project")
+ public val projectDir: File get() = File(tempFolder, "project")
- fun File.allDescendentsWithExtension(extension: String): Sequence<File> =
+ public fun File.allDescendentsWithExtension(extension: String): Sequence<File> =
this.walkTopDown().filter { it.isFile && it.extension == extension }
- fun File.allHtmlFiles(): Sequence<File> = allDescendentsWithExtension("html")
+ public fun File.allHtmlFiles(): Sequence<File> = allDescendentsWithExtension("html")
- fun File.allGfmFiles(): Sequence<File> = allDescendentsWithExtension("md")
+ public fun File.allGfmFiles(): Sequence<File> = allDescendentsWithExtension("md")
protected fun assertContainsNoErrorClass(file: File) {
val fileText = file.readText()
diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt
index 87bd3e94..681c9d53 100644
--- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt
+++ b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/TestOutputCopier.kt
@@ -7,11 +7,11 @@ package org.jetbrains.dokka.it
import java.io.File
import kotlin.test.AfterTest
-interface TestOutputCopier {
- val projectOutputLocation: File
+public interface TestOutputCopier {
+ public val projectOutputLocation: File
@AfterTest
- fun copyToLocation() {
+ public fun copyToLocation() {
System.getenv("DOKKA_TEST_OUTPUT_PATH")?.also { location ->
println("Copying to ${File(location).absolutePath}")
projectOutputLocation.copyRecursively(File(location))
diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt
index dbacde83..b4c63330 100644
--- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt
+++ b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/gitSubmoduleUtils.kt
@@ -9,13 +9,14 @@ import org.eclipse.jgit.storage.file.FileRepositoryBuilder
import java.io.File
import java.nio.file.Path
-fun AbstractIntegrationTest.copyAndApplyGitDiff(diffFile: File) =
+public fun AbstractIntegrationTest.copyAndApplyGitDiff(diffFile: File) {
copyGitDiffFileToParent(diffFile).let(::applyGitDiffFromFile)
+}
-fun AbstractIntegrationTest.copyGitDiffFileToParent(originalDiffFile: File) =
+public fun AbstractIntegrationTest.copyGitDiffFileToParent(originalDiffFile: File): File =
originalDiffFile.copyTo(File(projectDir.parent, originalDiffFile.name))
-fun AbstractIntegrationTest.applyGitDiffFromFile(diffFile: File) {
+public fun AbstractIntegrationTest.applyGitDiffFromFile(diffFile: File) {
val projectGitFile = projectDir.resolve(".git")
val git = if (projectGitFile.exists()) {
if (projectGitFile.isFile) {
@@ -38,7 +39,7 @@ fun AbstractIntegrationTest.applyGitDiffFromFile(diffFile: File) {
private fun removeGitFile(repository: Path) =
repository.toFile()
.listFiles().orEmpty()
- .filter { it.name.lowercase() == ".git" }
+ .filter { it.name.toLowerCase() == ".git" }
.forEach { it.delete() }
diff --git a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt
index c72856b5..06b8b1e3 100644
--- a/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt
+++ b/integration-tests/src/main/kotlin/org/jetbrains/dokka/it/processUtils.kt
@@ -9,12 +9,12 @@ import kotlinx.coroutines.async
import kotlinx.coroutines.runBlocking
import kotlin.concurrent.thread
-class ProcessResult(
- val exitCode: Int,
- val output: String
+public class ProcessResult(
+ public val exitCode: Int,
+ public val output: String
)
-fun Process.awaitProcessResult() = runBlocking {
+public fun Process.awaitProcessResult(): ProcessResult = runBlocking {
val exitCode = async { awaitExitCode() }
val output = async { awaitOutput() }
ProcessResult(