forked from boostorg/system
Add errc_test2
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include <boost/system/detail/error_code.hpp>
|
||||
#include <boost/system/detail/error_condition.hpp>
|
||||
#include <boost/system/detail/generic_category.hpp>
|
||||
#include <boost/system/detail/error_category_impl.hpp>
|
||||
#include <boost/system/detail/config.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
|
@@ -77,6 +77,7 @@ run std_single_instance_test.cpp std_single_instance_lib1 std_single_instance_li
|
||||
run is_error_code_enum_test.cpp ;
|
||||
run is_error_condition_enum_test.cpp ;
|
||||
run errc_test.cpp ;
|
||||
run errc_test2.cpp ;
|
||||
run error_category_test2.cpp ;
|
||||
run error_condition_test.cpp ;
|
||||
run error_condition_test2.cpp ;
|
||||
|
20
test/errc_test2.cpp
Normal file
20
test/errc_test2.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright 2020 Peter Dimov.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/system/errc.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_TEST_EQ( make_error_code( boost::system::errc::success ).value(), 0 );
|
||||
BOOST_TEST_EQ( make_error_condition( boost::system::errc::success ).value(), 0 );
|
||||
|
||||
BOOST_TEST_EQ( make_error_code( boost::system::errc::no_such_file_or_directory ).value(), ENOENT );
|
||||
BOOST_TEST_EQ( make_error_condition( boost::system::errc::no_such_file_or_directory ).value(), ENOENT );
|
||||
|
||||
BOOST_TEST_EQ( make_error_code( boost::system::errc::address_family_not_supported ).value(), EAFNOSUPPORT );
|
||||
BOOST_TEST_EQ( make_error_condition( boost::system::errc::address_family_not_supported ).value(), EAFNOSUPPORT );
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
Reference in New Issue
Block a user