Skip to content

Commit

Permalink
Add std_interop_test16.cpp. Refs #102.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Jan 19, 2023
1 parent bb60a27 commit 06ddfdb
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;
Expand Down
30 changes: 30 additions & 0 deletions test/std_interop_test16.cpp
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 06ddfdb

Please sign in to comment.