Skip to content

Commit

Permalink
2010-11-25 Tatsuhiro Tsujikawa <[email protected]>
Browse files Browse the repository at this point in the history
	Removed unused FileEntry::setupDir()
	* src/FileEntry.cc
	* src/FileEntry.h
	* test/FileEntryTest.cc
  • Loading branch information
tatsuhiro-t committed Nov 25, 2010
1 parent 94c4a71 commit 0455cde
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 26 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2010-11-25 Tatsuhiro Tsujikawa <[email protected]>

Removed unused FileEntry::setupDir()
* src/FileEntry.cc
* src/FileEntry.h
* test/FileEntryTest.cc

2010-11-25 Tatsuhiro Tsujikawa <[email protected]>

Removed MultiDiskAdaptor::mkdir() because directory structure is
Expand Down
5 changes: 0 additions & 5 deletions src/FileEntry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions src/FileEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ class FileEntry {

void setRequested(bool flag) { requested_ = flag; }

void setupDir();

const std::deque<std::string>& getRemainingUris() const
{
return uris_;
Expand Down
19 changes: 0 additions & 19 deletions test/FileEntryTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -25,7 +24,6 @@ class FileEntryTest : public CppUnit::TestFixture {
public:
void setUp() {}

void testSetupDir();
void testRemoveURIWhoseHostnameIs();
void testExtractURIResult();
void testGetRequest();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 0455cde

Please sign in to comment.