[K/N] Make AbstractNativeCInteropTest a bit more flexible
It probably requires a bit more thoughful refactoring, but before that we need to collect more test-cases.
This commit is contained in:
committed by
Space Team
parent
72637f19dc
commit
a9d13338bd
+7
-1
@@ -25,16 +25,22 @@ import java.io.File
|
||||
|
||||
abstract class AbstractNativeCInteropFModulesTest : AbstractNativeCInteropTest() {
|
||||
override val fmodules = true
|
||||
|
||||
override val defFileName: String = "pod1.def"
|
||||
}
|
||||
|
||||
abstract class AbstractNativeCInteropNoFModulesTest : AbstractNativeCInteropTest() {
|
||||
override val fmodules = false
|
||||
|
||||
override val defFileName: String = "pod1.def"
|
||||
}
|
||||
|
||||
@Tag("cinterop")
|
||||
abstract class AbstractNativeCInteropTest : AbstractNativeCInteropBaseTest() {
|
||||
abstract val fmodules: Boolean
|
||||
|
||||
abstract val defFileName: String
|
||||
|
||||
@Synchronized
|
||||
protected fun runTest(@TestDataFile testPath: String) {
|
||||
// FIXME: check the following failures under Android with -fmodules
|
||||
@@ -46,7 +52,7 @@ abstract class AbstractNativeCInteropTest : AbstractNativeCInteropBaseTest() {
|
||||
val testPathFull = getAbsoluteFile(testPath)
|
||||
val testDataDir = testPathFull.parentFile.parentFile
|
||||
val includeFolder = testDataDir.resolve("include")
|
||||
val defFile = testPathFull.resolve("pod1.def")
|
||||
val defFile = testPathFull.resolve(defFileName)
|
||||
val defContents = defFile.readText().split("\n").map { it.trim() }
|
||||
val defHasObjC = defContents.any { it.endsWith("Objective-C") }
|
||||
Assumptions.assumeFalse(defHasObjC && !targets.testTarget.family.isAppleFamily)
|
||||
|
||||
Reference in New Issue
Block a user