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

Method testGetFirstFilePath

test/RequestGroupTest.cc:34–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32CPPUNIT_TEST_SUITE_REGISTRATION(RequestGroupTest);
33
34void RequestGroupTest::testGetFirstFilePath()
35{
36 std::shared_ptr<DownloadContext> ctx(
37 new DownloadContext(1_k, 1_k, "/tmp/myfile"));
38
39 RequestGroup group(GroupId::create(), option_);
40 group.setDownloadContext(ctx);
41
42 CPPUNIT_ASSERT_EQUAL(std::string("/tmp/myfile"), group.getFirstFilePath());
43
44 group.markInMemoryDownload();
45
46 CPPUNIT_ASSERT_EQUAL(std::string("[MEMORY]myfile"), group.getFirstFilePath());
47}
48
49void RequestGroupTest::testTryAutoFileRenaming()
50{

Callers

nothing calls this directly

Calls 4

createFunction · 0.85
getFirstFilePathMethod · 0.80
markInMemoryDownloadMethod · 0.80
setDownloadContextMethod · 0.45

Tested by

no test coverage detected