]> granicus.if.org Git - libevent/commitdiff
test: add regress for evhttp_connection_set_family() with AF_INET and AF_UNSPEC
authorAzat Khuzhin <a3at.mail@gmail.com>
Wed, 26 Mar 2014 20:40:14 +0000 (00:40 +0400)
committerAzat Khuzhin <a3at.mail@gmail.com>
Wed, 26 Mar 2014 20:50:04 +0000 (00:50 +0400)
test/regress_http.c

index aa384917c36a3ac4fd67a91f24206683ebc05654..0a015a3185683b9dc8c0dd2c50f930e7ff661a15 100644 (file)
@@ -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
 };