File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1010#include < boost/test/test_tools.hpp>
1111#include < future>
1212
13+ #define CHECK_LOG_MESSAGE (pattern, timeout ) BOOST_CHECK(ExpectLogPattern(pattern, timeout))
14+ #define REQUIRE_LOG_MESSAGE (pattern, timeout ) BOOST_REQUIRE(ExpectLogPattern(pattern, timeout))
15+
16+ #define CHECK_NO_LOG_MESSAGE (pattern, timeout ) BOOST_CHECK(!ExpectLogPattern(pattern, timeout))
17+ #define REQUIRE_NO_LOG_MESSAGE (pattern, timeout ) BOOST_REQUIRE(!ExpectLogPattern(pattern, timeout))
18+
1319namespace icinga {
1420
1521class TestLogger : public Logger
@@ -52,6 +58,13 @@ class TestLogger : public Logger
5258 return ret;
5359 }
5460
61+ void Clear ()
62+ {
63+ std::lock_guard lock (m_Mutex);
64+ m_Expects.clear ();
65+ m_LogEntries.clear ();
66+ }
67+
5568private:
5669 void ProcessLogEntry (const LogEntry& entry) override
5770 {
You can’t perform that action at this time.
0 commit comments