added more tests

[SVN r31048]
This commit is contained in:
Arkadiy Vertleyb
2005-09-20 01:32:56 +00:00
parent 9bb8a83f24
commit c357f29a5b
9 changed files with 165 additions and 0 deletions

32
test/noncopyable.cpp Executable file
View File

@@ -0,0 +1,32 @@
#include "test.hpp"
#include <boost/noncopyable.hpp>
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
struct x : boost::noncopyable
{
void foo() {}
void bar() const {}
};
BOOST_TYPEOF_REGISTER_TYPE(x)
x& make_ref()
{
static x result;
return result;
}
const x& make_const_ref()
{
static x result;
return result;
}
void foo()
{
BOOST_AUTO(& v1, make_ref());
v1.foo();
BOOST_AUTO(const& v2, make_const_ref());
v2.bar();
}