MCPcopy Create free account
hub / github.com/arvidn/libtorrent / TORRENT_TEST

Function TORRENT_TEST

test/test_bdecode.cpp:41–51  ·  view source on GitHub ↗

test integer

Source from the content-addressed store, hash-verified

39
40// test integer
41TORRENT_TEST(integer)
42{
43 char b[] = "i12453e";
44 error_code ec;
45 bdecode_node e = bdecode(b, ec);
46 TEST_CHECK(!ec);
47 std::printf("%s\n", print_entry(e).c_str());
48 TEST_CHECK(span<char>(b, sizeof(b) - 1) == e.data_section());
49 TEST_EQUAL(e.type(), bdecode_node::int_t);
50 TEST_EQUAL(e.int_value(), 12453);
51}
52
53TORRENT_TEST(construct_string)
54{

Callers 1

test_bdecode.cppFile · 0.70

Calls 15

print_entryFunction · 0.85
parse_intFunction · 0.85
data_sectionMethod · 0.80
int_valueMethod · 0.80
string_valueMethod · 0.80
string_lengthMethod · 0.80
list_sizeMethod · 0.80
list_atMethod · 0.80
dict_sizeMethod · 0.80
dict_findMethod · 0.80
has_soft_errorMethod · 0.80

Tested by

no test coverage detected