aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test cases/frameworks/1 boost/linkexe.cc12
-rw-r--r--test cases/frameworks/1 boost/meson.build14
-rw-r--r--test cases/frameworks/1 boost/nolinkexe.cc20
3 files changed, 46 insertions, 0 deletions
diff --git a/test cases/frameworks/1 boost/linkexe.cc b/test cases/frameworks/1 boost/linkexe.cc
new file mode 100644
index 0000000..e9f4047
--- /dev/null
+++ b/test cases/frameworks/1 boost/linkexe.cc
@@ -0,0 +1,12 @@
+#include<boost/thread.hpp>
+
+struct callable {
+ void operator()() {};
+};
+
+int main(int argc, char **argv) {
+ callable x;
+ boost::thread thr(x);
+ thr.join();
+ return 0;
+}
diff --git a/test cases/frameworks/1 boost/meson.build b/test cases/frameworks/1 boost/meson.build
new file mode 100644
index 0000000..15455c5
--- /dev/null
+++ b/test cases/frameworks/1 boost/meson.build
@@ -0,0 +1,14 @@
+project('boosttest', 'cxx')
+
+# One test case for a Boost module that is
+# header only and one test case for a module that
+# requires linking with a shared library.
+
+nolinkdep = find_dep('boost', modules : 'utility', required : true)
+linkdep = find_dep('boost', modules : 'thread', required : true)
+
+nolinkexe = executable('nolinkexe', 'nolinkexe.cc', dep : nolinkdep)
+linkexe = executable('linkedexe', 'linkexe.cc', dep : linkdep)
+
+add_test('nolinktest', nolinkexe)
+add_test('linktext', linkexe)
diff --git a/test cases/frameworks/1 boost/nolinkexe.cc b/test cases/frameworks/1 boost/nolinkexe.cc
new file mode 100644
index 0000000..e81f3fb
--- /dev/null
+++ b/test cases/frameworks/1 boost/nolinkexe.cc
@@ -0,0 +1,20 @@
+#include<boost/utility.hpp>
+
+class MyClass : boost::noncopyable {
+private:
+ int x;
+
+public:
+ MyClass() {
+ x = 44;
+ }
+
+ int getValue() const { return x; }
+};
+
+int main(int argc, char **argv) {
+ MyClass foo;
+ if(foo.getValue() == 44)
+ return 0;
+ return 1;
+}