blob: fe760eccdccb314b49bf8b2dbad4116a77ee284a [file] [log] [blame]
Brad Bishop731171a2017-05-25 21:49:32 -04001#include <array>
2#include <string>
3#include <gtest/gtest.h>
4#include "data_types.hpp"
5
6using namespace phosphor::dbus::monitoring;
7
8#include "callbackgroupgentest.hpp"
9
10const std::array<std::vector<size_t>, 4> expectedGroups = {{
Brad Bishopd1eac882018-03-29 10:34:05 -040011 {0, 1, 2, 3},
12 {0, 1, 4},
13 {2, 6, 7},
14 {7},
15}};
Brad Bishop731171a2017-05-25 21:49:32 -040016
17TEST(CallbackGroupGenTest, GroupsSameSize)
18{
19 ASSERT_EQ(sizeof(expectedGroups), sizeof(groups));
20}
21
22TEST(CallbackGroupGenTest, GroupsSameContent)
23{
24 size_t i;
25 for (i = 0; i < expectedGroups.size(); ++i)
26 {
Brad Bishopd1eac882018-03-29 10:34:05 -040027 ASSERT_EQ(groups[i], expectedGroups[i]);
Brad Bishop731171a2017-05-25 21:49:32 -040028 }
29}