summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-09-12 13:41:01 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-09-12 13:41:19 +0300
commit325ed6288ba58a8a45f3d31a02ccdb17c05a9bf2 (patch)
tree801b24b2bb0e5113c6f54e2748c77b5e1dfa39c4 /test cases
parent2e585856be042bf5caa2b45d07557405278ee3ae (diff)
downloadmeson-325ed6288ba58a8a45f3d31a02ccdb17c05a9bf2.tar.gz
Can leave Boost modules empty to only use the plain header libraries. Closes #263.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/frameworks/1 boost/meson.build3
-rw-r--r--test cases/frameworks/1 boost/nomod.cpp18
2 files changed, 21 insertions, 0 deletions
diff --git a/test cases/frameworks/1 boost/meson.build b/test cases/frameworks/1 boost/meson.build
index ceea81114..327d36ff5 100644
--- a/test cases/frameworks/1 boost/meson.build
+++ b/test cases/frameworks/1 boost/meson.build
@@ -13,11 +13,14 @@ endif
nolinkdep = dependency('boost', modules: 'utility')
linkdep = dependency('boost', modules : ['thread', 'system'])
testdep = dependency('boost', modules : 'test')
+nomoddep = dependency('boost')
nolinkexe = executable('nolinkedexe', 'nolinkexe.cc', dependencies : nolinkdep)
linkexe = executable('linkedexe', 'linkexe.cc', dependencies : linkdep)
unitexe = executable('utf', 'unit_test.cpp', dependencies: testdep)
+nomodexe = executable('nomod', 'nomod.cpp', dependencies : nomoddep)
test('Boost nolinktext', nolinkexe)
test('Boost linktext', linkexe)
test('Boost UTF test', unitexe)
+test('Boost nomod', nomodexe)
diff --git a/test cases/frameworks/1 boost/nomod.cpp b/test cases/frameworks/1 boost/nomod.cpp
new file mode 100644
index 000000000..7b168816a
--- /dev/null
+++ b/test cases/frameworks/1 boost/nomod.cpp
@@ -0,0 +1,18 @@
+#include<boost/any.hpp>
+#include<iostream>
+
+boost::any get_any() {
+ boost::any foobar = 3;
+ return foobar;
+}
+
+int main(int argc, char **argv) {
+ boost::any result = get_any();
+ if(boost::any_cast<int>(result) == 3) {
+ std::cout << "Everything is fine in the worls.\n";
+ return 0;
+ } else {
+ std::cout << "Mathematics stopped working.\n";
+ return 1;
+ }
+}