summaryrefslogtreecommitdiff
path: root/test/SingleFileAllocationIteratorTest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-02-08 15:53:45 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2008-02-08 15:53:45 +0000
commit1b7c1982896dba1d38e1fe84ba9660996607f5f9 (patch)
treed12047cb37ded1e18d4d5b97844412538beb19ff /test/SingleFileAllocationIteratorTest.cc
parentd82e183d346375ac8a58a298a58728be615f947e (diff)
2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
Diffstat (limited to 'test/SingleFileAllocationIteratorTest.cc')
-rw-r--r--test/SingleFileAllocationIteratorTest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/SingleFileAllocationIteratorTest.cc b/test/SingleFileAllocationIteratorTest.cc
index 4cdb7d39..e238b181 100644
--- a/test/SingleFileAllocationIteratorTest.cc
+++ b/test/SingleFileAllocationIteratorTest.cc
@@ -1,13 +1,11 @@
#include "SingleFileAllocationIterator.h"
#include "File.h"
#include "DefaultDiskWriter.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
#include <fstream>
-#include <iomanip>
#include <cppunit/extensions/HelperMacros.h>
+namespace aria2 {
+
class SingleFileAllocationIteratorTest:public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(SingleFileAllocationIteratorTest);
@@ -26,10 +24,10 @@ CPPUNIT_TEST_SUITE_REGISTRATION( SingleFileAllocationIteratorTest );
void SingleFileAllocationIteratorTest::testAllocate()
{
- string dir = "/tmp";
- string fname = "aria2_SingleFileAllocationIteratorTest_testAllocate";
- string fn = dir+"/"+fname;
- ofstream of(fn.c_str());
+ std::string dir = "/tmp";
+ std::string fname = "aria2_SingleFileAllocationIteratorTest_testAllocate";
+ std::string fn = dir+"/"+fname;
+ std::ofstream of(fn.c_str());
of << "0123456789";
of.close();
@@ -51,3 +49,5 @@ void SingleFileAllocationIteratorTest::testAllocate()
File f(fn);
CPPUNIT_ASSERT_EQUAL((int64_t)40960, f.size());
}
+
+} // namespace aria2