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

Function compare_chained_buffer

test/test_buffer.cpp:176–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176bool compare_chained_buffer(chained_buffer& b, char const* mem, int size)
177{
178 if (size == 0) return true;
179 std::vector<char> flat((std::size_t(size)));
180 auto const iovec2 = b.build_iovec(size);
181 int copied = copy_buffers(iovec2, &flat[0]);
182 TEST_CHECK(copied == size);
183 return std::memcmp(&flat[0], mem, std::size_t(size)) == 0;
184}
185
186struct holder
187{

Callers 1

TORRENT_TESTFunction · 0.85

Calls 2

copy_buffersFunction · 0.85
build_iovecMethod · 0.80

Tested by

no test coverage detected