Brad Bishop | 731171a | 2017-05-25 21:49:32 -0400 | [diff] [blame] | 1 | #include <array> |
| 2 | #include <string> |
| 3 | #include <gtest/gtest.h> |
| 4 | #include "data_types.hpp" |
| 5 | |
| 6 | using namespace phosphor::dbus::monitoring; |
| 7 | |
| 8 | #include "callbackgroupgentest.hpp" |
| 9 | |
| 10 | const std::array<std::vector<size_t>, 4> expectedGroups = {{ |
Gunnar Mills | 937df1a | 2017-08-15 12:39:04 -0500 | [diff] [blame] | 11 | {0, 1, 2, 3}, |
| 12 | {0, 1, 4}, |
| 13 | {2, 6, 7}, |
| 14 | {7}, |
Brad Bishop | 731171a | 2017-05-25 21:49:32 -0400 | [diff] [blame] | 15 | } |
| 16 | }; |
| 17 | |
| 18 | TEST(CallbackGroupGenTest, GroupsSameSize) |
| 19 | { |
| 20 | ASSERT_EQ(sizeof(expectedGroups), sizeof(groups)); |
| 21 | } |
| 22 | |
| 23 | TEST(CallbackGroupGenTest, GroupsSameContent) |
| 24 | { |
| 25 | size_t i; |
| 26 | for (i = 0; i < expectedGroups.size(); ++i) |
| 27 | { |
| 28 | ASSERT_EQ(groups[i], |
| 29 | expectedGroups[i]); |
| 30 | } |
| 31 | } |