forked from boostorg/system
Simplify 03/11 mismatch test because of MinGW; message() doesn't work
This commit is contained in:
@ -288,14 +288,15 @@ namespace boost
|
||||
return pc_->name();
|
||||
}
|
||||
|
||||
virtual std::string message( int ev ) const
|
||||
{
|
||||
return pc_->message( ev );
|
||||
}
|
||||
// we can't define message, because (1) it returns an std::string,
|
||||
// which can be different between 03 and 11, and (2) on mingw, there
|
||||
// are actually two `message` functions, not one, so it doesn't work
|
||||
// even if we do
|
||||
|
||||
// we can't define default_error_condition or equivalent,
|
||||
// so if called, it will crash, but that's still better than the
|
||||
// alternative
|
||||
// neither can we define default_error_condition or equivalent
|
||||
|
||||
// if these functions are called, it will crash, but that's still
|
||||
// better than the alternative of having the class layout change
|
||||
};
|
||||
|
||||
std_category std_cat_;
|
||||
|
@ -38,15 +38,7 @@ static void test_generic_category()
|
||||
std::error_category const & st = bt;
|
||||
|
||||
BOOST_TEST_CSTR_EQ( bt.name(), st.name() );
|
||||
|
||||
int ev = ENOENT;
|
||||
|
||||
BOOST_TEST_EQ( bt.message( ev ), st.message( ev ) );
|
||||
|
||||
boost::system::error_code bc( ev, bt );
|
||||
std::error_code sc( bc );
|
||||
|
||||
BOOST_TEST_EQ( bc.message(), sc.message() );
|
||||
BOOST_TEST_EQ( bt.name(), st.name() );
|
||||
}
|
||||
|
||||
static void test_system_category()
|
||||
@ -55,14 +47,7 @@ static void test_system_category()
|
||||
std::error_category const & st = bt;
|
||||
|
||||
BOOST_TEST_CSTR_EQ( bt.name(), st.name() );
|
||||
|
||||
int ev = 5;
|
||||
BOOST_TEST_EQ( bt.message( ev ), st.message( ev ) );
|
||||
|
||||
boost::system::error_code bc( ev, bt );
|
||||
std::error_code sc( bc );
|
||||
|
||||
BOOST_TEST_EQ( bc.message(), sc.message() );
|
||||
BOOST_TEST_EQ( bt.name(), st.name() );
|
||||
}
|
||||
|
||||
int main()
|
||||
|
Reference in New Issue
Block a user