aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/expect
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/expect')
-rw-r--r--plugins/base/src/test/kotlin/expect/AbstractExpectTest.kt9
-rw-r--r--plugins/base/src/test/kotlin/expect/ExpectGenerator.kt8
-rw-r--r--plugins/base/src/test/kotlin/expect/ExpectTest.kt6
3 files changed, 12 insertions, 11 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")
}
diff --git a/plugins/base/src/test/kotlin/expect/ExpectGenerator.kt b/plugins/base/src/test/kotlin/expect/ExpectGenerator.kt
index cb3313f9..4112cd28 100644
--- a/plugins/base/src/test/kotlin/expect/ExpectGenerator.kt
+++ b/plugins/base/src/test/kotlin/expect/ExpectGenerator.kt
@@ -1,13 +1,13 @@
package expect
-import org.junit.jupiter.api.Disabled
-import org.junit.jupiter.api.Test
+import kotlin.test.Ignore
+import kotlin.test.Test
class ExpectGenerator : AbstractExpectTest() {
- @Disabled
+ @Ignore
@Test
fun generateAll() = testDir?.dirsWithFormats(formats).orEmpty().forEach { (p, f) ->
generateExpect(p, f)
}
-} \ No newline at end of file
+}
diff --git a/plugins/base/src/test/kotlin/expect/ExpectTest.kt b/plugins/base/src/test/kotlin/expect/ExpectTest.kt
index bed841a6..ec9c8c6d 100644
--- a/plugins/base/src/test/kotlin/expect/ExpectTest.kt
+++ b/plugins/base/src/test/kotlin/expect/ExpectTest.kt
@@ -1,8 +1,8 @@
package expect
-import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.DynamicTest.dynamicTest
import org.junit.jupiter.api.TestFactory
+import kotlin.test.Ignore
class ExpectTest : AbstractExpectTest() {
private val ignores: List<String> = listOf(
@@ -16,9 +16,9 @@ class ExpectTest : AbstractExpectTest() {
"*.map"
)
- @Disabled
+ @Ignore
@TestFactory
fun expectTest() = testDir?.dirsWithFormats(formats).orEmpty().map { (p, f) ->
dynamicTest("${p.fileName}-$f") { testOutputWithExcludes(p, f, ignores) }
}
-} \ No newline at end of file
+}