aboutsummaryrefslogtreecommitdiff
path: root/tests/core/cgo/objc/sub.m
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core/cgo/objc/sub.m')
-rw-r--r--tests/core/cgo/objc/sub.m20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/core/cgo/objc/sub.m b/tests/core/cgo/objc/sub.m
new file mode 100644
index 00000000..3b408ea8
--- /dev/null
+++ b/tests/core/cgo/objc/sub.m
@@ -0,0 +1,20 @@
+@import Foundation;
+
+@interface Subber : NSObject
+
+- (int)sub:(int)num1 andNum2:(int)num2;
+
+@end
+
+@implementation Subber
+
+- (int)sub:(int)num1 andNum2:(int)num2{
+ return num1 - num2;
+}
+
+@end
+
+int sub(int a, int b) {
+ Subber* subber = [[Subber alloc] init];
+ return [subber sub:a andNum2:b];
+}