Added value_init tests, testing copy construction and assignment.

[SVN r42278]
This commit is contained in:
Niels Dekker 2007-12-24 22:00:37 +00:00
parent ac1567b3fc
commit d731b8e1c5

View File

@ -202,6 +202,13 @@ bool test ( T const& y, T const& z )
x_c_ref = z ;
BOOST_CHECK ( x_c == z ) ;
boost::value_initialized<T> const copy1 = x;
BOOST_CHECK ( boost::get(copy1) == boost::get(x) ) ;
boost::value_initialized<T> copy2;
copy2 = x;
BOOST_CHECK ( boost::get(copy2) == boost::get(x) ) ;
boost::shared_ptr<boost::value_initialized<T> > ptr( new boost::value_initialized<T> );
BOOST_CHECK ( y == *ptr ) ;