2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Type clarification
* src/PeerSessionResource.{h, cc}
* src/DefaultPieceStorage.{h, cc}
* src/Peer.{h, cc}
* test/PeerSessionResourceTest.cc
Use div function
* src/BtPieceMessage.cc (erasePieceOnDisk)
This commit is contained in:
@@ -103,29 +103,29 @@ void PeerSessionResourceTest::testUpdateUploadLength()
|
||||
{
|
||||
PeerSessionResource res(1024, 1024*1024);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL((int64_t)0, res.uploadLength());
|
||||
CPPUNIT_ASSERT_EQUAL(0ULL, res.uploadLength());
|
||||
res.updateUploadLength(100);
|
||||
res.updateUploadLength(200);
|
||||
CPPUNIT_ASSERT_EQUAL((int64_t)300, res.uploadLength());
|
||||
CPPUNIT_ASSERT_EQUAL(300ULL, res.uploadLength());
|
||||
}
|
||||
|
||||
void PeerSessionResourceTest::testUpdateDownloadLength()
|
||||
{
|
||||
PeerSessionResource res(1024, 1024*1024);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL((int64_t)0, res.downloadLength());
|
||||
CPPUNIT_ASSERT_EQUAL(0ULL, res.downloadLength());
|
||||
res.updateDownloadLength(100);
|
||||
res.updateDownloadLength(200);
|
||||
CPPUNIT_ASSERT_EQUAL((int64_t)300, res.downloadLength());
|
||||
CPPUNIT_ASSERT_EQUAL(300ULL, res.downloadLength());
|
||||
}
|
||||
|
||||
void PeerSessionResourceTest::testUpdateLatency()
|
||||
{
|
||||
PeerSessionResource res(1024, 1024*1024);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(1500, res.latency());
|
||||
CPPUNIT_ASSERT_EQUAL((unsigned int)1500, res.latency());
|
||||
res.updateLatency(1000);
|
||||
CPPUNIT_ASSERT_EQUAL(1100, res.latency());
|
||||
CPPUNIT_ASSERT_EQUAL((unsigned int)1100, res.latency());
|
||||
}
|
||||
|
||||
void PeerSessionResourceTest::testExtendedMessageEnabled()
|
||||
|
||||
Reference in New Issue
Block a user