From 425d141cbf4ce036b4c5ae0ead688803c90d4c41 Mon Sep 17 00:00:00 2001 From: Fernando Cacciola Date: Tue, 20 Jul 2010 18:20:01 +0000 Subject: [PATCH] Test for fixed extraction operator for empty optinals [SVN r64205] --- test/optional_test_io.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/optional_test_io.cpp b/test/optional_test_io.cpp index 13e8a5d..d4ee207 100644 --- a/test/optional_test_io.cpp +++ b/test/optional_test_io.cpp @@ -55,10 +55,14 @@ void test2( Opt o, Opt buff ) { stringstream s ; - s << o ; - s >> buff ; + const int markv = 123 ; + int mark = 0 ; + + s << o << " " << markv ; + s >> buff >> mark ; BOOST_ASSERT( buff == o ) ; + BOOST_ASSERT( mark == markv ) ; } @@ -77,7 +81,6 @@ int test_main( int, char* [] ) { test(1,2); test(string("hello"),string("buffer")); - test(string(""),string("buffer")); } catch ( ... ) {