diff options
| author | ruki <[email protected]> | 2022-02-16 00:43:20 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-02-16 00:43:20 +0800 |
| commit | fe5673d0291653137c3ecc53c2abba5c162a6779 (patch) | |
| tree | 6b853d9a59fd457c7b20dd11b515b84652f2793c | |
| parent | 8d561955f8bee7dc200b047c998c0e973f342192 (diff) | |
improve tests for iosapp
3 files changed, 19 insertions, 5 deletions
diff --git a/tests/projects/objc/iosapp_with_framework/src/app/AppDelegate.m b/tests/projects/objc/iosapp_with_framework/src/app/AppDelegate.m index cdcf08c1e..1e849ce09 100644 --- a/tests/projects/objc/iosapp_with_framework/src/app/AppDelegate.m +++ b/tests/projects/objc/iosapp_with_framework/src/app/AppDelegate.m @@ -18,8 +18,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after application launch. - int c = add(1, 2); - NSLog(@"result: %d", c); + NSLog(@"add(1, 2): %d", add(1, 2)); + Test* t = [[Test alloc] init]; + [t hello]; return YES; } diff --git a/tests/projects/objc/iosapp_with_framework/src/framework/test.h b/tests/projects/objc/iosapp_with_framework/src/framework/test.h index d882546d1..a0a4046a5 100644 --- a/tests/projects/objc/iosapp_with_framework/src/framework/test.h +++ b/tests/projects/objc/iosapp_with_framework/src/framework/test.h @@ -1,3 +1,8 @@ #import <Foundation/Foundation.h> FOUNDATION_EXPORT int add(int a, int b); + +@interface Test : NSObject +- (void)hello; +@end + diff --git a/tests/projects/objc/iosapp_with_framework/src/framework/test.m b/tests/projects/objc/iosapp_with_framework/src/framework/test.m index a4aac7e2d..6be082bd8 100644 --- a/tests/projects/objc/iosapp_with_framework/src/framework/test.m +++ b/tests/projects/objc/iosapp_with_framework/src/framework/test.m @@ -1,8 +1,16 @@ -#import "test.h" -#import <Foundation/Foundation.h> +#include "test.h" int add(int a, int b) { - NSLog(@"add(%d, %d)", a, b); return a + b; } + +@implementation Test + +- (void)hello { + NSLog(@"hello xmake!"); +} + +@end + + |
