MCPcopy Create free account
hub / github.com/aria2/aria2 / testToString_binaryStream

Method testToString_binaryStream

test/UtilTest2.cc:475–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

473}
474
475void UtilTest2::testToString_binaryStream()
476{
477 std::shared_ptr<DiskWriter> dw(new ByteArrayDiskWriter());
478 std::string data(16_k + 256, 'a');
479 dw->initAndOpenFile();
480 dw->writeData((const unsigned char*)data.c_str(), data.size(), 0);
481
482 std::string readData = util::toString(dw);
483
484 CPPUNIT_ASSERT_EQUAL(data, readData);
485}
486
487void UtilTest2::testItos()
488{

Callers

nothing calls this directly

Calls 4

toStringFunction · 0.50
initAndOpenFileMethod · 0.45
writeDataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected