2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Removed unused FileEntry::setupDir()
	* src/FileEntry.cc
	* src/FileEntry.h
	* test/FileEntryTest.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-11-25 12:42:07 +00:00
parent 94c4a71d63
commit 0455cde2a8
4 changed files with 7 additions and 26 deletions

View File

@ -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> 2010-11-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed MultiDiskAdaptor::mkdir() because directory structure is Removed MultiDiskAdaptor::mkdir() because directory structure is

View File

@ -74,11 +74,6 @@ FileEntry::FileEntry()
FileEntry::~FileEntry() {} FileEntry::~FileEntry() {}
void FileEntry::setupDir()
{
util::mkdirs(File(path_).getDirname());
}
FileEntry& FileEntry::operator=(const FileEntry& entry) FileEntry& FileEntry::operator=(const FileEntry& entry)
{ {
if(this != &entry) { if(this != &entry) {

View File

@ -106,8 +106,6 @@ public:
void setRequested(bool flag) { requested_ = flag; } void setRequested(bool flag) { requested_ = flag; }
void setupDir();
const std::deque<std::string>& getRemainingUris() const const std::deque<std::string>& getRemainingUris() const
{ {
return uris_; return uris_;

View File

@ -10,7 +10,6 @@ namespace aria2 {
class FileEntryTest : public CppUnit::TestFixture { class FileEntryTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(FileEntryTest); CPPUNIT_TEST_SUITE(FileEntryTest);
CPPUNIT_TEST(testSetupDir);
CPPUNIT_TEST(testRemoveURIWhoseHostnameIs); CPPUNIT_TEST(testRemoveURIWhoseHostnameIs);
CPPUNIT_TEST(testExtractURIResult); CPPUNIT_TEST(testExtractURIResult);
CPPUNIT_TEST(testGetRequest); CPPUNIT_TEST(testGetRequest);
@ -25,7 +24,6 @@ class FileEntryTest : public CppUnit::TestFixture {
public: public:
void setUp() {} void setUp() {}
void testSetupDir();
void testRemoveURIWhoseHostnameIs(); void testRemoveURIWhoseHostnameIs();
void testExtractURIResult(); void testExtractURIResult();
void testGetRequest(); void testGetRequest();
@ -53,23 +51,6 @@ SharedHandle<FileEntry> createFileEntry()
} }
} // namespace } // 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() void FileEntryTest::testRemoveURIWhoseHostnameIs()
{ {
SharedHandle<FileEntry> fileEntry = createFileEntry(); SharedHandle<FileEntry> fileEntry = createFileEntry();