summaryrefslogtreecommitdiffstats
path: root/test/sdtest.cpp
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-12-03 19:09:55 -0800
committerPatrick Venture <venture@google.com>2018-12-04 14:47:54 -0800
commit31552c05e2b7066e923389dc4bba421d0fbcf2df (patch)
treefb0d09dfc39329d1ad01dc33e0c63a1ca0ea4f50 /test/sdtest.cpp
parent7bb7a774544ca81b7a747f3014d3c23ce25ea848 (diff)
downloadphosphor-logging-31552c05e2b7066e923389dc4bba421d0fbcf2df.tar.gz
phosphor-logging-31552c05e2b7066e923389dc4bba421d0fbcf2df.zip
test: add test to force building of sdjournal mock
Add test to force building of sdjournal mock. This will ensure it won't break down chain users later. Change-Id: Ida9745595af251df800ec8e98abaa39728c9ba86 Signed-off-by: Patrick Venture <venture@google.com>
Diffstat (limited to 'test/sdtest.cpp')
-rw-r--r--test/sdtest.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/sdtest.cpp b/test/sdtest.cpp
new file mode 100644
index 0000000..82cf511
--- /dev/null
+++ b/test/sdtest.cpp
@@ -0,0 +1,16 @@
+#include <phosphor-logging/test/sdjournal_mock.hpp>
+
+namespace phosphor
+{
+namespace logging
+{
+
+TEST(LoggingSwapTest, BasicTestToEnsureItCompiles)
+{
+ SdJournalMock mockInstance;
+ auto* old = SwapJouralHandler(&mockInstance);
+ SwapJouralHandler(old);
+}
+
+} // namespace logging
+} // namespace phosphor
OpenPOWER on IntegriCloud