some test fixes

This commit is contained in:
Arvid Norberg 2013-06-17 07:47:47 +00:00
parent 0bcd97c51e
commit ab07c8f041
2 changed files with 4 additions and 2 deletions

View File

@ -85,7 +85,7 @@ void test_feed(std::string const& filename, rss_expect const& expect)
}
TEST_CHECK(!ec);
char* buf = &buffer[0];
char* buf = buffer.size() ? &buffer[0] : NULL;
int len = buffer.size();
char const header[] = "HTTP/1.1 200 OK\r\n"

View File

@ -121,7 +121,9 @@ int test_main()
if (std::string(test_torrents[i].file) == "whitespace_url.torrent")
{
// make sure we trimmed the url
TEST_CHECK(ti->trackers()[0].url == "udp://test.com/announce");
TEST_CHECK(ti->trackers().size() > 0);
if (ti->trackers().size() > 0)
TEST_CHECK(ti->trackers()[0].url == "udp://test.com/announce");
}
else if (std::string(test_torrents[i].file) == "duplicate_files.torrent")
{