1 // Copyright 2020 Peter Dimov 2 // Distributed under the Boost Software License, Version 1.0. 3 // https://www.boost.org/LICENSE_1_0.txt 4 5 #include <boost/system/cygwin_error.hpp> 6 #include <boost/config/pragma_message.hpp> 7 8 #if !defined(__CYGWIN__) 9 10 BOOST_PRAGMA_MESSAGE( "Skipping test, __CYGWIN__ is not defined" ) main()11int main() {} 12 13 #else 14 15 #include <boost/core/lightweight_test.hpp> 16 main()17int main() 18 { 19 namespace sys = boost::system; 20 21 sys::error_code ec = sys::cygwin_error::no_package; 22 23 BOOST_TEST_EQ( ec, sys::cygwin_error::no_package ); 24 BOOST_TEST_EQ( ec, sys::error_code( ENOPKG, sys::system_category() ) ); 25 26 return boost::report_errors(); 27 } 28 29 #endif 30