[K/N] Create test model for building/executing C-Interop tests

^KT-63287 Fixed
This commit is contained in:
Vladimir Sukharev
2023-11-07 23:14:44 +01:00
committed by Space Team
parent 8d20d5b16c
commit 1b1df9f0db
8 changed files with 116 additions and 29 deletions
@@ -0,0 +1,2 @@
language = Objective-C
headers = library.h
@@ -1,7 +1,3 @@
depends = Foundation
language = Objective-C
---
#import "Foundation/NSString.h"
#import "Foundation/NSObject.h"
@@ -0,0 +1,6 @@
#import "library.h"
@implementation WithClassProperty : NSObject
-(instancetype) init {}
+ (NSString *) stringProperty { return @"153"; }
@end
@@ -10,6 +10,13 @@ class Impl : WithClassProperty() {
}
}
@ObjCName("KotlinImplWithoutCompanionPropertyOverride")
class ImplWithoutOverride : WithClassProperty() {
companion object : WithClassPropertyMeta() {
}
}
fun main() {
assertEquals("42", Impl.stringProperty())
assertEquals("153", ImplWithoutOverride.stringProperty())
}