From 42aefeb0afd91337e079b045c1e5a598f137c3c5 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Thu, 27 Mar 2014 00:40:14 +0400 Subject: [PATCH] test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC --- test/regress_http.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/regress_http.c b/test/regress_http.c index aa384917..0a015a31 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -3730,6 +3730,17 @@ http_get_addr_test(void *arg) 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) \ { #name, run_legacy_test_fn, TT_ISOLATED|TT_LEGACY, &legacy_setup, \ http_##name##_test } @@ -3781,6 +3792,9 @@ struct testcase_t http_testcases[] = { HTTP(ipv6_for_domain), HTTP(get_addr), + HTTP(set_family), + HTTP(set_family_ipv4), + END_OF_TESTCASES };