aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/objc/main.mm
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-10-30 18:22:21 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2013-10-31 17:48:47 +0100
commit7f0cc84396dd3d729200d3c99aae6358b9ed647e (patch)
tree51db9c6c8c48e8a9af073afc0f3e679518910c01 /tests/auto/blackbox/testdata/objc/main.mm
parent4cdb21ade421b4635d49a0f0d7b72118532b6ef6 (diff)
Clean up manual tests.
Turn some manual tests that add coverage of a feature into autotests. Turn some manual tests that demonstrate a feature into examples. Remove some manual tests that do neither. Change-Id: Ie54005e1ba5aad07319eb864cc5ad70e26308080 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tests/auto/blackbox/testdata/objc/main.mm')
-rw-r--r--tests/auto/blackbox/testdata/objc/main.mm14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/objc/main.mm b/tests/auto/blackbox/testdata/objc/main.mm
new file mode 100644
index 000000000..49b4f3915
--- /dev/null
+++ b/tests/auto/blackbox/testdata/objc/main.mm
@@ -0,0 +1,14 @@
+#import <Foundation/Foundation.h>
+#include <QCoreApplication>
+
+int main(int argc, char **argv)
+{
+ // We support both C++
+ QCoreApplication app(argc, argv);
+ Q_UNUSED(app);
+ // And Objective-C
+ NSDictionary *version = [NSDictionary dictionaryWithContentsOfFile:@"/System/Library/CoreServices/SystemVersion.plist"];
+ NSString *productVersion = [version objectForKey:@"ProductVersion"];
+ NSLog(@"Hello, OS X %@!", productVersion);
+ // So it's Objective-C++
+}