diff --git a/simulation/Jamfile b/simulation/Jamfile index 3a588131e..4711c1de2 100644 --- a/simulation/Jamfile +++ b/simulation/Jamfile @@ -24,6 +24,7 @@ project alias libtorrent-sims : [ run test_swarm.cpp ] + [ run test_super_seeding.cpp ] [ run test_utp.cpp ] [ run test_dht.cpp ] [ run test_pe_crypto.cpp ] diff --git a/test/test_super_seeding.cpp b/simulation/test_super_seeding.cpp similarity index 93% rename from test/test_super_seeding.cpp rename to simulation/test_super_seeding.cpp index 8dc1d578d..810d71cbc 100644 --- a/test/test_super_seeding.cpp +++ b/simulation/test_super_seeding.cpp @@ -31,16 +31,17 @@ POSSIBILITY OF SUCH DAMAGE. */ #include "swarm_suite.hpp" +#include "test.hpp" TORRENT_TEST(plain) { // with super seeding - test_swarm(super_seeding); + simulate_swarm(super_seeding); } TORRENT_TEST(strict) { // with strict super seeding - test_swarm(super_seeding | strict_super_seeding); + simulate_swarm(super_seeding | strict_super_seeding); } diff --git a/test/Jamfile b/test/Jamfile index 24c31b58d..f21afd8c7 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -181,8 +181,6 @@ test-suite libtorrent : [ run test_time_critical.cpp ] [ run test_pex.cpp ] [ run test_priority.cpp ] - [ run test_swarm.cpp ] - [ run test_super_seeding.cpp ] # turn these tests into simulations # [ run test_upnp.cpp ] @@ -202,8 +200,6 @@ alias win-tests : test_time_critical test_pex test_priority - test_super_seeding - test_swarm test_storage test_session test_read_piece diff --git a/test/Makefile.am b/test/Makefile.am index a8b3ecd32..725034a65 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -20,8 +20,6 @@ test_programs = \ test_ssl \ test_storage \ test_time_critical \ - test_super_seeding \ - test_swarm \ test_torrent \ test_tracker \ test_trackers_extension \ @@ -174,8 +172,6 @@ test_pex_SOURCES = test_pex.cpp test_read_piece_SOURCES = test_read_piece.cpp test_storage_SOURCES = test_storage.cpp test_time_critical_SOURCES = test_time_critical.cpp -test_super_seeding_SOURCES = test_super_seeding.cpp -test_swarm_SOURCES = test_swarm.cpp test_resume_SOURCES = test_resume.cpp test_ssl_SOURCES = test_ssl.cpp test_torrent_SOURCES = test_torrent.cpp diff --git a/test/test_swarm.cpp b/test/test_swarm.cpp deleted file mode 100644 index 8402ac323..000000000 --- a/test/test_swarm.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - -Copyright (c) 2008, Arvid Norberg -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the distribution. - * Neither the name of the author nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include "swarm_suite.hpp" - -TORRENT_TEST(seed_mode) -{ - // with seed mode - test_swarm(seed_mode); -} - -TORRENT_TEST(plain) -{ - test_swarm(); -} - -TORRENT_TEST(suggest) -{ - // with suggest pieces - test_swarm(suggest); -} - -TORRENT_TEST(explicit_cache) -{ - // test explicit cache - test_swarm(suggest | explicit_cache); -} -