aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/utils
diff options
context:
space:
mode:
authorAndrzej Ratajczak <andrzej.ratajczak98@gmail.com>2020-04-06 15:58:55 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-04-22 13:10:48 +0200
commit720c50fb7f4bf4ae4b4d4c406cfb958a7fba8ffb (patch)
tree10869d6dcbd5af8599b2091fc6581ce6b16a47d5 /plugins/base/src/test/kotlin/utils
parent58126c324c30fff4f65fef7cc72aa715364ef358 (diff)
downloaddokka-720c50fb7f4bf4ae4b4d4c406cfb958a7fba8ffb.tar.gz
dokka-720c50fb7f4bf4ae4b4d4c406cfb958a7fba8ffb.tar.bz2
dokka-720c50fb7f4bf4ae4b4d4c406cfb958a7fba8ffb.zip
Adds asynchronous rendering
Diffstat (limited to 'plugins/base/src/test/kotlin/utils')
-rw-r--r--plugins/base/src/test/kotlin/utils/TestOutputWriter.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/base/src/test/kotlin/utils/TestOutputWriter.kt b/plugins/base/src/test/kotlin/utils/TestOutputWriter.kt
index e2250a26..607d3ced 100644
--- a/plugins/base/src/test/kotlin/utils/TestOutputWriter.kt
+++ b/plugins/base/src/test/kotlin/utils/TestOutputWriter.kt
@@ -16,12 +16,12 @@ class TestOutputWriter(private val failOnOverwrite: Boolean = true): OutputWrite
private val _contents = mutableMapOf<String, String>()
- override fun write(path: String, text: String, ext: String) {
+ override suspend fun write(path: String, text: String, ext: String) {
val fullPath = "$path$ext"
_contents.putIfAbsent(fullPath, text)?.also {
if (failOnOverwrite) throw AssertionError("File $fullPath is being overwritten.")
}
}
- override fun writeResources(pathFrom: String, pathTo: String) = write(pathTo, "*** content of $pathFrom ***", "")
+ override suspend fun writeResources(pathFrom: String, pathTo: String) = write(pathTo, "*** content of $pathFrom ***", "")
}