Boost logo

Boost-Commit :

From: nielsdekker_at_[hidden]
Date: 2007-12-24 17:00:37


Author: niels_dekker
Date: 2007-12-24 17:00:37 EST (Mon, 24 Dec 2007)
New Revision: 42278
URL: http://svn.boost.org/trac/boost/changeset/42278

Log:
Added value_init tests, testing copy construction and assignment.
Text files modified:
   trunk/libs/utility/value_init_test.cpp | 7 +++++++
   1 files changed, 7 insertions(+), 0 deletions(-)

Modified: trunk/libs/utility/value_init_test.cpp
==============================================================================
--- trunk/libs/utility/value_init_test.cpp (original)
+++ trunk/libs/utility/value_init_test.cpp 2007-12-24 17:00:37 EST (Mon, 24 Dec 2007)
@@ -202,6 +202,13 @@
   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 ) ;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk