attempt to fix tracker test

This commit is contained in:
arvidn 2015-08-29 17:57:49 -04:00
parent 769e407f6a
commit 0ee4e46b49
2 changed files with 4 additions and 2 deletions

View File

@ -46,6 +46,7 @@ POSSIBILITY OF SUCH DAMAGE.
#endif #endif
#include <boost/system/error_code.hpp> #include <boost/system/error_code.hpp>
#include <boost/asio/error.hpp>
#include "libtorrent/aux_/disable_warnings_pop.hpp" #include "libtorrent/aux_/disable_warnings_pop.hpp"

View File

@ -465,13 +465,14 @@ TORRENT_TEST(try_next)
if (tr[0].fails == 1) if (tr[0].fails == 1)
{ {
TEST_EQUAL(tr[0].verified, false); TEST_EQUAL(tr[0].verified, false);
TEST_EQUAL(tr[0].last_error, boost::asio::error::netdb_errors::host_not_found); TEST_EQUAL(tr[0].last_error
, error_code(boost::asio::error::host_not_found));
} }
TEST_EQUAL(tr[1].fails, 1); TEST_EQUAL(tr[1].fails, 1);
TEST_EQUAL(tr[1].verified, false); TEST_EQUAL(tr[1].verified, false);
TEST_CHECK(tr[1].last_error == boost::asio::error::timed_out TEST_CHECK(tr[1].last_error == boost::asio::error::timed_out
|| tr[1].last_error == boost::asio::error::connection_refused); || tr[1].last_error == boost::system::error_condition(boost::system::errc::connection_refused));
TEST_EQUAL(tr[2].fails, 0); TEST_EQUAL(tr[2].fails, 0);
TEST_EQUAL(tr[2].verified, true); TEST_EQUAL(tr[2].verified, true);