[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 4997eae 2/3: Withdraw several disused BOOST m
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 4997eae 2/3: Withdraw several disused BOOST macros |
Date: |
Wed, 3 Mar 2021 08:01:58 -0500 (EST) |
branch: master
commit 4997eaec526fb46bb3b99f416a74323b34a36d02
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Withdraw several disused BOOST macros
---
test_tools.hpp | 35 +++--------------------------------
test_tools_test.cpp | 8 --------
2 files changed, 3 insertions(+), 40 deletions(-)
diff --git a/test_tools.hpp b/test_tools.hpp
index 9c015de..48ab5b5 100644
--- a/test_tools.hpp
+++ b/test_tools.hpp
@@ -284,10 +284,10 @@ namespace lmi_test
#include "cpp_main.cpp"
#include "test_main.cpp"
-// Deprecated macros.
+// Withdrawn macros.
//
-// Macros BOOST_ERROR, BOOST_CRITICAL_ERROR, and BOOST_CRITICAL_TEST
-// are provided only for backward compatibility, not because they're
+// Macros BOOST_ERROR, BOOST_CRITICAL_ERROR, and BOOST_CRITICAL_TEST,
+// formerly provided, have been withdrawn because they were never
// really useful. In boost-1.23.0, except for the testing framework's
// own unit tests, BOOST_ERROR and BOOST_CRITICAL_ERROR are used only
// once each and only in a single file, in the idiom
@@ -305,33 +305,4 @@ namespace lmi_test
// a good idea to skip the later tests--if any of them succeed, that's
// interesting.
-#define BOOST_CRITICAL_TEST(exp) \
- if(exp) \
- { \
- lmi_test::record_success(); \
- } \
- else \
- { \
- lmi_test::record_error(); \
- lmi_test::error_stream() \
- << (exp) \
- << BOOST_TEST_FLUSH \
- ; \
- throw lmi_test::test::test_tools_exception(); \
- } \
-
-#define BOOST_ERROR(exp) \
- lmi_test::record_error(); \
- lmi_test::error_stream() \
- << (exp) \
- << BOOST_TEST_FLUSH \
-
-#define BOOST_CRITICAL_ERROR(exp) \
- lmi_test::record_error(); \
- lmi_test::error_stream() \
- << (exp) \
- << BOOST_TEST_FLUSH \
- ; \
- throw lmi_test::test::test_tools_exception() \
-
#endif // test_tools_hpp
diff --git a/test_tools_test.cpp b/test_tools_test.cpp
index 5cbad07..a4bd61f 100644
--- a/test_tools_test.cpp
+++ b/test_tools_test.cpp
@@ -68,14 +68,6 @@ int test_main(int, char*[])
test_function(always_true , always_true, __FILE__, __LINE__);
test_function(always_false, always_true, __FILE__, __LINE__);
- try
- {
- BOOST_CRITICAL_TEST(always_true);
- BOOST_CRITICAL_TEST(always_false);
- }
- catch(lmi_test::test::test_tools_exception const&)
- {
- }
BOOST_TEST_THROW((void)(0), std::runtime_error, "arbitrary");
BOOST_TEST_THROW(;, std::runtime_error, "arbitrary");