blob: 64811d7737fc6c37fda5c8780db54c9c9fd164ce [file] [log] [blame]
Patrick Venture3d6d3182018-08-31 09:33:09 -07001#include "data_types.hpp"
2
Brad Bishop731171a2017-05-25 21:49:32 -04003#include <array>
4#include <string>
Patrick Venture3d6d3182018-08-31 09:33:09 -07005
Brad Bishop731171a2017-05-25 21:49:32 -04006#include <gtest/gtest.h>
Brad Bishop731171a2017-05-25 21:49:32 -04007
8using namespace phosphor::dbus::monitoring;
9
10#include "callbackgroupgentest.hpp"
11
12const std::array<std::vector<size_t>, 4> expectedGroups = {{
Brad Bishopd1eac882018-03-29 10:34:05 -040013 {0, 1, 2, 3},
14 {0, 1, 4},
15 {2, 6, 7},
16 {7},
17}};
Brad Bishop731171a2017-05-25 21:49:32 -040018
19TEST(CallbackGroupGenTest, GroupsSameSize)
20{
21 ASSERT_EQ(sizeof(expectedGroups), sizeof(groups));
22}
23
24TEST(CallbackGroupGenTest, GroupsSameContent)
25{
26 size_t i;
27 for (i = 0; i < expectedGroups.size(); ++i)
28 {
Brad Bishopd1eac882018-03-29 10:34:05 -040029 ASSERT_EQ(groups[i], expectedGroups[i]);
Brad Bishop731171a2017-05-25 21:49:32 -040030 }
31}