summaryrefslogtreecommitdiff
path: root/tests/projects/objc/framework/src
diff options
context:
space:
mode:
Diffstat (limited to 'tests/projects/objc/framework/src')
-rw-r--r--tests/projects/objc/framework/src/main.m2
-rw-r--r--tests/projects/objc/framework/src/test.h4
-rw-r--r--tests/projects/objc/framework/src/test.m9
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
+