[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 2fc9371 4/7: Use (default_)error_prefix in ot
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 2fc9371 4/7: Use (default_)error_prefix in other appropriate cases |
Date: |
Thu, 9 Feb 2017 19:49:26 -0500 (EST) |
branch: master
commit 2fc937146ad8f079403693de6c85cefed340f9e7
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Use (default_)error_prefix in other appropriate cases
Use default_error_prefix where literal asterisks had formerly been used.
Specifically use default_error_prefix instead of error_prefix for these
particular messages because they follow all client-defined tests and
therefore should never be overridden. This commit makes it possible to
replace each asterisk with another character, uniformly and robustly.
The "see stdout" message's suffixed asterisks were simply removed (there
is no need for any "error_suffix"); where its prefix had distinctively
more asterisks than other messages, default_error_prefix is inserted
twice, with a comment indicating that that is not a cut-and-pasto.
---
catch_exceptions.hpp | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/catch_exceptions.hpp b/catch_exceptions.hpp
index d55dc2b..9e29a42 100644
--- a/catch_exceptions.hpp
+++ b/catch_exceptions.hpp
@@ -78,7 +78,13 @@ namespace lmi_test
,char const* name
,char const* info
)
- {os << "\n** uncaught exception: " << name << " " << info << std::endl;}
+ {
+ os
+ << "\n" << default_error_prefix
+ << "uncaught exception: " << name << " " << info
+ << std::endl
+ ;
+ }
} // namespace detail
// catch_exceptions ------------------------------------------------------//
@@ -154,11 +160,13 @@ namespace lmi_test
{
out
<< std::endl
- << "**** returning with error code " << result
+ << default_error_prefix
+ << "returning with error code " << result
<< std::endl
;
err
- << "********** errors detected; see stdout for details
***********"
+ << default_error_prefix << default_error_prefix // Yes, twice.
+ << "errors detected; see stdout for details"
<< std::endl
;
}
- [lmi-commits] [lmi] master updated (39d1ed2 -> a306d67), Greg Chicares, 2017/02/09
- [lmi-commits] [lmi] master b15bc70 2/7: Declare error_prefix where all unit-test code can see it, Greg Chicares, 2017/02/09
- [lmi-commits] [lmi] master 169b029 1/7: Move error_prefix to a different namespace, Greg Chicares, 2017/02/09
- [lmi-commits] [lmi] master d4e4860 3/7: Define a default error prefix, Greg Chicares, 2017/02/09
- [lmi-commits] [lmi] master cd8ae33 5/7: Robustify, Greg Chicares, 2017/02/09
- [lmi-commits] [lmi] master 1f9ca3c 6/7: Add success_prefix to complement error_prefix, Greg Chicares, 2017/02/09
- [lmi-commits] [lmi] master a306d67 7/7: Use a more distinctive marker for test failures, Greg Chicares, 2017/02/09
- [lmi-commits] [lmi] master 2fc9371 4/7: Use (default_)error_prefix in other appropriate cases,
Greg Chicares <=