blob: 87bf160095f311e3fa46c82f4ae5aef20e403ef0 [file] [log] [blame]
#include "data_types.hpp"
#include <array>
#include <string>
#include <gtest/gtest.h>
using namespace phosphor::dbus::monitoring;
using Index = std::map<std::tuple<size_t, size_t, size_t>, size_t>;
#include "callbackgentest.hpp"
const std::array<std::tuple<std::string, size_t>, 4> expectedCallbacks = {{
std::tuple<std::string, size_t>{"int32_t", 0},
std::tuple<std::string, size_t>{"int32_t", 0},
std::tuple<std::string, size_t>{"std::string", 1},
std::tuple<std::string, size_t>{"std::string", 2},
}};
TEST(CallbackGenTest, CallbacksSameSize)
{
ASSERT_EQ(sizeof(expectedCallbacks), sizeof(callbacks));
}
TEST(CallbackGenTest, CallbacksSameContent)
{
size_t i;
for (i = 0; i < expectedCallbacks.size(); ++i)
{
ASSERT_EQ(callbacks[i], expectedCallbacks[i]);
}
}