BIND 10 master, updated. b3dd1982b72e5f4710e33266310180c71203ce0d [1892] Change EXPECT_ABORT to EXPECT_DEATH

BIND 10 source code commits bind10-changes at lists.isc.org
Tue May 8 15:11:42 UTC 2012


The branch, master has been updated
       via  b3dd1982b72e5f4710e33266310180c71203ce0d (commit)
       via  1c88a49755f6617184c45fe127f00ffec9e1b89d (commit)
      from  253701eb2cfbf5830f71c3b00e2254df6b4ecdef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b3dd1982b72e5f4710e33266310180c71203ce0d
Author: Mukund Sivaraman <muks at isc.org>
Date:   Tue May 8 20:30:43 2012 +0530

    [1892] Change EXPECT_ABORT to EXPECT_DEATH

commit 1c88a49755f6617184c45fe127f00ffec9e1b89d
Author: Mukund Sivaraman <muks at isc.org>
Date:   Tue May 8 20:30:25 2012 +0530

    [1892] Fix the message string in MismatchedPlaceholders exceptions

-----------------------------------------------------------------------

Summary of changes:
 src/lib/log/log_formatter.cc                |    4 ++--
 src/lib/log/tests/log_formatter_unittest.cc |   12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/log/log_formatter.cc b/src/lib/log/log_formatter.cc
index 3d140bc..885f499 100644
--- a/src/lib/log/log_formatter.cc
+++ b/src/lib/log/log_formatter.cc
@@ -37,7 +37,7 @@ replacePlaceholder(string* message, const string& arg,
     else {
         // We're missing the placeholder, so throw an exception
         isc_throw(MismatchedPlaceholders,
-		  "Missing logger placeholder in message: " << message);
+		  "Missing logger placeholder in message: " << *message);
     }
 #else
     else {
@@ -56,7 +56,7 @@ checkExcessPlaceholders(string* message, unsigned int placeholder)
     if (pos != string::npos) {
         // Excess placeholders were found, so throw an exception
         isc_throw(MismatchedPlaceholders,
-		  "Excess logger placeholders still exist in message: " << message);
+		  "Excess logger placeholders still exist in message: " << *message);
     }
 #endif /* ENABLE_LOGGER_CHECKS */
 }
diff --git a/src/lib/log/tests/log_formatter_unittest.cc b/src/lib/log/tests/log_formatter_unittest.cc
index 4f463c8..1aa7e4e 100644
--- a/src/lib/log/tests/log_formatter_unittest.cc
+++ b/src/lib/log/tests/log_formatter_unittest.cc
@@ -15,9 +15,9 @@
 #include "config.h"
 #include <gtest/gtest.h>
 
-#ifdef EXPECT_ABORT
+#ifdef EXPECT_DEATH
 #include <testutils/resource.h>
-#endif /* EXPECT_ABORT */
+#endif /* EXPECT_DEATH */
 
 #include <log/log_formatter.h>
 #include <log/logger_level.h>
@@ -102,21 +102,21 @@ TEST_F(FormatterTest, multiArg) {
 
 #ifdef ENABLE_LOGGER_CHECKS
 
-#ifdef EXPECT_ABORT
+#ifdef EXPECT_DEATH
 // Throws MismatchedPlaceholders exception if number of placeholders
 // don't match number of arguments. This causes it to abort.
 TEST_F(FormatterTest, mismatchedPlaceholders) {
-    EXPECT_ABORT({
+    EXPECT_DEATH({
         isc::testutils::dontCreateCoreDumps();
         Formatter(isc::log::INFO, s("Missing the first %2"), this).arg("missing").arg("argument");
     }, ".*");
 
-    EXPECT_ABORT({
+    EXPECT_DEATH({
         isc::testutils::dontCreateCoreDumps();
         Formatter(isc::log::INFO, s("Too many arguments in %1 %2"), this).arg("only one");
     }, ".*");
 }
-#endif /* EXPECT_ABORT */
+#endif /* EXPECT_DEATH */
 
 #else
 



More information about the bind10-changes mailing list