Skip to content

Commit

Permalink
fixed in6_addr assignment build error in ipv6 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
moaazassali committed Jul 10, 2024
1 parent 4a4452b commit cccc99f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/columns/column_ipv6_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@ TEST_CASE("Constructed ColumnIPv6 is valid") {
TEST_CASE("Appending to and retrieving from ColumnIPv6 correctly") {
const auto col = chc_column_ipv6_create();

in6_addr value = {};
value.u = {0x20, 0x01, 0x0d, 0xb8, 0x85, 0xa3, 0x08, 0x96, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x2e, 0x03, 0x70};
constexpr in6_addr value = {
{
0x20, 0x01, 0x0d, 0xb8, 0x85, 0xa3, 0x08, 0x96,
0x00, 0x00, 0x00, 0x00, 0x8a, 0x2e, 0x03, 0x70
}
};

chc_column_ipv6_append(col, value);
const auto out = chc_column_ipv6_at(col, 0);
CHECK(memcmp(&out, &value, 16) == 0);
Expand Down

0 comments on commit cccc99f

Please sign in to comment.