From cccc99fe63f62d4cf9d27bc427cdc3b170afc452 Mon Sep 17 00:00:00 2001 From: Moaaz Assali <66834697+moaazassali@users.noreply.github.com> Date: Wed, 10 Jul 2024 21:04:54 +0400 Subject: [PATCH] fixed in6_addr assignment build error in ipv6 tests --- tests/columns/column_ipv6_tests.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/columns/column_ipv6_tests.cpp b/tests/columns/column_ipv6_tests.cpp index f49be96..37fd002 100644 --- a/tests/columns/column_ipv6_tests.cpp +++ b/tests/columns/column_ipv6_tests.cpp @@ -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);