forked from boostorg/system
Include and test system_error.hpp in test/quick.cpp
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
|
||||
// See library home page at http://www.boost.org/libs/system
|
||||
|
||||
#include <boost/system/system_error.hpp>
|
||||
#include <boost/system/error_code.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <cerrno>
|
||||
@ -32,5 +33,10 @@ int main()
|
||||
|
||||
BOOST_TEST( bc == bn );
|
||||
|
||||
boost::system::system_error x( bc, "prefix" );
|
||||
|
||||
BOOST_TEST_EQ( x.code(), bc );
|
||||
BOOST_TEST_EQ( std::string( x.what() ), "prefix: " + bc.message() );
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
@ -43,10 +43,10 @@ int main()
|
||||
|
||||
BOOST_TEST( bc == bn );
|
||||
|
||||
boost::system::system_error x( bc, "what_arg" );
|
||||
boost::system::system_error x( bc, "prefix" );
|
||||
|
||||
BOOST_TEST_EQ( x.code(), bc );
|
||||
BOOST_TEST_CSTR_EQ( x.what(), "what_arg" );
|
||||
BOOST_TEST_EQ( std::string( x.what() ), "prefix: " + bc.message() );
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user