diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-12-19 21:10:52 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-01-06 13:49:34 -0800 |
commit | 0ec7dd5ac53b0a6955ecce65c011a5d06631bd94 (patch) | |
tree | 7f4566fcd01c8ad27a4b78fb5eaf23409bf7dde0 /test cases/objcpp | |
parent | 87742fd9f016873fcd9d91ef8bc4c3b1be925224 (diff) | |
download | meson-0ec7dd5ac53b0a6955ecce65c011a5d06631bd94.zip meson-0ec7dd5ac53b0a6955ecce65c011a5d06631bd94.tar.gz meson-0ec7dd5ac53b0a6955ecce65c011a5d06631bd94.tar.bz2 |
tests: Split objc and objc++ tests
This allows platforms that can compile one or the other (but not both)
to run the tests that they can.
Diffstat (limited to 'test cases/objcpp')
-rw-r--r-- | test cases/objcpp/1 simple/meson.build | 4 | ||||
-rw-r--r-- | test cases/objcpp/1 simple/prog.mm | 9 | ||||
-rw-r--r-- | test cases/objcpp/2 objc++ args/meson.build | 4 | ||||
-rw-r--r-- | test cases/objcpp/2 objc++ args/prog.mm | 16 |
4 files changed, 33 insertions, 0 deletions
diff --git a/test cases/objcpp/1 simple/meson.build b/test cases/objcpp/1 simple/meson.build new file mode 100644 index 0000000..7d91884 --- /dev/null +++ b/test cases/objcpp/1 simple/meson.build @@ -0,0 +1,4 @@ +project('Objective C++', 'objcpp') + +exe = executable('objcppprog', 'prog.mm') +test('objcpp', exe) diff --git a/test cases/objcpp/1 simple/prog.mm b/test cases/objcpp/1 simple/prog.mm new file mode 100644 index 0000000..927e810 --- /dev/null +++ b/test cases/objcpp/1 simple/prog.mm @@ -0,0 +1,9 @@ +#import<stdio.h> + +class MyClass { +}; + +int main(int argc, char **argv) { + return 0; +} + diff --git a/test cases/objcpp/2 objc++ args/meson.build b/test cases/objcpp/2 objc++ args/meson.build new file mode 100644 index 0000000..e0e34b0 --- /dev/null +++ b/test cases/objcpp/2 objc++ args/meson.build @@ -0,0 +1,4 @@ +project('objective c++ args', 'objcpp') + +exe = executable('prog', 'prog.mm', objcpp_args : ['-DMESON_OBJCPP_TEST']) +test('objective c++ args', exe) diff --git a/test cases/objcpp/2 objc++ args/prog.mm b/test cases/objcpp/2 objc++ args/prog.mm new file mode 100644 index 0000000..3decaf2 --- /dev/null +++ b/test cases/objcpp/2 objc++ args/prog.mm @@ -0,0 +1,16 @@ +#import<stdio.h> + +class TestClass +{ +}; + +int main(int argc, char **argv) +{ +#ifdef MESON_OBJCPP_TEST +int x = 1; +#endif + + printf("x = %x\n", x); + + return 0; +} |