[K/N][Tests] Migrate dylib-interop-exe tests
^KT-61259
This commit is contained in:
committed by
Space Team
parent
83d851dd61
commit
2b2c685827
+5
@@ -0,0 +1,5 @@
|
||||
language = Objective-C
|
||||
headers = Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h
|
||||
headerFilter = **/with_initializer.h Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h
|
||||
linkerOpts = -lwith_initializer
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#include <Foundation/NSObject.h>
|
||||
@interface A:NSObject
|
||||
|
||||
@end
|
||||
|
||||
@interface B:A
|
||||
+(A*)giveC;
|
||||
@end
|
||||
|
||||
@interface C:A
|
||||
@end
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
@file:OptIn(kotlin.experimental.ExperimentalNativeApi::class)
|
||||
|
||||
import with_initializer.*
|
||||
import kotlin.native.Platform
|
||||
|
||||
val a = B.giveC()!! as C
|
||||
|
||||
fun main() {
|
||||
Platform.isMemoryLeakCheckerActive = true
|
||||
println("OK")
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#include "with_initializer.h"
|
||||
@implementation A
|
||||
|
||||
@end
|
||||
|
||||
@implementation B:A
|
||||
+(A*)giveC{
|
||||
return [[C alloc] init];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation C:A
|
||||
@end
|
||||
|
||||
#if 0
|
||||
int main() {
|
||||
[B giveC];
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user