blob: 77fe60a664b90a52910596687d9579f5647846f7 [file] [log] [blame]
Brad Bishop3ce5c482017-05-25 21:31:58 -04001#include <array>
2#include <string>
3#include <gtest/gtest.h>
4#include "data_types.hpp"
5
6using namespace phosphor::dbus::monitoring;
7
8using Index = std::map<std::tuple<size_t, size_t, size_t>, size_t>;
9
10#include "callbackgentest.hpp"
11
12const 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
22TEST(CallbackGenTest, CallbacksSameSize)
23{
24 ASSERT_EQ(sizeof(expectedCallbacks), sizeof(callbacks));
25}
26
27TEST(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}