summaryrefslogtreecommitdiffstats
path: root/src/test/callbackgroupgentest.cpp
blob: 311229517d5e99ab4db83032e94a7337216b039e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <array>
#include <string>
#include <gtest/gtest.h>
#include "data_types.hpp"

using namespace phosphor::dbus::monitoring;

#include "callbackgroupgentest.hpp"

const std::array<std::vector<size_t>, 4> expectedGroups = {{
        {0, 1, 2, 3},
        {0, 1, 4},
        {2, 6, 7},
        {7},
    }
};

TEST(CallbackGroupGenTest, GroupsSameSize)
{
    ASSERT_EQ(sizeof(expectedGroups), sizeof(groups));
}

TEST(CallbackGroupGenTest, GroupsSameContent)
{
    size_t i;
    for (i = 0; i < expectedGroups.size(); ++i)
    {
        ASSERT_EQ(groups[i],
                  expectedGroups[i]);
    }
}
OpenPOWER on IntegriCloud