[KAPT] Migrate tests in kapt3-base and kapt3-cli to JUnit 5
This commit is contained in:
committed by
teamcity
parent
b7cc781e97
commit
fdf1b8b1c0
@@ -5,14 +5,15 @@
|
||||
|
||||
package org.jetbrains.kotlin.kapt.base.test
|
||||
|
||||
import junit.framework.TestCase
|
||||
import org.jetbrains.kotlin.base.kapt3.KaptOptions
|
||||
import org.jetbrains.kotlin.base.kapt3.collectJavaSourceFiles
|
||||
import org.junit.Test
|
||||
import org.junit.jupiter.api.Assertions.assertEquals
|
||||
import org.junit.jupiter.api.Assertions.assertTrue
|
||||
import org.junit.jupiter.api.Test
|
||||
import java.io.File
|
||||
import java.nio.file.Files
|
||||
|
||||
class KaptPathsTest : TestCase() {
|
||||
class KaptPathsTest {
|
||||
@Test
|
||||
fun testSymbolicLinks() {
|
||||
if (System.getProperty("os.name").lowercase().contains("win")) return
|
||||
@@ -49,8 +50,7 @@ class KaptPathsTest : TestCase() {
|
||||
|
||||
fun assertContains(path: String) {
|
||||
val available by lazy { javaSourceFiles.joinToString { it.toRelativeString(tempDir) } }
|
||||
assertTrue("Can't find path $path\nAvailable: $available",
|
||||
javaSourceFiles.any { it.toRelativeString(tempDir) == path })
|
||||
assertTrue(javaSourceFiles.any { it.toRelativeString(tempDir) == path }) { "Can't find path $path\nAvailable: $available" }
|
||||
}
|
||||
|
||||
assertEquals(4, javaSourceFiles.size)
|
||||
@@ -62,4 +62,4 @@ class KaptPathsTest : TestCase() {
|
||||
tempDir.deleteRecursively()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user