Skip to content

Commit 3180549

Browse files
committed
Sync from upstream.
2 parents 48cb734 + aeeb091 commit 3180549

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
lines changed

example/unit_test_example_16.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ bool init_unit_test()
2020
#if (!defined(BOOST_TEST_DYN_LINK) || (!defined(BOOST_CLANG) || (BOOST_CLANG != 1) || (__clang_major__ >= 8))) && !defined(__APPLE__)
2121
log_level logLevel = runtime_config::get<log_level>(runtime_config::btrt_log_level);
2222
std::cout << "Current log level: " << static_cast<int>(logLevel) << std::endl;
23+
output_format logFormat = runtime_config::get<output_format>(runtime_config::btrt_log_format);
24+
std::cout << "Current log format: " << static_cast<int>(logFormat) << std::endl;
25+
report_level reportLevel = runtime_config::get<report_level>(runtime_config::btrt_report_level);
26+
std::cout << "Current report level: " << static_cast<int>(reportLevel) << std::endl;
2327
#endif
2428
return true;
2529
}

include/boost/test/detail/global_typedef.hpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,21 @@ typedef unsigned long counter_t;
2929

3030
//____________________________________________________________________________//
3131

32-
enum report_level { INV_REPORT_LEVEL, CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT };
32+
enum BOOST_SYMBOL_VISIBLE report_level { INV_REPORT_LEVEL,
33+
CONFIRMATION_REPORT,
34+
SHORT_REPORT,
35+
DETAILED_REPORT,
36+
NO_REPORT };
3337

3438
//____________________________________________________________________________//
3539

3640
//! Indicates the output format for the loggers or the test tree printing
37-
enum output_format { OF_INVALID,
38-
OF_CLF, ///< compiler log format
39-
OF_XML, ///< XML format for report and log,
40-
OF_JUNIT, ///< JUNIT format for report and log,
41-
OF_CUSTOM_LOGGER, ///< User specified logger.
42-
OF_DOT ///< dot format for output content
41+
enum BOOST_SYMBOL_VISIBLE output_format { OF_INVALID,
42+
OF_CLF, ///< compiler log format
43+
OF_XML, ///< XML format for report and log,
44+
OF_JUNIT, ///< JUNIT format for report and log,
45+
OF_CUSTOM_LOGGER, ///< User specified logger.
46+
OF_DOT ///< dot format for output content
4347
};
4448

4549
//____________________________________________________________________________//

include/boost/test/tools/detail/fwd.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ class assertion_result;
4242

4343
namespace tt_detail {
4444

45-
inline bool dummy_cond() { return false; }
46-
4745
// ************************************************************************** //
4846
// ************** types of supported assertions ************** //
4947
// ************************************************************************** //

include/boost/test/tools/interface.hpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ do { \
5555
::boost::test_tools::tt_detail::level, \
5656
::boost::test_tools::tt_detail::CHECK_MSG, \
5757
0 ); \
58-
} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
58+
} while( 0 ) \
5959
/**/
6060

6161
//____________________________________________________________________________//
@@ -74,7 +74,7 @@ do { \
7474
::boost::test_tools::tt_detail::level, \
7575
::boost::test_tools::tt_detail::CHECK_BUILT_ASSERTION, \
7676
0 ); \
77-
} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
77+
} while( 0 ) \
7878
/**/
7979

8080
//____________________________________________________________________________//
@@ -98,7 +98,7 @@ do { \
9898
::boost::test_tools::tt_detail::assertion_type() \
9999
<< arg, \
100100
0 ); \
101-
} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
101+
} while( 0 ) \
102102
/**/
103103

104104
//____________________________________________________________________________//
@@ -121,7 +121,7 @@ do { \
121121
BOOST_TEST_TOOL_DIRECT_IMPL( P, level, BOOST_TEST_STRINGIZE( P ) ); \
122122
else \
123123
BOOST_TEST_TOOL_ET_IMPL( P, level ); \
124-
} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
124+
} while( 0 ) \
125125
/**/
126126

127127
#define BOOST_TEST_TOOL_UNIV_EX( level, P, ... ) \
@@ -177,7 +177,7 @@ do { try { \
177177
BOOST_TEST_TOOL_DIRECT_IMPL( Ppassed, TL, Mpassed ); \
178178
} catch( E ) { \
179179
BOOST_TEST_TOOL_DIRECT_IMPL( Pcaught, TL, Mcaught ); \
180-
}} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
180+
}} while( 0 ) \
181181
/**/
182182

183183
#elif defined(BOOST_TEST_TOOLS_DEBUGGABLE)
@@ -190,7 +190,7 @@ do { try { \
190190
BOOST_TEST_TOOL_DIRECT_IMPL( Ppassed, TL, Mpassed ); \
191191
} catch( E ) { \
192192
BOOST_TEST_TOOL_DIRECT_IMPL( Pcaught, TL, Mcaught ); \
193-
}} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
193+
}} while( 0 ) \
194194
/**/
195195

196196
#else
@@ -202,7 +202,7 @@ do { try { \
202202
BOOST_TEST_TOOL_DIRECT_IMPL( Ppassed, TL, Mpassed ); \
203203
} catch( E ) { \
204204
BOOST_TEST_TOOL_DIRECT_IMPL( Pcaught, TL, Mcaught ); \
205-
}} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
205+
}} while( 0 ) \
206206
/**/
207207

208208
#endif

include/boost/test/tools/old/interface.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ do {
7272
::boost::test_tools::tt_detail::TL, \
7373
::boost::test_tools::tt_detail::CT \
7474
BOOST_JOIN( BOOST_TEST_TOOL_PASS_ARGS, frwd_type )( ARGS ) ); \
75-
} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
75+
} while( 0 ) \
7676
/**/
7777

7878
//____________________________________________________________________________//
@@ -110,7 +110,7 @@ do {
110110
"exception \"" BOOST_STRINGIZE( E )"\" raised as expected" postfix, \
111111
TL, CHECK_MSG, _ ); \
112112
} \
113-
} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
113+
} while( 0 ) \
114114
/**/
115115

116116
//____________________________________________________________________________//
@@ -140,7 +140,7 @@ do {
140140
BOOST_TEST_TOOL_IMPL( 2, false, "unexpected exception thrown by " BOOST_STRINGIZE( S ), \
141141
TL, CHECK_MSG, _ ); \
142142
} \
143-
} while( ::boost::test_tools::tt_detail::dummy_cond() ) \
143+
} while( 0 ) \
144144
/**/
145145

146146
#define BOOST_WARN_NO_THROW( S ) BOOST_CHECK_NO_THROW_IMPL( S, WARN )

0 commit comments

Comments
 (0)