Browse Source

[1880] Add dontCreateCoreDumps() to EXPECT_ABORT tests

Mukund Sivaraman 13 years ago
parent
commit
0a05819f8a
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/lib/log/tests/log_formatter_unittest.cc

+ 6 - 1
src/lib/log/tests/log_formatter_unittest.cc

@@ -14,6 +14,9 @@
 
 
 #include "config.h"
 #include "config.h"
 #include <gtest/gtest.h>
 #include <gtest/gtest.h>
+#ifdef EXPECT_ABORT
+#include <testutils/resource.h>
+#endif /* EXPECT_ABORT */
 #include <log/log_formatter.h>
 #include <log/log_formatter.h>
 #include <log/logger_level.h>
 #include <log/logger_level.h>
 
 
@@ -102,11 +105,13 @@ TEST_F(FormatterTest, multiArg) {
 // don't match number of arguments. This causes it to abort.
 // don't match number of arguments. This causes it to abort.
 TEST_F(FormatterTest, mismatchedPlaceholders) {
 TEST_F(FormatterTest, mismatchedPlaceholders) {
     EXPECT_ABORT({
     EXPECT_ABORT({
+        isc::testutils::dontCreateCoreDumps();
         Formatter(isc::log::INFO, s("Missing the first %2"), this).arg("missing").arg("argument");
         Formatter(isc::log::INFO, s("Missing the first %2"), this).arg("missing").arg("argument");
     }, ".*");
     }, ".*");
 
 
     EXPECT_ABORT({
     EXPECT_ABORT({
-	Formatter(isc::log::INFO, s("Too many arguments in %1 %2"), this).arg("only one");
+        isc::testutils::dontCreateCoreDumps();
+        Formatter(isc::log::INFO, s("Too many arguments in %1 %2"), this).arg("only one");
     }, ".*");
     }, ".*");
 }
 }
 #endif /* EXPECT_ABORT */
 #endif /* EXPECT_ABORT */