19 #ifndef INCLUDE_RCF_TEST_PRINTTESTHEADER
20 #define INCLUDE_RCF_TEST_PRINTTESTHEADER
26 #include <RCF/Config.hpp>
27 #include <RCF/test/Test.hpp>
28 #include <boost/version.hpp>
30 #include <RCF/Asio.hpp>
33 #pragma warning( push )
34 #pragma warning( disable : 4996 ) // warning C4996: '' was declared deprecated
37 inline void printTestHeader(
const char *file)
39 std::cout <<
"\n*********************\n";
41 std::cout <<
"Compiler: ";
43 #if defined(_MSC_VER) && _MSC_VER == 1200
44 std::cout <<
"Visual C++ 6";
45 #elif defined(_MSC_VER) && _MSC_VER == 1310
46 std::cout <<
"Visual C++ 7.1";
47 #elif defined(_MSC_VER) && _MSC_VER == 1400
48 std::cout <<
"Visual C++ 8.0";
49 #elif defined(_MSC_VER) && _MSC_VER == 1500
50 std::cout <<
"Visual C++ 9.0";
51 #elif defined(_MSC_VER) && _MSC_VER == 1600
52 std::cout <<
"Visual C++ 10.0";
53 #elif defined(_MSC_VER) && _MSC_VER == 1700
54 std::cout <<
"Visual C++ 11.0";
55 #elif defined(_MSC_VER)
56 std::cout <<
"Visual C++ <<<version>>> - " <<
"_MSC_VER is " << _MSC_VER;
60 std::cout <<
"gcc " << __GNUC__ <<
"." << __GNUC_MINOR__;
63 #if defined(__BORLANDC__)
64 std::cout <<
"Borland C++ - __BORLANDC__ is " << __BORLANDC__;
67 std::cout << std::endl;
68 std::cout <<
"Architecture (bits): " << 8*
sizeof(
void*) << std::endl;
70 #if !defined(NDEBUG) || defined(_DEBUG)
71 std::cout <<
"Debug build" << std::endl;
73 std::cout <<
"Release build" << std::endl;
77 std::cout <<
"\n*********************\n";
78 std::cout << file << std::endl;
79 time_t now = time(NULL);
80 std::cout <<
"Time now: " << std::string(ctime(&now));
81 std::cout <<
"Current working directory: " << RCF::getWorkingDir() << std::endl;
82 std::cout <<
"Relative path to test data: " << RCF::getRelativeTestDataPath() << std::endl;
84 std::cout <<
"Defines:" << std::endl;
86 std::cout <<
"BOOST_VERSION: " << BOOST_VERSION << std::endl;
88 #ifdef RCF_USE_BOOST_ASIO
89 std::cout <<
"BOOST_ASIO_VERSION: " << BOOST_ASIO_VERSION << std::endl;
91 #if defined(BOOST_ASIO_HAS_IOCP)
92 std::cout <<
"BOOST_ASIO_HAS_IOCP" << std::endl;
93 #elif defined(BOOST_ASIO_HAS_EPOLL)
94 std::cout <<
"BOOST_ASIO_HAS_EPOLL" << std::endl;
95 #elif defined(BOOST_ASIO_HAS_KQUEUE)
96 std::cout <<
"BOOST_ASIO_HAS_KQUEUE" << std::endl;
97 #elif defined(BOOST_ASIO_HAS_DEV_POLL)
98 std::cout <<
"BOOST_ASIO_HAS_DEV_POLL" << std::endl;
100 std::cout <<
"BOOST_ASIO_HAS_*** - using select()" << std::endl;
104 std::cout <<
"ASIO_VERSION: " << ASIO_VERSION << std::endl;
106 #if defined(ASIO_HAS_IOCP)
107 std::cout <<
"ASIO_HAS_IOCP" << std::endl;
108 #elif defined(ASIO_HAS_EPOLL)
109 std::cout <<
"ASIO_HAS_EPOLL" << std::endl;
110 #elif defined(ASIO_HAS_KQUEUE)
111 std::cout <<
"ASIO_HAS_KQUEUE" << std::endl;
112 #elif defined(ASIO_HAS_DEV_POLL)
113 std::cout <<
"ASIO_HAS_DEV_POLL" << std::endl;
115 std::cout <<
"ASIO_HAS_*** - using select()" << std::endl;
120 std::cout <<
"RCF_MAX_METHOD_COUNT: " << RCF_MAX_METHOD_COUNT << std::endl;
122 std::cout <<
"RCF_FEATURE_LEGACY: : " << RCF_FEATURE_LEGACY << std::endl;
124 std::cout <<
"RCF_FEATURE_SF: : " << RCF_FEATURE_SF << std::endl;
126 std::cout <<
"RCF_FEATURE_BOOST_SERIALIZATION : " << RCF_FEATURE_BOOST_SERIALIZATION << std::endl;
128 std::cout <<
"RCF_FEATURE_ZLIB : " << RCF_FEATURE_ZLIB << std::endl;
130 std::cout <<
"RCF_FEATURE_OPENSSL : " << RCF_FEATURE_OPENSSL << std::endl;
132 std::cout <<
"RCF_FEATURE_FILETRANSFER : " << RCF_FEATURE_FILETRANSFER << std::endl;
134 std::cout <<
"RCF_FEATURE_JSON : " << RCF_FEATURE_JSON << std::endl;
136 std::cout <<
"RCF_FEATURE_IPV6 : " << RCF_FEATURE_IPV6 << std::endl;
138 std::cout <<
"RCF_FEATURE_PROTOBUF : " << RCF_FEATURE_PROTOBUF << std::endl;
140 std::cout <<
"RCF_FEATURE_CUSTOM_ALLOCATOR : " << RCF_FEATURE_CUSTOM_ALLOCATOR << std::endl;
142 std::cout <<
"*********************\n\n";
146 #pragma warning( pop )
150 #endif // ! INCLUDE_RCF_TEST_PRINTTESTHEADER