From 8220aa5700d0e23ffe88b3145f9269cc15b71ccc Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 17 Jun 2020 01:21:42 +0300 Subject: [PATCH] Include and test system_error.hpp in test/quick.cpp --- test/quick.cpp | 6 ++++++ test/warnings_test.cpp | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/quick.cpp b/test/quick.cpp index ca66983..535ce6a 100644 --- a/test/quick.cpp +++ b/test/quick.cpp @@ -8,6 +8,7 @@ // See library home page at http://www.boost.org/libs/system +#include #include #include #include @@ -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(); } diff --git a/test/warnings_test.cpp b/test/warnings_test.cpp index 7876815..763cf06 100644 --- a/test/warnings_test.cpp +++ b/test/warnings_test.cpp @@ -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(); }