merged fix from RC_1_0

This commit is contained in:
Arvid Norberg
2014-09-29 08:30:11 +00:00
parent f8272b90ae
commit ba75b44c29

View File

@@ -185,14 +185,11 @@ int test_main()
error_code ec;
int ret = lazy_bdecode(b, b + sizeof(b)-1, e, ec);
TEST_CHECK(ret == 0);
#if TORRENT_USE_IOSTREAM
std::cout << e << std::endl;
#endif
TEST_CHECK(e.dict_size() == 1);
lazy_entre* d = e.dict_find(std::string("a\0b"));
lazy_entry* d = e.dict_find(std::string("a\0b", 3));
TEST_CHECK(d);
TEST_EQUAL(d->type, lazy_entry::integer_t);
TEST_EQUAL(d->integer(), 1);
TEST_EQUAL(d->type(), lazy_entry::int_t);
TEST_EQUAL(d->int_value(), 1);
}
// test strings with negative length-prefix