[K/N][Tests] Migrate kt56048 test
^KT-61259
This commit is contained in:
@@ -1180,9 +1180,6 @@ if (PlatformInfo.isAppleTarget(project)) {
|
|||||||
it.defFile 'interop/objc/kt48816/objclib.def'
|
it.defFile 'interop/objc/kt48816/objclib.def'
|
||||||
it.headers "$projectDir/interop/objc/kt48816/objclib.h"
|
it.headers "$projectDir/interop/objc/kt48816/objclib.h"
|
||||||
}
|
}
|
||||||
createInterop("objc_kt50648") {
|
|
||||||
it.defFile 'interop/objc/kt50648/objclib.def'
|
|
||||||
}
|
|
||||||
createInterop("objc_kt55938") {
|
createInterop("objc_kt55938") {
|
||||||
it.defFile 'interop/objc/kt55938/objclib.def'
|
it.defFile 'interop/objc/kt55938/objclib.def'
|
||||||
it.headers "$projectDir/interop/objc/kt55938/objclib.h"
|
it.headers "$projectDir/interop/objc/kt55938/objclib.h"
|
||||||
@@ -1668,16 +1665,6 @@ if (PlatformInfo.isAppleTarget(project)) {
|
|||||||
flags = ["-Xlazy-ir-for-caches=enable"]
|
flags = ["-Xlazy-ir-for-caches=enable"]
|
||||||
}
|
}
|
||||||
|
|
||||||
interopTest("interop_objc_kt50648") {
|
|
||||||
source = 'interop/objc/kt50648/main.kt'
|
|
||||||
interop = "objc_kt50648"
|
|
||||||
expectedExitStatusChecker = { it != 0 }
|
|
||||||
outputChecker = {
|
|
||||||
it.contains("Converting Obj-C blocks with non-reference-typed return value to kotlin.Any is not supported (v)") &&
|
|
||||||
(it.contains("kfun:#main(){}") || project.globalTestArgs.contains('-opt')) // Stacktrace.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
interopTest("interop_objc_kt55938") {
|
interopTest("interop_objc_kt55938") {
|
||||||
source = "interop/objc/kt55938/main.kt"
|
source = "interop/objc/kt55938/main.kt"
|
||||||
lib = "interop/objc/kt55938/lib.kt"
|
lib = "interop/objc/kt55938/lib.kt"
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
import objclib.*
|
|
||||||
|
|
||||||
fun main() {
|
|
||||||
getVoidBlockAsId()
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
language = Objective-C
|
|
||||||
---
|
|
||||||
id getVoidBlockAsId() {
|
|
||||||
void (^result)(void) = ^{};
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
// TARGET_BACKEND: NATIVE
|
||||||
|
// EXIT_CODE: !0
|
||||||
|
// OUTPUT_REGEX: .*Converting Obj-C blocks with non-reference-typed return value to kotlin.Any is not supported \(v\).*kfun:#main.*
|
||||||
|
|
||||||
|
// MODULE: cinterop
|
||||||
|
// FILE: objclib.def
|
||||||
|
language = Objective-C
|
||||||
|
---
|
||||||
|
id getVoidBlockAsId() {
|
||||||
|
void (^result)(void) = ^{};
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: main(cinterop)
|
||||||
|
// FILE: main.kt
|
||||||
|
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
|
||||||
|
import objclib.*
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
getVoidBlockAsId()
|
||||||
|
}
|
||||||
+6
@@ -34,6 +34,12 @@ public class FirNativeStandaloneTestGenerated extends AbstractNativeBlackBoxTest
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/standalone"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/standalone"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56048.kt")
|
||||||
|
public void testKt56048() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/standalone/kt56048.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
@TestMetadata("native/native.tests/testData/standalone/console")
|
@TestMetadata("native/native.tests/testData/standalone/console")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
|||||||
+6
@@ -31,6 +31,12 @@ public class NativeStandaloneTestGenerated extends AbstractNativeBlackBoxTest {
|
|||||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/standalone"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/standalone"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt56048.kt")
|
||||||
|
public void testKt56048() throws Exception {
|
||||||
|
runTest("native/native.tests/testData/standalone/kt56048.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Nested
|
@Nested
|
||||||
@TestMetadata("native/native.tests/testData/standalone/console")
|
@TestMetadata("native/native.tests/testData/standalone/console")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
|||||||
Reference in New Issue
Block a user