diff options
Diffstat (limited to 'plugins/base/src/test/kotlin/expect/AbstractExpectTest.kt')
-rw-r--r-- | plugins/base/src/test/kotlin/expect/AbstractExpectTest.kt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/base/src/test/kotlin/expect/AbstractExpectTest.kt b/plugins/base/src/test/kotlin/expect/AbstractExpectTest.kt index 1d86f219..29905035 100644 --- a/plugins/base/src/test/kotlin/expect/AbstractExpectTest.kt +++ b/plugins/base/src/test/kotlin/expect/AbstractExpectTest.kt @@ -1,11 +1,12 @@ package expect import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest -import org.junit.jupiter.api.Assertions.assertTrue import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths import java.util.concurrent.TimeUnit +import kotlin.test.assertEquals +import kotlin.test.assertTrue abstract class AbstractExpectTest( val testDir: Path? = Paths.get("src/test", "resources", "expect"), @@ -40,9 +41,9 @@ abstract class AbstractExpectTest( ).also { logger.info("git diff command: ${it.command().joinToString(" ")}") } .also { it.redirectErrorStream() }.start() - assertTrue(gitCompare.waitFor(gitTimeout, TimeUnit.MILLISECONDS)) { "Git timed out after $gitTimeout" } + assertTrue(gitCompare.waitFor(gitTimeout, TimeUnit.MILLISECONDS), "Git timed out after $gitTimeout") gitCompare.inputStream.bufferedReader().lines().forEach { logger.info(it) } - assertTrue(gitCompare.exitValue() == 0) { "${path.fileName}: outputs don't match" } + assertEquals(0, gitCompare.exitValue(), "${path.fileName}: outputs don't match") } ?: throw AssertionError("obtained path is null") } @@ -54,7 +55,7 @@ abstract class AbstractExpectTest( ) { obtained?.let { _ -> val (res, out, err) = runDiff(expected, obtained, excludes, timeout) - assertTrue(res == 0, "Outputs differ:\nstdout - $out\n\nstderr - ${err ?: ""}") + assertEquals(0, res, "Outputs differ:\nstdout - $out\n\nstderr - ${err ?: ""}") } ?: throw AssertionError("obtained path is null") } |