summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-12-03 16:36:37 -0800
committerPatrick Venture <venture@google.com>2018-12-03 20:17:08 -0800
commit41fbf0b0c228205828823dd98ce5a5181527c429 (patch)
tree50db1fe2c041c310f15195904115dcdfa3de0d9d
parente681bc4502b4af706bb5d3da08e710e2a286d663 (diff)
downloadphosphor-logging-41fbf0b0c228205828823dd98ce5a5181527c429.zip
phosphor-logging-41fbf0b0c228205828823dd98ce5a5181527c429.tar.gz
bugfix: add fixes to mock class
The mock class is only compiled when included. Add a missing semicolon to the class definition. The interface class was renamed, update the name from which the mock class derives. Tested: Added a local instance of the object that forces compilation. Change-Id: I65dd92e1e29d0cf0532ebe209b356d3d8fe4f1d8 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--phosphor-logging/test/sdjournal_mock.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/phosphor-logging/test/sdjournal_mock.hpp b/phosphor-logging/test/sdjournal_mock.hpp
index 3290480..b907bcc 100644
--- a/phosphor-logging/test/sdjournal_mock.hpp
+++ b/phosphor-logging/test/sdjournal_mock.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include <cstdarg>
#include <phosphor-logging/sdjournal.hpp>
#include <gmock/gmock.h>
@@ -9,7 +10,7 @@ namespace phosphor
namespace logging
{
-class SdJournalMock : public SdJournalImpl
+class SdJournalMock : public SdJournalHandler
{
public:
virtual ~SdJournalMock() = default;
@@ -18,10 +19,11 @@ class SdJournalMock : public SdJournalImpl
MOCK_METHOD1(journal_send_call, int(const char*));
int journal_send(const char* fmt, ...) override
+ __attribute__((format(printf, 2, 0))) __attribute__((sentinel))
{
return journal_send_call(fmt);
}
-}
+};
} // namespace logging
} // namespace phosphor
OpenPOWER on IntegriCloud