summaryrefslogtreecommitdiff
path: root/test/DefaultBtProgressInfoFileTest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-10-01 23:52:22 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2012-10-01 23:52:22 +0900
commit8b0c701266a56c5ccc7c4ea6b605a9e0c9ef823d (patch)
tree94014f88927ff38ab48ecda3f70c53d97a58a90c /test/DefaultBtProgressInfoFileTest.cc
parent390b2e546ece51c2f19261949ecf4aa59177dda8 (diff)
Removed trailing spaces
Diffstat (limited to 'test/DefaultBtProgressInfoFileTest.cc')
-rw-r--r--test/DefaultBtProgressInfoFileTest.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/DefaultBtProgressInfoFileTest.cc b/test/DefaultBtProgressInfoFileTest.cc
index 9d9b8afd..fa34e294 100644
--- a/test/DefaultBtProgressInfoFileTest.cc
+++ b/test/DefaultBtProgressInfoFileTest.cc
@@ -52,7 +52,7 @@ private:
SharedHandle<MockPieceStorage> pieceStorage_;
SharedHandle<Option> option_;
SharedHandle<BitfieldMan> bitfield_;
-public:
+public:
void initializeMembers(int32_t pieceLength, int64_t totalLength)
{
option_.reset(new Option());
@@ -68,7 +68,7 @@ public:
0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa,
0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff,
};
-
+
dctx_.reset(new DownloadContext());
SharedHandle<TorrentAttribute> torrentAttrs(new TorrentAttribute());
torrentAttrs->infoHash = std::string(vbegin(infoHash), vend(infoHash));
@@ -224,7 +224,7 @@ void DefaultBtProgressInfoFileTest::testSave()
inFlightPieces.push_back(p1);
inFlightPieces.push_back(p2);
pieceStorage_->addInFlightPiece(inFlightPieces);
-
+
DefaultBtProgressInfoFile infoFile(dctx_, pieceStorage_, option_.get());
infoFile.setBtRuntime(btRuntime_);
infoFile.setPeerStorage(peerStorage_);
@@ -333,7 +333,7 @@ void DefaultBtProgressInfoFileTest::testLoad_nonBt_compat()
SharedHandle<DownloadContext> dctx
(new DownloadContext(1024, 81920, A2_TEST_DIR"/load-nonBt"));
-
+
DefaultBtProgressInfoFile infoFile(dctx, pieceStorage_, option_.get());
CPPUNIT_ASSERT_EQUAL(std::string(A2_TEST_DIR"/load-nonBt.aria2"),
@@ -378,7 +378,7 @@ void DefaultBtProgressInfoFileTest::testLoad_nonBt()
SharedHandle<DownloadContext> dctx
(new DownloadContext(1024, 81920, A2_TEST_DIR"/load-nonBt-v0001"));
-
+
DefaultBtProgressInfoFile infoFile(dctx, pieceStorage_, option_.get());
CPPUNIT_ASSERT_EQUAL(std::string(A2_TEST_DIR"/load-nonBt-v0001.aria2"),
@@ -459,14 +459,14 @@ void DefaultBtProgressInfoFileTest::testSave_nonBt()
inFlightPieces.push_back(p1);
inFlightPieces.push_back(p2);
pieceStorage_->addInFlightPiece(inFlightPieces);
-
+
DefaultBtProgressInfoFile infoFile(dctx, pieceStorage_, option_.get());
CPPUNIT_ASSERT_EQUAL(std::string(A2_TEST_OUT_DIR"/save-temp.aria2"),
infoFile.getFilename());
infoFile.save();
-
+
// read and validate
std::ifstream in(infoFile.getFilename().c_str(), std::ios::binary);
@@ -491,7 +491,7 @@ void DefaultBtProgressInfoFileTest::testSave_nonBt()
in.read((char*)&pieceLength, sizeof(pieceLength));
pieceLength = ntohl(pieceLength);
CPPUNIT_ASSERT_EQUAL((uint32_t)1024, pieceLength);
-
+
uint64_t totalLength;
in.read((char*)&totalLength, sizeof(totalLength));
totalLength = ntoh64(totalLength);