Native: add test for KT-38850
(the bug was fixed long ago, in 1.4-M1).
This commit is contained in:
committed by
Space
parent
8c17d5f5a7
commit
575c0fabb6
@@ -0,0 +1,10 @@
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface KT38850Color : NSObject
|
||||
+(instancetype)blackColor;
|
||||
@property NSString* name;
|
||||
@end;
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -0,0 +1,12 @@
|
||||
import kotlinx.cinterop.*
|
||||
import kotlin.test.*
|
||||
import objcTests.*
|
||||
|
||||
enum class ColorRef(val color: KT38850Color){
|
||||
Black(KT38850Color.blackColor()),
|
||||
}
|
||||
|
||||
@Test
|
||||
fun testKT38850() {
|
||||
assertEquals("black", ColorRef.Black.color.name)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#import "kt38850.h"
|
||||
|
||||
@implementation KT38850Color
|
||||
+(instancetype)blackColor {
|
||||
KT38850Color* result = [KT38850Color new];
|
||||
result.name = @"black";
|
||||
return result;
|
||||
}
|
||||
@end;
|
||||
Reference in New Issue
Block a user