From fe5673d0291653137c3ecc53c2abba5c162a6779 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 16 Feb 2022 00:43:20 +0800 Subject: improve tests for iosapp --- .../objc/iosapp_with_framework/src/app/AppDelegate.m | 5 +++-- .../objc/iosapp_with_framework/src/framework/test.h | 5 +++++ .../objc/iosapp_with_framework/src/framework/test.m | 14 +++++++++++--- 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_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 +#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 + + -- cgit v1.3.1