mirror of
https://github.com/boostorg/system.git
synced 2025-07-30 04:27:14 +02:00
Add std_interop_test7
This commit is contained in:
@ -95,3 +95,4 @@ boost_test(TYPE run SOURCES std_interop_test3.cpp)
|
|||||||
boost_test(TYPE run SOURCES std_interop_test4.cpp)
|
boost_test(TYPE run SOURCES std_interop_test4.cpp)
|
||||||
boost_test(TYPE run SOURCES std_interop_test5.cpp)
|
boost_test(TYPE run SOURCES std_interop_test5.cpp)
|
||||||
boost_test(TYPE run SOURCES std_interop_test6.cpp)
|
boost_test(TYPE run SOURCES std_interop_test6.cpp)
|
||||||
|
boost_test(TYPE run SOURCES std_interop_test7.cpp)
|
||||||
|
@ -105,3 +105,4 @@ run std_interop_test5.cpp
|
|||||||
;
|
;
|
||||||
|
|
||||||
run std_interop_test6.cpp ;
|
run std_interop_test6.cpp ;
|
||||||
|
run std_interop_test7.cpp ;
|
||||||
|
38
test/std_interop_test7.cpp
Normal file
38
test/std_interop_test7.cpp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
// Copyright 2021 Peter Dimov.
|
||||||
|
// Distributed under the Boost Software License, Version 1.0.
|
||||||
|
// http://www.boost.org/LICENSE_1_0.txt
|
||||||
|
|
||||||
|
#include <boost/system/error_code.hpp>
|
||||||
|
#include <boost/core/lightweight_test.hpp>
|
||||||
|
#include <boost/config/pragma_message.hpp>
|
||||||
|
#include <cerrno>
|
||||||
|
|
||||||
|
#if !defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
|
||||||
|
|
||||||
|
BOOST_PRAGMA_MESSAGE( "BOOST_SYSTEM_HAS_SYSTEM_ERROR not defined, test will be skipped" )
|
||||||
|
int main() {}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#include <system_error>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
{
|
||||||
|
boost::system::error_code e1 = make_error_code( boost::system::errc::bad_address );
|
||||||
|
|
||||||
|
BOOST_TEST( e1 == std::errc::bad_address );
|
||||||
|
BOOST_TEST_NOT( e1 != std::errc::bad_address );
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
boost::system::error_code e1 = make_error_code( std::errc::bad_address );
|
||||||
|
|
||||||
|
BOOST_TEST( e1 == std::errc::bad_address );
|
||||||
|
BOOST_TEST_NOT( e1 != std::errc::bad_address );
|
||||||
|
}
|
||||||
|
|
||||||
|
return boost::report_errors();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
Reference in New Issue
Block a user