Native: add tests for ExperimentalForeignApi on cinterop declarations
Add tests checking that all (top-level) declarations generated by cinterop now have ExperimentalForeignApi annotation. ^KT-58362
This commit is contained in:
committed by
Space Team
parent
3f3f6eb5a8
commit
bcc4a891be
@@ -0,0 +1,8 @@
|
||||
enum E1 {
|
||||
ONE, TWO, THREE
|
||||
};
|
||||
|
||||
enum E2 {
|
||||
FOUR = 4,
|
||||
EIGHT = 8
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
void foo(void);
|
||||
void bar() {}
|
||||
@@ -0,0 +1,6 @@
|
||||
#define MACRO_CONST_GLOBAL 1
|
||||
|
||||
int getValue(void);
|
||||
#define MACRO_GLOBAL getValue()
|
||||
|
||||
extern int global;
|
||||
@@ -0,0 +1,10 @@
|
||||
@interface MyClass
|
||||
@end
|
||||
|
||||
@interface MyClass (MyClassCategory)
|
||||
-(instancetype) init;
|
||||
-(void) instanceMethod;
|
||||
+(void) classMethod;
|
||||
@property int instanceProperty;
|
||||
@property (class) id classProperty;
|
||||
@end
|
||||
@@ -0,0 +1,7 @@
|
||||
@interface MyClass
|
||||
-(instancetype) init;
|
||||
-(void) instanceMethod;
|
||||
+(void) classMethod;
|
||||
@property int instanceProperty;
|
||||
@property (class) id classProperty;
|
||||
@end
|
||||
@@ -0,0 +1,6 @@
|
||||
@protocol MyProtocol
|
||||
-(id) instanceMethod;
|
||||
+(int) classMethod;
|
||||
@property id instanceProperty;
|
||||
@property (class) int classProperty;
|
||||
@end
|
||||
@@ -0,0 +1,6 @@
|
||||
@interface MyClass
|
||||
@end
|
||||
|
||||
typedef MyClass MyClass2;
|
||||
typedef MyClass* MyClassRef;
|
||||
typedef id MyId;
|
||||
@@ -0,0 +1,3 @@
|
||||
struct Foo {
|
||||
int x;
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
typedef int MyInt;
|
||||
typedef void* MyPointer;
|
||||
|
||||
struct S;
|
||||
struct T {};
|
||||
|
||||
typedef struct S MyS;
|
||||
typedef struct T MyT;
|
||||
Reference in New Issue
Block a user