From 040d576839907b2ac2f40a7efa1d32fcc93dc828 Mon Sep 17 00:00:00 2001 From: "Franz G. Fuchs" Date: Tue, 8 Jan 2019 13:26:19 +0100 Subject: [PATCH] Use angle brackets for includes verify that the tagged messages are forwarded correctly --- opm/simulators/DeferredLogger.cpp | 2 +- tests/test_deferredlogger.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/opm/simulators/DeferredLogger.cpp b/opm/simulators/DeferredLogger.cpp index 1f1240c3a..ef3eb806d 100644 --- a/opm/simulators/DeferredLogger.cpp +++ b/opm/simulators/DeferredLogger.cpp @@ -18,7 +18,7 @@ */ -#include "opm/simulators/DeferredLogger.hpp" +#include namespace Opm { diff --git a/tests/test_deferredlogger.cpp b/tests/test_deferredlogger.cpp index d770c6590..10954615f 100644 --- a/tests/test_deferredlogger.cpp +++ b/tests/test_deferredlogger.cpp @@ -62,7 +62,8 @@ BOOST_AUTO_TEST_CASE(deferredlogger) + Log::prefixMessage(Log::MessageType::Debug, "debug 1") + "\n" + Log::prefixMessage(Log::MessageType::Note, "note 1") + "\n" + Log::prefixMessage(Log::MessageType::Note, "note 2") + "\n" - + Log::prefixMessage(Log::MessageType::Note, "note 3") + "\n"; + + Log::prefixMessage(Log::MessageType::Note, "note 3") + "\n" + + Log::prefixMessage(Log::MessageType::Note, "Message limit reached for message tag: tagme") + "\n"; std::ostringstream log_stream; initLogger(log_stream); @@ -77,6 +78,11 @@ BOOST_AUTO_TEST_CASE(deferredlogger) deferredlogger.note("note 1"); deferredlogger.note("tagme", "note 2"); deferredlogger.note("tagme", "note 3"); + deferredlogger.note("tagme", "note 3"); + deferredlogger.note("tagme", "note 3"); + deferredlogger.note("tagme", "note 3"); + deferredlogger.note("tagme", "note 3"); + deferredlogger.note("tagme", "note 3"); deferredlogger.logMessages(); @@ -87,7 +93,7 @@ BOOST_AUTO_TEST_CASE(deferredlogger) BOOST_CHECK_EQUAL( 1 , counter->numMessages(Log::MessageType::Problem) ); BOOST_CHECK_EQUAL( 1 , counter->numMessages(Log::MessageType::Bug) ); BOOST_CHECK_EQUAL( 1 , counter->numMessages(Log::MessageType::Debug) ); - BOOST_CHECK_EQUAL( 3 , counter->numMessages(Log::MessageType::Note) ); + BOOST_CHECK_EQUAL( 8 , counter->numMessages(Log::MessageType::Note) ); BOOST_CHECK_EQUAL(log_stream.str(), expected);