Include and test system_error.hpp in test/quick.cpp

This commit is contained in:
Peter Dimov
2020-06-17 01:21:42 +03:00
parent f00c76a3fc
commit 8220aa5700
2 changed files with 8 additions and 2 deletions

View File

@ -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();
}

View File

@ -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();
}