11 #include <gtest/gtest.h>
24 const void* actual_data,
size_t actual_len)
26 const size_t cmplen = std::min(expected_len, actual_len);
28 for (
size_t i = 0; i < cmplen; ++i) {
29 const int ebyte =
static_cast<const uint8_t*
>(expected_data)[i];
30 const int abyte =
static_cast<const uint8_t*
>(actual_data)[i];
34 ASSERT_EQ(ebyte, abyte) <<
"Wire data mismatch at " << i <<
"th byte\n"
35 <<
" Actual: " << abyte <<
"\n"
36 <<
"Expected: " << ebyte <<
"\n";
38 EXPECT_EQ(expected_len, actual_len)
39 <<
"Wire data mismatch in length:\n"
40 <<
" Actual: " << actual_len <<
"\n"
41 <<
"Expected: " << expected_len <<
"\n";
Utilities for tests with wire data.
void matchWireData(const void *expected_data, size_t expected_len, const void *actual_data, size_t actual_len)
Defines the logger used by the top-level component of kea-dhcp-ddns.