Boost logo

Boost :

From: Markus Schöpflin (markus.schoepflin_at_[hidden])
Date: 2004-08-17 10:51:52


Hello,

attached is a patch which makes boost.test work for the beforementioned
toolset. It contains a workaround for the internal compiler error currently
preventing any tests from running. Could anyone please apply it, if it's ok?

Thanks, Markus

diff -ru boost-04-08-17-0400/boost/test/detail/basic_cstring/basic_cstring_fwd.hpp boost-cvs/boost/test/detail/basic_cstring/basic_cstring_fwd.hpp
--- boost-04-08-17-0400/boost/test/detail/basic_cstring/basic_cstring_fwd.hpp 2004-07-19 14:28:17.000000000 +0200
+++ boost-cvs/boost/test/detail/basic_cstring/basic_cstring_fwd.hpp 2004-08-17 17:39:02.000000000 +0200
@@ -16,13 +16,21 @@
 #ifndef BASIC_CSTRING_FWD_HPP_071894GER
 #define BASIC_CSTRING_FWD_HPP_071894GER
 
+#include <boost/detail/workaround.hpp>
+
 namespace boost {
 
 namespace unit_test {
 
 template<class CharT> class basic_cstring;
 typedef basic_cstring<char const> const_string;
+
+#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590041))
+typedef const_string literal_string;
+#else
 typedef const_string const literal_string;
+#endif
+
 typedef char const* const c_literal_string;
 
 } // namespace unit_test
diff -ru boost-04-08-17-0400/boost/test/detail/unit_test_parameters.hpp boost-cvs/boost/test/detail/unit_test_parameters.hpp
--- boost-04-08-17-0400/boost/test/detail/unit_test_parameters.hpp 2004-07-19 14:24:32.000000000 +0200
+++ boost-cvs/boost/test/detail/unit_test_parameters.hpp 2004-08-17 17:33:31.000000000 +0200
@@ -25,19 +25,41 @@
 namespace unit_test {
 
 // framework parameters and there corresponding command-line arguments
-literal_string LOG_LEVEL = "BOOST_TEST_LOG_LEVEL"; // --log_level
-literal_string NO_RESULT_CODE = "BOOST_TEST_RESULT_CODE"; // --result_code
-literal_string REPORT_LEVEL = "BOOST_TEST_REPORT_LEVEL"; // --report_level
-literal_string TESTS_TO_RUN = "BOOST_TESTS_TO_RUN"; // --run_test
-literal_string SAVE_TEST_PATTERN = "BOOST_TEST_SAVE_PATTERN"; // --save_pattern
-literal_string BUILD_INFO = "BOOST_TEST_BUILD_INFO"; // --build_info
-literal_string CATCH_SYS_ERRORS = "BOOST_TEST_CATCH_SYSTEM_ERRORS"; // --catch_system_errors
-literal_string REPORT_FORMAT = "BOOST_TEST_REPORT_FORMAT"; // --report_format
-literal_string LOG_FORMAT = "BOOST_TEST_LOG_FORMAT"; // --log_format
-literal_string OUTPUT_FORMAT = "BOOST_TEST_OUTPUT_FORMAT"; // --output_format
-
-enum report_level { CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT, UNDEF_REPORT };
-literal_string report_level_names[] = { "confirm" , "short" , "detailed" , "no" };
+#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590041))
+// Needed because literal_string must not be const, you get multiple defined
+// symbols otherwise. (see 'basic_cstring_fwd.hpp') As an alternative,
+// 'c_literal_string' could be replaced by 'literal_string const' as well.
+c_literal_string LOG_LEVEL = "BOOST_TEST_LOG_LEVEL"; // --log_level
+c_literal_string NO_RESULT_CODE = "BOOST_TEST_RESULT_CODE"; // --result_code
+c_literal_string REPORT_LEVEL = "BOOST_TEST_REPORT_LEVEL"; // --report_level
+c_literal_string TESTS_TO_RUN = "BOOST_TESTS_TO_RUN"; // --run_test
+c_literal_string SAVE_TEST_PATTERN = "BOOST_TEST_SAVE_PATTERN"; // --save_pattern
+c_literal_string BUILD_INFO = "BOOST_TEST_BUILD_INFO"; // --build_info
+c_literal_string CATCH_SYS_ERRORS = "BOOST_TEST_CATCH_SYSTEM_ERRORS"; // --catch_system_errors
+c_literal_string REPORT_FORMAT = "BOOST_TEST_REPORT_FORMAT"; // --report_format
+c_literal_string LOG_FORMAT = "BOOST_TEST_LOG_FORMAT"; // --log_format
+c_literal_string OUTPUT_FORMAT = "BOOST_TEST_OUTPUT_FORMAT"; // --output_format
+#else
+literal_string LOG_LEVEL = "BOOST_TEST_LOG_LEVEL"; // --log_level
+literal_string NO_RESULT_CODE = "BOOST_TEST_RESULT_CODE"; // --result_code
+literal_string REPORT_LEVEL = "BOOST_TEST_REPORT_LEVEL"; // --report_level
+literal_string TESTS_TO_RUN = "BOOST_TESTS_TO_RUN"; // --run_test
+literal_string SAVE_TEST_PATTERN = "BOOST_TEST_SAVE_PATTERN"; // --save_pattern
+literal_string BUILD_INFO = "BOOST_TEST_BUILD_INFO"; // --build_info
+literal_string CATCH_SYS_ERRORS = "BOOST_TEST_CATCH_SYSTEM_ERRORS"; // --catch_system_errors
+literal_string REPORT_FORMAT = "BOOST_TEST_REPORT_FORMAT"; // --report_format
+literal_string LOG_FORMAT = "BOOST_TEST_LOG_FORMAT"; // --log_format
+literal_string OUTPUT_FORMAT = "BOOST_TEST_OUTPUT_FORMAT"; // --output_format
+#endif
+
+enum report_level { CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT, UNDEF_REPORT };
+
+#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590041))
+// See comment on workaround above.
+c_literal_string report_level_names[] = { "confirm" , "short" , "detailed" , "no" };
+#else
+literal_string report_level_names[] = { "confirm" , "short" , "detailed" , "no" };
+#endif
 
 enum output_format { HRF /* human readable format */, XML /* XML */ };
 


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk