From acbccbecd276369976f53f72fb433f6af600d11a Mon Sep 17 00:00:00 2001 From: Wataru Matsumoto Date: Wed, 25 Sep 2024 07:11:23 +0800 Subject: [PATCH] Add BOOST_SYMBOL_VISIBLE to enum --- example/unit_test_example_16.cpp | 4 ++++ include/boost/test/detail/global_typedef.hpp | 18 +++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/example/unit_test_example_16.cpp b/example/unit_test_example_16.cpp index fe239a9006..57e37b7f5d 100644 --- a/example/unit_test_example_16.cpp +++ b/example/unit_test_example_16.cpp @@ -20,6 +20,10 @@ bool init_unit_test() #if (!defined(BOOST_TEST_DYN_LINK) || (!defined(BOOST_CLANG) || (BOOST_CLANG != 1) || (__clang_major__ >= 8))) && !defined(__APPLE__) log_level logLevel = runtime_config::get(runtime_config::btrt_log_level); std::cout << "Current log level: " << static_cast(logLevel) << std::endl; + output_format logFormat = runtime_config::get(runtime_config::btrt_log_format); + std::cout << "Current log format: " << static_cast(logFormat) << std::endl; + report_level reportLevel = runtime_config::get(runtime_config::btrt_report_level); + std::cout << "Current report level: " << static_cast(reportLevel) << std::endl; #endif return true; } diff --git a/include/boost/test/detail/global_typedef.hpp b/include/boost/test/detail/global_typedef.hpp index 5e6f960737..19621ad679 100644 --- a/include/boost/test/detail/global_typedef.hpp +++ b/include/boost/test/detail/global_typedef.hpp @@ -29,17 +29,21 @@ typedef unsigned long counter_t; //____________________________________________________________________________// -enum report_level { INV_REPORT_LEVEL, CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT }; +enum BOOST_SYMBOL_VISIBLE report_level { INV_REPORT_LEVEL, + CONFIRMATION_REPORT, + SHORT_REPORT, + DETAILED_REPORT, + NO_REPORT }; //____________________________________________________________________________// //! Indicates the output format for the loggers or the test tree printing -enum output_format { OF_INVALID, - OF_CLF, ///< compiler log format - OF_XML, ///< XML format for report and log, - OF_JUNIT, ///< JUNIT format for report and log, - OF_CUSTOM_LOGGER, ///< User specified logger. - OF_DOT ///< dot format for output content +enum BOOST_SYMBOL_VISIBLE output_format { OF_INVALID, + OF_CLF, ///< compiler log format + OF_XML, ///< XML format for report and log, + OF_JUNIT, ///< JUNIT format for report and log, + OF_CUSTOM_LOGGER, ///< User specified logger. + OF_DOT ///< dot format for output content }; //____________________________________________________________________________//