forked from boostorg/system
Add tests for failed()
This commit is contained in:
@@ -21,5 +21,10 @@ int main()
|
|||||||
BOOST_TEST( cat.default_error_condition( ENOENT ) == sys::error_condition( ENOENT, cat ) );
|
BOOST_TEST( cat.default_error_condition( ENOENT ) == sys::error_condition( ENOENT, cat ) );
|
||||||
BOOST_TEST( cat.default_error_condition( -1 ) == sys::error_condition( -1, cat ) );
|
BOOST_TEST( cat.default_error_condition( -1 ) == sys::error_condition( -1, cat ) );
|
||||||
|
|
||||||
|
// failed
|
||||||
|
BOOST_TEST( !cat.failed( 0 ) );
|
||||||
|
BOOST_TEST( cat.failed( ENOENT ) );
|
||||||
|
BOOST_TEST( cat.failed( -1 ) );
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
@@ -30,5 +30,10 @@ int main()
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// failed
|
||||||
|
BOOST_TEST( !cat.failed( 0 ) );
|
||||||
|
BOOST_TEST( cat.failed( 5 ) );
|
||||||
|
BOOST_TEST( cat.failed( -1 ) );
|
||||||
|
|
||||||
return boost::report_errors();
|
return boost::report_errors();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user