mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-14 06:49:35 -04:00
test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC
This commit is contained in:
parent
177b8a7ce8
commit
42aefeb0af
@ -3730,6 +3730,17 @@ http_get_addr_test(void *arg)
|
|||||||
evhttp_free(http);
|
evhttp_free(http);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
http_set_family_test(void *arg)
|
||||||
|
{
|
||||||
|
http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_UNSPEC);
|
||||||
|
}
|
||||||
|
static void
|
||||||
|
http_set_family_ipv4_test(void *arg)
|
||||||
|
{
|
||||||
|
http_connection_test_(arg, 0, "127.0.0.1", NULL, 0, AF_INET);
|
||||||
|
}
|
||||||
|
|
||||||
#define HTTP_LEGACY(name) \
|
#define HTTP_LEGACY(name) \
|
||||||
{ #name, run_legacy_test_fn, TT_ISOLATED|TT_LEGACY, &legacy_setup, \
|
{ #name, run_legacy_test_fn, TT_ISOLATED|TT_LEGACY, &legacy_setup, \
|
||||||
http_##name##_test }
|
http_##name##_test }
|
||||||
@ -3781,6 +3792,9 @@ struct testcase_t http_testcases[] = {
|
|||||||
HTTP(ipv6_for_domain),
|
HTTP(ipv6_for_domain),
|
||||||
HTTP(get_addr),
|
HTTP(get_addr),
|
||||||
|
|
||||||
|
HTTP(set_family),
|
||||||
|
HTTP(set_family_ipv4),
|
||||||
|
|
||||||
END_OF_TESTCASES
|
END_OF_TESTCASES
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user