mirror of
https://github.com/boostorg/system.git
synced 2025-07-29 12:07:13 +02:00
Add std_interop_test16.cpp. Refs #102.
This commit is contained in:
@ -134,6 +134,8 @@ boost_test(TYPE run SOURCES win32_generic_test.cpp)
|
||||
|
||||
boost_test(TYPE run SOURCES ec_hash_value_test.cpp)
|
||||
|
||||
boost_test(TYPE run SOURCES std_interop_test16.cpp)
|
||||
|
||||
# result
|
||||
|
||||
set(BOOST_TEST_COMPILE_FEATURES cxx_std_11)
|
||||
|
@ -162,6 +162,8 @@ run win32_generic_test.cpp ;
|
||||
|
||||
run ec_hash_value_test.cpp ;
|
||||
|
||||
run std_interop_test16.cpp ;
|
||||
|
||||
# result
|
||||
|
||||
import ../../config/checks/config : requires ;
|
||||
|
30
test/std_interop_test16.cpp
Normal file
30
test/std_interop_test16.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
// Copyright 2023 Peter Dimov.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/system/detail/config.hpp>
|
||||
#include <boost/config/pragma_message.hpp>
|
||||
|
||||
#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 <boost/asio/error.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <system_error>
|
||||
|
||||
bool init_lwt = (boost::core::lwt_init(), true);
|
||||
|
||||
std::error_category const & cat = boost::asio::error::get_misc_category();
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_TEST_CSTR_EQ( cat.name(), "asio.misc" );
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user