diff options
| author | ruki <[email protected]> | 2022-02-16 00:41:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-02-16 00:41:43 +0800 |
| commit | 8d561955f8bee7dc200b047c998c0e973f342192 (patch) | |
| tree | e758acdea4377368496f2fc28230b46bd183af88 /tests/projects/objc/framework | |
| parent | 9a5d2355d10bf5250fd927ce6423bf69aa7a95bd (diff) | |
improve objc test
Diffstat (limited to 'tests/projects/objc/framework')
| -rw-r--r-- | tests/projects/objc/framework/src/main.m | 2 | ||||
| -rw-r--r-- | tests/projects/objc/framework/src/test.h | 4 | ||||
| -rw-r--r-- | tests/projects/objc/framework/src/test.m | 9 |
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/projects/objc/framework/src/main.m b/tests/projects/objc/framework/src/main.m index e3fa72dbf..af1ae3fda 100644 --- a/tests/projects/objc/framework/src/main.m +++ b/tests/projects/objc/framework/src/main.m @@ -6,6 +6,8 @@ int main(int argc, char** argv) @autoreleasepool { NSLog(@"add(1, 2): %d", add(1, 2)); + Test* t = [[Test alloc] init]; + [t hello]; } return 0; } diff --git a/tests/projects/objc/framework/src/test.h b/tests/projects/objc/framework/src/test.h index d882546d1..3e07e4b38 100644 --- a/tests/projects/objc/framework/src/test.h +++ b/tests/projects/objc/framework/src/test.h @@ -1,3 +1,7 @@ #import <Foundation/Foundation.h> FOUNDATION_EXPORT int add(int a, int b); + +@interface Test : NSObject +- (void)hello; +@end diff --git a/tests/projects/objc/framework/src/test.m b/tests/projects/objc/framework/src/test.m index 84422f6a7..a3ba12750 100644 --- a/tests/projects/objc/framework/src/test.m +++ b/tests/projects/objc/framework/src/test.m @@ -4,3 +4,12 @@ int add(int a, int b) { return a + b; } + +@implementation Test + +- (void)hello { + NSLog(@"hello xmake!"); +} + +@end + |
