mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Added value_init tests, testing copy construction and assignment.
[SVN r42278]
This commit is contained in:
parent
ac1567b3fc
commit
d731b8e1c5
@ -202,6 +202,13 @@ bool test ( T const& y, T const& z )
|
|||||||
x_c_ref = z ;
|
x_c_ref = z ;
|
||||||
BOOST_CHECK ( x_c == 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::shared_ptr<boost::value_initialized<T> > ptr( new boost::value_initialized<T> );
|
||||||
BOOST_CHECK ( y == *ptr ) ;
|
BOOST_CHECK ( y == *ptr ) ;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user