diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 7fbff70..7e5bddd 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -126,6 +126,7 @@ system-run win32_hresult_test.cpp ; system-run error_category_test.cpp ; system-run generic_category_test.cpp ; system-run system_category_test.cpp ; +system-run after_main_test.cpp after_main_test_1.cpp after_main_test_2.cpp ; # Quick (CI) test run quick.cpp ; diff --git a/test/after_main_test.cpp b/test/after_main_test.cpp new file mode 100644 index 0000000..79fc5b4 --- /dev/null +++ b/test/after_main_test.cpp @@ -0,0 +1,26 @@ + +// Copyright 2018 Peter Dimov. +// Distributed under the Boost Software License, Version 1.0. + +#include +#include +#include + +using namespace boost::system; + +struct Z +{ + ~Z() + { + BOOST_TEST_CSTR_EQ( generic_category().name(), "generic" ); + BOOST_TEST_CSTR_EQ( system_category().name(), "system" ); + + boost::quick_exit( boost::report_errors() ); + } +}; + +static Z z; + +int main() +{ +} diff --git a/test/after_main_test_1.cpp b/test/after_main_test_1.cpp new file mode 100644 index 0000000..5b9f728 --- /dev/null +++ b/test/after_main_test_1.cpp @@ -0,0 +1,9 @@ + +// Copyright 2018 Peter Dimov. +// Distributed under the Boost Software License, Version 1.0. + +#include + +using namespace boost::system; + +static error_code e1( 1, system_category() ); diff --git a/test/after_main_test_2.cpp b/test/after_main_test_2.cpp new file mode 100644 index 0000000..7da78e6 --- /dev/null +++ b/test/after_main_test_2.cpp @@ -0,0 +1,10 @@ + +// Copyright 2018 Peter Dimov. +// Distributed under the Boost Software License, Version 1.0. + +#include +#include + +using namespace boost::system; + +static error_code e2( ENOENT, generic_category() );