summaryrefslogtreecommitdiffstats
path: root/test/serialization_test_path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/serialization_test_path.cpp')
-rw-r--r--test/serialization_test_path.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/serialization_test_path.cpp b/test/serialization_test_path.cpp
new file mode 100644
index 0000000..50e7d08
--- /dev/null
+++ b/test/serialization_test_path.cpp
@@ -0,0 +1,28 @@
+#include "serialization_tests.hpp"
+#include "elog_entry.hpp"
+#include "elog_serialize.hpp"
+
+namespace phosphor
+{
+namespace logging
+{
+namespace test
+{
+
+TEST_F(TestSerialization, testPath)
+{
+ auto id = 99;
+ auto e = std::make_unique<Entry>(
+ bus,
+ std::string(OBJ_ENTRY) + '/' + std::to_string(id),
+ id,
+ manager);
+ auto path = serialize(*e, TestSerialization::dir);
+ EXPECT_EQ(path.c_str(), TestSerialization::dir / std::to_string(id));
+}
+
+} // namespace test
+} // namespace logging
+} // namespace phosphor
+
+
OpenPOWER on IntegriCloud