summaryrefslogtreecommitdiff
path: root/tests/test_logging.cc
diff options
context:
space:
mode:
authorDaniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu>2010-05-28 08:44:32 -0700
committerDaniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu>2010-05-28 08:44:32 -0700
commitc8715ba94e80ae097d0084fd1297c8d37d8ce938 (patch)
tree50d91989b577aec77129c47736a9918a18ce3382 /tests/test_logging.cc
parent46a62378027c9e063c440cc8de55b353ea0ea982 (diff)
downloadaptitude-c8715ba94e80ae097d0084fd1297c8d37d8ce938.tar.gz
Implement operator<< on LoggerPtr, for better dumping of test errors.
Diffstat (limited to 'tests/test_logging.cc')
-rw-r--r--tests/test_logging.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_logging.cc b/tests/test_logging.cc
index accab72d..80836a3a 100644
--- a/tests/test_logging.cc
+++ b/tests/test_logging.cc
@@ -41,6 +41,15 @@ using testing::InSequence;
using testing::StrictMock;
using testing::_;
+// Enable dumping of loggers in tests.
+std::ostream &operator<<(std::ostream &out,
+ const LoggerPtr &logger)
+{
+ return out << "Logger("
+ << logger->getCategory()
+ << ")";
+}
+
// Test of the logging code in src/generic/util/logging.{cc,h}.
namespace