mirror of
https://github.com/boostorg/optional.git
synced 2025-07-30 20:47:18 +02:00
Test for fixed extraction operator for empty optinals
[SVN r64205]
This commit is contained in:
@ -55,10 +55,14 @@ void test2( Opt o, Opt buff )
|
|||||||
{
|
{
|
||||||
stringstream s ;
|
stringstream s ;
|
||||||
|
|
||||||
s << o ;
|
const int markv = 123 ;
|
||||||
s >> buff ;
|
int mark = 0 ;
|
||||||
|
|
||||||
|
s << o << " " << markv ;
|
||||||
|
s >> buff >> mark ;
|
||||||
|
|
||||||
BOOST_ASSERT( buff == o ) ;
|
BOOST_ASSERT( buff == o ) ;
|
||||||
|
BOOST_ASSERT( mark == markv ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -77,7 +81,6 @@ int test_main( int, char* [] )
|
|||||||
{
|
{
|
||||||
test(1,2);
|
test(1,2);
|
||||||
test(string("hello"),string("buffer"));
|
test(string("hello"),string("buffer"));
|
||||||
test(string(""),string("buffer"));
|
|
||||||
}
|
}
|
||||||
catch ( ... )
|
catch ( ... )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user