Avoid more warnings when building tests.
This commit is contained in:
parent
cf9a009fb8
commit
277917ec6a
|
@ -86,14 +86,14 @@ TORRENT_TEST(insert)
|
|||
for (int i = 0; i < 0xff; ++i)
|
||||
{
|
||||
int index = (i + 0xfff0) & 0xffff;
|
||||
pb.insert(index, (void*)(index + 1));
|
||||
pb.insert(index, reinterpret_cast<void*>(index + 1));
|
||||
fprintf(stderr, "insert: %u (mask: %x)\n", index, int(pb.capacity() - 1));
|
||||
TEST_EQUAL(pb.capacity(), 512);
|
||||
if (i >= 14)
|
||||
{
|
||||
index = (index - 14) & 0xffff;
|
||||
fprintf(stderr, "remove: %u\n", index);
|
||||
TEST_CHECK(pb.remove(index) == (void*)(index + 1));
|
||||
TEST_CHECK(pb.remove(index) == reinterpret_cast<void*>(index + 1));
|
||||
TEST_EQUAL(pb.size(), 14);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -294,7 +294,7 @@ TORRENT_TEST(string)
|
|||
TEST_EQUAL(ptr, std::string("f"));
|
||||
|
||||
ptr = string_tokenize(next, ' ', &next);
|
||||
TEST_EQUAL(ptr, NULL);
|
||||
TEST_EQUAL(ptr, static_cast<char*>(0));
|
||||
|
||||
TEST_EQUAL(std::string("foobar"), convert_from_native(convert_to_native("foobar")));
|
||||
TEST_EQUAL(std::string("foobar")
|
||||
|
|
Loading…
Reference in New Issue