Added test case for Boost.

pull/15/head
Jussi Pakkanen 12 years ago
parent 39002095c9
commit 92084b6d9e
  1. 12
      test cases/frameworks/1 boost/linkexe.cc
  2. 14
      test cases/frameworks/1 boost/meson.build
  3. 20
      test cases/frameworks/1 boost/nolinkexe.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;
}

@ -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)

@ -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;
}
Loading…
Cancel
Save