[TEST] Introduce test-infrastructure-utils module and extract common test utilities here
This commit is contained in:
+4
-2
@@ -27,6 +27,7 @@ import org.jetbrains.kotlin.resolve.lazy.JvmResolveUtil
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.test.KotlinTestWithEnvironment
|
||||
import org.jetbrains.kotlin.test.util.KtTestUtil
|
||||
import org.jetbrains.kotlin.types.TypeProjection
|
||||
import org.jetbrains.kotlin.types.TypeProjectionImpl
|
||||
import org.jetbrains.kotlin.types.TypeSubstitutor
|
||||
@@ -38,7 +39,7 @@ import java.util.*
|
||||
|
||||
class CapturedTypeApproximationTest : KotlinTestWithEnvironment() {
|
||||
private val testDataPath: String
|
||||
get() = KotlinTestUtils.getTestDataPathBase() + "/capturedTypeApproximation/"
|
||||
get() = KtTestUtil.getTestDataPathBase() + "/capturedTypeApproximation/"
|
||||
|
||||
override fun createEnvironment(): KotlinCoreEnvironment = createEnvironmentWithMockJdk(ConfigurationKind.JDK_ONLY)
|
||||
|
||||
@@ -46,7 +47,8 @@ class CapturedTypeApproximationTest : KotlinTestWithEnvironment() {
|
||||
assert(substitutions.size in 1..2) { "Captured type approximation test requires substitutions for (T) or (T, R)" }
|
||||
val oneTypeVariable = substitutions.size == 1
|
||||
|
||||
val declarationsText = KotlinTestUtils.doLoadFile(File(testDataPath + "/declarations.kt"))
|
||||
val declarationsText =
|
||||
KtTestUtil.doLoadFile(File(testDataPath + "/declarations.kt"))
|
||||
|
||||
fun analyzeTestFile(testType: String) = run {
|
||||
val test = declarationsText.replace("#TestType#", testType)
|
||||
|
||||
Reference in New Issue
Block a user