summaryrefslogtreecommitdiffstats
path: root/test/serialization_test_path.cpp
blob: 379b12479ff9c40b59913422d2289d4f2d6dca3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "elog_entry.hpp"
#include "elog_serialize.hpp"
#include "serialization_tests.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