diff --git a/tests/app/backend/pcmanager/test_known_hosts.c b/tests/app/backend/pcmanager/test_known_hosts.c index b8fda0f9e..1fa773cf2 100644 --- a/tests/app/backend/pcmanager/test_known_hosts.c +++ b/tests/app/backend/pcmanager/test_known_hosts.c @@ -10,13 +10,16 @@ void tearDown(void) { } void test_parse() { + char buf[64]; known_host_t *hosts = known_hosts_parse(FIXTURES_PATH_PREFIX "hosts_read.ini"); - TEST_ASSERT_EQUAL_STRING("192.168.1.100", hosts->address); - TEST_ASSERT_EQUAL(0, hosts->port); + sockaddr_get_ip_str(hosts->address, buf, sizeof(buf)); + TEST_ASSERT_EQUAL_STRING("192.168.1.100", buf); + TEST_ASSERT_EQUAL(0, sockaddr_get_port(hosts->address)); known_host_t *next = hosts->next; - TEST_ASSERT_EQUAL_STRING("192.168.1.101", next->address); - TEST_ASSERT_EQUAL(47985, next->port); + sockaddr_get_ip_str(next->address, buf, sizeof(buf)); + TEST_ASSERT_EQUAL_STRING("192.168.1.101", buf); + TEST_ASSERT_EQUAL(47985, sockaddr_get_port(next->address)); known_hosts_free(hosts, known_hosts_node_free); }