From d731b8e1c5a43aa6d7bbac5991d04f97bdbe6408 Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Mon, 24 Dec 2007 22:00:37 +0000 Subject: [PATCH] Added value_init tests, testing copy construction and assignment. [SVN r42278] --- value_init_test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/value_init_test.cpp b/value_init_test.cpp index 00c3333..6dc8e27 100644 --- a/value_init_test.cpp +++ b/value_init_test.cpp @@ -202,6 +202,13 @@ bool test ( T const& y, T const& z ) x_c_ref = z ; BOOST_CHECK ( x_c == z ) ; + boost::value_initialized const copy1 = x; + BOOST_CHECK ( boost::get(copy1) == boost::get(x) ) ; + + boost::value_initialized copy2; + copy2 = x; + BOOST_CHECK ( boost::get(copy2) == boost::get(x) ) ; + boost::shared_ptr > ptr( new boost::value_initialized ); BOOST_CHECK ( y == *ptr ) ;