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

Function readFile

test/MultiDiskAdaptorTest.cc:274–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272
273namespace {
274void readFile(const std::string& filename, char* buf, int bufLength)
275{
276 FILE* f = fopen(filename.c_str(), "r");
277 if (f == nullptr) {
278 CPPUNIT_FAIL(strerror(errno));
279 }
280 int retval = fread(buf, 1, bufLength, f);
281 fclose(f);
282 if (retval != bufLength) {
283 CPPUNIT_FAIL("return value is not 1");
284 }
285}
286} // namespace
287
288void MultiDiskAdaptorTest::testWriteData()

Callers 2

testWriteDataMethod · 0.70
testWriteCacheMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected