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 using Index = std::map<std::tuple<size_t, size_t, size_t>, size_t>; 9 10 #include "callbackgentest.hpp" 11 12 const std::array<std::tuple<std::string, size_t>, 4> expectedCallbacks = {{ 13 std::tuple<std::string, size_t>{"int32_t", 0}, 14 std::tuple<std::string, size_t>{"int32_t", 0}, 15 std::tuple<std::string, size_t>{"std::string", 1}, 16 std::tuple<std::string, size_t>{"std::string", 2}, 17 }}; 18 19 TEST(CallbackGenTest, CallbacksSameSize) 20 { 21 ASSERT_EQ(sizeof(expectedCallbacks), sizeof(callbacks)); 22 } 23 24 TEST(CallbackGenTest, CallbacksSameContent) 25 { 26 size_t i; 27 for (i = 0; i < expectedCallbacks.size(); ++i) 28 { 29 ASSERT_EQ(callbacks[i], expectedCallbacks[i]); 30 } 31 } 32