[K/N][Tests] Migrate test kt62262.kt

^KT-61259
This commit is contained in:
Vladimir Sukharev
2024-02-13 15:35:19 +01:00
committed by Space Team
parent 9a86b83a0c
commit bd7ffc71aa
5 changed files with 26 additions and 14 deletions
@@ -1160,12 +1160,6 @@ standaloneTest("interop_objc_illegal_sharing") {
}
}
standaloneTest("interop_kt62262") {
enabled = project.testTarget == 'ios_x64' || project.testTarget == 'ios_arm64' || project.testTarget == 'ios_simulator_arm64'
source = "interop/objc/kt62262.kt"
UtilsKt.dependsOnPlatformLibs(it)
}
dynamicTest("produce_dynamic") {
source = "produce_dynamic/simple/hello.kt"
cSource = "$projectDir/produce_dynamic/simple/main.c"
@@ -1,8 +0,0 @@
import platform.UIKit.UIViewController
class ViewController : UIViewController {
@OverrideInit
constructor() : super(nibName = null, bundle = null)
}
fun main() {}
+14
View File
@@ -0,0 +1,14 @@
// This test is now compile-only for iOS and tvOS.
// It also makes sense also to invoke overridden constructor from box() and check the sanity of resulting object of class ViewController.
// DISABLE_NATIVE: isAppleTarget=false
// DISABLE_NATIVE: targetFamily=OSX
// DISABLE_NATIVE: targetFamily=WATCHOS
import platform.UIKit.UIViewController
class ViewController : UIViewController {
@OverrideInit
constructor() : super(nibName = null, bundle = null)
}
fun box() = "OK"
@@ -31,6 +31,12 @@ public class FirNativeCodegenLocalTestGenerated extends AbstractNativeCodegenBox
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/codegen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("kt62262.kt")
public void testKt62262() {
runTest("native/native.tests/testData/codegen/kt62262.kt");
}
@Nested
@TestMetadata("native/native.tests/testData/codegen/annotations")
@TestDataPath("$PROJECT_ROOT")
@@ -27,6 +27,12 @@ public class NativeCodegenLocalTestGenerated extends AbstractNativeCodegenBoxTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("native/native.tests/testData/codegen"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("kt62262.kt")
public void testKt62262() {
runTest("native/native.tests/testData/codegen/kt62262.kt");
}
@Nested
@TestMetadata("native/native.tests/testData/codegen/annotations")
@TestDataPath("$PROJECT_ROOT")