From 720c50fb7f4bf4ae4b4d4c406cfb958a7fba8ffb Mon Sep 17 00:00:00 2001 From: Andrzej Ratajczak Date: Mon, 6 Apr 2020 15:58:55 +0200 Subject: Adds asynchronous rendering --- plugins/base/src/test/kotlin/utils/TestOutputWriter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/base/src/test/kotlin/utils') 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() - 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 ***", "") } -- cgit