unittests: tests-ipv6_addr: test for long embedded ipv4 addresses

This commit is contained in:
Kaspar Schleiser 2015-04-11 11:21:47 +02:00
parent cf53d966be
commit 23074c7870

View File

@ -812,13 +812,13 @@ static void test_ipv6_addr_from_str__success5(void)
static void test_ipv6_addr_from_str__success6(void) static void test_ipv6_addr_from_str__success6(void)
{ {
ng_ipv6_addr_t a = { { ng_ipv6_addr_t a = { {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0xff, 0xff, 192, 168, 0, 1 0xff, 0xff, 0xff, 0xff, 255, 255, 255, 255
} }
}; };
ng_ipv6_addr_t result; ng_ipv6_addr_t result;
TEST_ASSERT_NOT_NULL(ng_ipv6_addr_from_str(&result, "::ffff:192.168.0.1")); TEST_ASSERT_NOT_NULL(ng_ipv6_addr_from_str(&result, "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"));
TEST_ASSERT(ng_ipv6_addr_equal(&a, &result)); TEST_ASSERT(ng_ipv6_addr_equal(&a, &result));
} }