mirror of https://github.com/aria2/aria2
2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed unused FileEntry::setupDir() * src/FileEntry.cc * src/FileEntry.h * test/FileEntryTest.ccpull/1/head
parent
94c4a71d63
commit
0455cde2a8
|
@ -1,3 +1,10 @@
|
|||
2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Removed unused FileEntry::setupDir()
|
||||
* src/FileEntry.cc
|
||||
* src/FileEntry.h
|
||||
* test/FileEntryTest.cc
|
||||
|
||||
2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||
|
||||
Removed MultiDiskAdaptor::mkdir() because directory structure is
|
||||
|
|
|
@ -74,11 +74,6 @@ FileEntry::FileEntry()
|
|||
|
||||
FileEntry::~FileEntry() {}
|
||||
|
||||
void FileEntry::setupDir()
|
||||
{
|
||||
util::mkdirs(File(path_).getDirname());
|
||||
}
|
||||
|
||||
FileEntry& FileEntry::operator=(const FileEntry& entry)
|
||||
{
|
||||
if(this != &entry) {
|
||||
|
|
|
@ -106,8 +106,6 @@ public:
|
|||
|
||||
void setRequested(bool flag) { requested_ = flag; }
|
||||
|
||||
void setupDir();
|
||||
|
||||
const std::deque<std::string>& getRemainingUris() const
|
||||
{
|
||||
return uris_;
|
||||
|
|
|
@ -10,7 +10,6 @@ namespace aria2 {
|
|||
class FileEntryTest : public CppUnit::TestFixture {
|
||||
|
||||
CPPUNIT_TEST_SUITE(FileEntryTest);
|
||||
CPPUNIT_TEST(testSetupDir);
|
||||
CPPUNIT_TEST(testRemoveURIWhoseHostnameIs);
|
||||
CPPUNIT_TEST(testExtractURIResult);
|
||||
CPPUNIT_TEST(testGetRequest);
|
||||
|
@ -25,7 +24,6 @@ class FileEntryTest : public CppUnit::TestFixture {
|
|||
public:
|
||||
void setUp() {}
|
||||
|
||||
void testSetupDir();
|
||||
void testRemoveURIWhoseHostnameIs();
|
||||
void testExtractURIResult();
|
||||
void testGetRequest();
|
||||
|
@ -53,23 +51,6 @@ SharedHandle<FileEntry> createFileEntry()
|
|||
}
|
||||
} // namespace
|
||||
|
||||
void FileEntryTest::testSetupDir()
|
||||
{
|
||||
std::string dir = "./aria2-FileEntryTest-testSetupDir";
|
||||
std::string filename = "filename";
|
||||
std::string path = dir+"/"+filename;
|
||||
File d(dir);
|
||||
if(d.exists()) {
|
||||
CPPUNIT_ASSERT(d.remove());
|
||||
}
|
||||
CPPUNIT_ASSERT(!d.exists());
|
||||
FileEntry fileEntry(path, 0, 0);
|
||||
fileEntry.setupDir();
|
||||
CPPUNIT_ASSERT(d.isDir());
|
||||
File f(path);
|
||||
CPPUNIT_ASSERT(!f.exists());
|
||||
}
|
||||
|
||||
void FileEntryTest::testRemoveURIWhoseHostnameIs()
|
||||
{
|
||||
SharedHandle<FileEntry> fileEntry = createFileEntry();
|
||||
|
|
Loading…
Reference in New Issue