after_main_test.cpp 616 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2018 Peter Dimov.
  2. // Distributed under the Boost Software License, Version 1.0.
  3. #include <boost/system/error_code.hpp>
  4. #include <boost/core/lightweight_test.hpp>
  5. #include <boost/core/quick_exit.hpp>
  6. #include <cerrno>
  7. using namespace boost::system;
  8. struct Z
  9. {
  10. ~Z()
  11. {
  12. BOOST_TEST_CSTR_EQ( generic_category().name(), "generic" );
  13. BOOST_TEST_CSTR_EQ( system_category().name(), "system" );
  14. boost::quick_exit( boost::report_errors() );
  15. }
  16. };
  17. static Z z;
  18. static error_code e1( 1, system_category() );
  19. static error_code e2( ENOENT, generic_category() );
  20. int main()
  21. {
  22. }