[Test] Migrate AbstractBytecodeTextTest to new test infrastructure
This commit is contained in:
+6
-1
@@ -16,13 +16,18 @@
|
||||
|
||||
package org.jetbrains.kotlin.android.synthetic.test
|
||||
|
||||
import org.jetbrains.kotlin.ObsoleteTestInfrastructure
|
||||
import org.jetbrains.kotlin.codegen.AbstractBytecodeTextTest
|
||||
import org.jetbrains.kotlin.codegen.checkGeneratedTextAgainstExpectedOccurrences
|
||||
import org.jetbrains.kotlin.codegen.readExpectedOccurrences
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind
|
||||
import org.jetbrains.kotlin.test.KotlinTestUtils
|
||||
import org.jetbrains.kotlin.test.TargetBackend
|
||||
import org.jetbrains.kotlin.test.TestJdkKind
|
||||
import org.jetbrains.kotlin.test.util.JUnit4Assertions
|
||||
|
||||
@OptIn(ObsoleteTestInfrastructure::class)
|
||||
abstract class AbstractAndroidBytecodeShapeTest : AbstractBytecodeTextTest() {
|
||||
private fun createAndroidAPIEnvironment(path: String) {
|
||||
return createEnvironmentForConfiguration(KotlinTestUtils.newConfiguration(ConfigurationKind.ALL, TestJdkKind.ANDROID_API), path)
|
||||
@@ -40,6 +45,6 @@ abstract class AbstractAndroidBytecodeShapeTest : AbstractBytecodeTextTest() {
|
||||
loadFileByFullPath(fileName)
|
||||
val expected = readExpectedOccurrences(fileName)
|
||||
val actual = generateToText()
|
||||
checkGeneratedTextAgainstExpectedOccurrences(actual, expected, TargetBackend.ANY, true)
|
||||
checkGeneratedTextAgainstExpectedOccurrences(actual, expected, TargetBackend.ANY, true, JUnit4Assertions)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user