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 { 14 { 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 }; 21 22 TEST(CallbackGenTest, CallbacksSameSize) 23 { 24 ASSERT_EQ(sizeof(expectedCallbacks), sizeof(callbacks)); 25 } 26 27 TEST(CallbackGenTest, CallbacksSameContent) 28 { 29 size_t i; 30 for (i = 0; i < expectedCallbacks.size(); ++i) 31 { 32 ASSERT_EQ(callbacks[i], 33 expectedCallbacks[i]); 34 } 35 } 36