From f7de7abec005723b43bef46f167a98cadc437850 Mon Sep 17 00:00:00 2001 From: arvidn Date: Wed, 17 Jun 2015 00:50:58 -0400 Subject: [PATCH] separate some more test cases to improve test output --- test/test_web_seed_ban.cpp | 27 +++++++++++++++++++-------- test/test_web_seed_chunked.cpp | 27 +++++++++++++++++++-------- test/test_web_seed_socks4.cpp | 27 +++++++++++++++++++-------- test/test_web_seed_socks5.cpp | 27 +++++++++++++++++++-------- test/test_web_seed_socks5_pw.cpp | 27 +++++++++++++++++++-------- 5 files changed, 95 insertions(+), 40 deletions(-) diff --git a/test/test_web_seed_ban.cpp b/test/test_web_seed_ban.cpp index 006b534bd..533b9f083 100644 --- a/test/test_web_seed_ban.cpp +++ b/test/test_web_seed_ban.cpp @@ -38,14 +38,25 @@ using namespace libtorrent; const int proxy = libtorrent::settings_pack::none; -TORRENT_TEST(web_seed_ban) -{ - for (int url_seed = 0; url_seed < 2; ++url_seed) - { #ifdef TORRENT_USE_OPENSSL - run_http_suite(proxy, "https", url_seed, 0, 1); -#endif - run_http_suite(proxy, "http", url_seed, 0, 1); - } +TORRENT_TEST(http_seed_ssl) +{ + run_http_suite(proxy, "https", 0, 0, 1); +} + +TORRENT_TEST(url_seed_ssl) +{ + run_http_suite(proxy, "https", 1, 0, 1); +} +#endif + +TORRENT_TEST(http_seed) +{ + run_http_suite(proxy, "http", 0, 0, 1); +} + +TORRENT_TEST(url_seed) +{ + run_http_suite(proxy, "http", 1, 0, 1); } diff --git a/test/test_web_seed_chunked.cpp b/test/test_web_seed_chunked.cpp index 3c418c3c6..a781d3a1a 100644 --- a/test/test_web_seed_chunked.cpp +++ b/test/test_web_seed_chunked.cpp @@ -38,14 +38,25 @@ using namespace libtorrent; const int proxy = libtorrent::settings_pack::none; -TORRENT_TEST(web_seed_chunked) -{ - for (int url_seed = 0; url_seed < 2; ++url_seed) - { #ifdef TORRENT_USE_OPENSSL - run_http_suite(proxy, "https", url_seed, 1, 0); -#endif - run_http_suite(proxy, "http", url_seed, 1, 0); - } +TORRENT_TEST(web_seed_ssl) +{ + run_http_suite(proxy, "https", 0, 1, 0); +} + +TORRENT_TEST(url_seed_ssl) +{ + run_http_suite(proxy, "https", 1, 1, 0); +} +#endif + +TORRENT_TEST(web_seed_ssl) +{ + run_http_suite(proxy, "http", 0, 1, 0); +} + +TORRENT_TEST(url_seed_ssl) +{ + run_http_suite(proxy, "http", 1, 1, 0); } diff --git a/test/test_web_seed_socks4.cpp b/test/test_web_seed_socks4.cpp index 3db731f11..0ae47bed0 100644 --- a/test/test_web_seed_socks4.cpp +++ b/test/test_web_seed_socks4.cpp @@ -38,14 +38,25 @@ using namespace libtorrent; const int proxy = libtorrent::settings_pack::socks4; -TORRENT_TEST(web_seed_socks4) -{ - for (int url_seed = 0; url_seed < 2; ++url_seed) - { #ifdef TORRENT_USE_OPENSSL - run_http_suite(proxy, "https", url_seed); -#endif - run_http_suite(proxy, "http", url_seed); - } +TORRENT_TEST(http_seed_ssl) +{ + run_http_suite(proxy, "https", 0); +} + +TORRENT_TEST(url_seed_ssl) +{ + run_http_suite(proxy, "https", 1); +} +#endif + +TORRENT_TEST(http_seed) +{ + run_http_suite(proxy, "http", 0); +} + +TORRENT_TEST(url_seed) +{ + run_http_suite(proxy, "http", 1); } diff --git a/test/test_web_seed_socks5.cpp b/test/test_web_seed_socks5.cpp index d46a71a5e..e7a3d5759 100644 --- a/test/test_web_seed_socks5.cpp +++ b/test/test_web_seed_socks5.cpp @@ -38,14 +38,25 @@ using namespace libtorrent; const int proxy = libtorrent::settings_pack::socks5; -TORRENT_TEST(web_seed_socks5) -{ - for (int url_seed = 0; url_seed < 2; ++url_seed) - { #ifdef TORRENT_USE_OPENSSL - run_http_suite(proxy, "https", url_seed); -#endif - run_http_suite(proxy, "http", url_seed); - } +TORRENT_TEST(http_seed_ssl) +{ + run_http_suite(proxy, "https", 0); +} + +TORRENT_TEST(url_seed_ssl) +{ + run_http_suite(proxy, "https", 1); +} +#endif + +TORRENT_TEST(http_seed) +{ + run_http_suite(proxy, "http", 0); +} + +TORRENT_TEST(url_seed) +{ + run_http_suite(proxy, "http", 1); } diff --git a/test/test_web_seed_socks5_pw.cpp b/test/test_web_seed_socks5_pw.cpp index 267938051..6e2f5c5b6 100644 --- a/test/test_web_seed_socks5_pw.cpp +++ b/test/test_web_seed_socks5_pw.cpp @@ -38,14 +38,25 @@ using namespace libtorrent; const int proxy = libtorrent::settings_pack::socks5_pw; -TORRENT_TEST(web_seed_socks5_pw) -{ - for (int url_seed = 0; url_seed < 2; ++url_seed) - { #ifdef TORRENT_USE_OPENSSL - run_http_suite(proxy, "https", url_seed); -#endif - run_http_suite(proxy, "http", url_seed); - } +TORRENT_TEST(http_seed_ssl) +{ + run_http_suite(proxy, "https", 0); +} + +TORRENT_TEST(url_seed_ssl) +{ + run_http_suite(proxy, "https", 1); +} +#endif + +TORRENT_TEST(http_seed) +{ + run_http_suite(proxy, "http", 0); +} + +TORRENT_TEST(url_seed) +{ + run_http_suite(proxy, "http", 1); }