mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 13:37:40 +03:00
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:
parent
2555098ecd
commit
ca3f6e57f3
9 changed files with 100 additions and 90 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue