1 #include "data_types.hpp"
2 
3 #include <array>
4 #include <string>
5 
6 #include <gtest/gtest.h>
7 
8 using namespace phosphor::dbus::monitoring;
9 
10 using Index = std::map<std::tuple<size_t, size_t, size_t>, size_t>;
11 
12 #include "callbackgentest.hpp"
13 
14 const std::array<std::tuple<std::string, size_t>, 4> expectedCallbacks = {{
15     std::tuple<std::string, size_t>{"int32_t", 0},
16     std::tuple<std::string, size_t>{"int32_t", 0},
17     std::tuple<std::string, size_t>{"std::string", 1},
18     std::tuple<std::string, size_t>{"std::string", 2},
19 }};
20 
TEST(CallbackGenTest,CallbacksSameSize)21 TEST(CallbackGenTest, CallbacksSameSize)
22 {
23     ASSERT_EQ(sizeof(expectedCallbacks), sizeof(callbacks));
24 }
25 
TEST(CallbackGenTest,CallbacksSameContent)26 TEST(CallbackGenTest, CallbacksSameContent)
27 {
28     size_t i;
29     for (i = 0; i < expectedCallbacks.size(); ++i)
30     {
31         ASSERT_EQ(callbacks[i], expectedCallbacks[i]);
32     }
33 }
34