diff options
author | Daniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu> | 2010-05-28 08:44:32 -0700 |
---|---|---|
committer | Daniel Burrows <Daniel Burrows Daniel_Burrows@alumni.brown.edu> | 2010-05-28 08:44:32 -0700 |
commit | c8715ba94e80ae097d0084fd1297c8d37d8ce938 (patch) | |
tree | 50d91989b577aec77129c47736a9918a18ce3382 /tests/test_logging.cc | |
parent | 46a62378027c9e063c440cc8de55b353ea0ea982 (diff) | |
download | aptitude-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.cc | 9 |
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 |