summaryrefslogtreecommitdiff
path: root/test cases/objc
diff options
context:
space:
mode:
authorJonathan Schleifer <js@nil.im>2024-04-11 01:46:27 +0200
committerEli Schwartz <eschwartz93@gmail.com>2024-04-28 03:14:29 -0400
commit6c6529337e72812a64ff4a193d1888cc7822de58 (patch)
tree7672560e73f02b46d45b1d6569cf7bca3e33505e /test cases/objc
parent205f09e1b022a71a64eb48e22bb52f76e0da21ef (diff)
downloadmeson-6c6529337e72812a64ff4a193d1888cc7822de58.tar.gz
Add support for depending on ObjFW
This uses objfw-config to get to the flags, however, there's still several todos that can only be addressed once dependencies can have per-language flags.
Diffstat (limited to 'test cases/objc')
-rw-r--r--test cases/objc/5 objfw/SimpleTest.m10
-rw-r--r--test cases/objc/5 objfw/TestApplication.m12
-rw-r--r--test cases/objc/5 objfw/meson.build14
3 files changed, 36 insertions, 0 deletions
diff --git a/test cases/objc/5 objfw/SimpleTest.m b/test cases/objc/5 objfw/SimpleTest.m
new file mode 100644
index 000000000..a1604d3bc
--- /dev/null
+++ b/test cases/objc/5 objfw/SimpleTest.m
@@ -0,0 +1,10 @@
+#import <ObjFW/ObjFW.h>
+#import <ObjFWTest/ObjFWTest.h>
+
+@interface SimpleTest: OTTestCase
+@end
+
+@implementation SimpleTest
+- (void)testMeson {
+}
+@end
diff --git a/test cases/objc/5 objfw/TestApplication.m b/test cases/objc/5 objfw/TestApplication.m
new file mode 100644
index 000000000..ed6fac1e9
--- /dev/null
+++ b/test cases/objc/5 objfw/TestApplication.m
@@ -0,0 +1,12 @@
+#import <ObjFW/ObjFW.h>
+
+@interface TestApplication: OFObject <OFApplicationDelegate>
+@end
+
+OF_APPLICATION_DELEGATE(TestApplication)
+
+@implementation TestApplication
+- (void)applicationDidFinishLaunching: (OFNotification *)notification {
+ [OFApplication terminate];
+}
+@end
diff --git a/test cases/objc/5 objfw/meson.build b/test cases/objc/5 objfw/meson.build
new file mode 100644
index 000000000..40ddb7968
--- /dev/null
+++ b/test cases/objc/5 objfw/meson.build
@@ -0,0 +1,14 @@
+project('objfw build tests', 'objc')
+
+objfw_dep = dependency('objfw', required: false)
+objfwtest_dep = dependency('objfw', modules: ['ObjFWTest'], required: false)
+
+if not objfw_dep.found() or not objfwtest_dep.found()
+ error('MESON_SKIP_TEST: Need objfw dependency')
+endif
+
+executable('TestApplication', 'TestApplication.m',
+ dependencies: [objfw_dep])
+
+executable('SimpleTest', 'SimpleTest.m',
+ dependencies: [objfwtest_dep])