summaryrefslogtreecommitdiff
path: root/test/BtInterestedMessageTest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-12-26 14:26:55 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-12-26 14:26:55 +0000
commite39f7a7e9ce1e42e7a46332f664d6a6810ee55fa (patch)
tree602f80960c3538968b234725b4e7cdfb5c79ff4d /test/BtInterestedMessageTest.cc
parenteed41706fc0e72c15b0509f6a93b03644cc06c59 (diff)
2007-12-26 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Allocate bitfield in Peer when it is really used. More specifically, bitfield in Peer is allocated after the connection is established and deallocated when the connection is dropped. Since 2 parameters(piece length and total length) was removed from the constructor of Peer class, many test classes were modified accordingly. See svn log for more detailed information. * src/PeerInteractionCommand.cc * src/CompactPeerListProcessor.cc * src/Peer.cc * src/DefaultPeerListProcessor.cc * src/PeerListenCommand.cc * src/PeerReceiveHandshakeCommand.cc Fixed memory leak * src/Piece.cc
Diffstat (limited to 'test/BtInterestedMessageTest.cc')
-rw-r--r--test/BtInterestedMessageTest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/BtInterestedMessageTest.cc b/test/BtInterestedMessageTest.cc
index bff4eec5..372cb2c0 100644
--- a/test/BtInterestedMessageTest.cc
+++ b/test/BtInterestedMessageTest.cc
@@ -62,7 +62,7 @@ void BtInterestedMessageTest::testGetMessage() {
void BtInterestedMessageTest::testDoReceivedAction() {
BtInterestedMessage msg;
- PeerHandle peer = new Peer("host", 6969, 16*1024, 256*1024);
+ PeerHandle peer = new Peer("host", 6969);
msg.setPeer(peer);
CPPUNIT_ASSERT(!peer->peerInterested);
msg.doReceivedAction();
@@ -71,7 +71,7 @@ void BtInterestedMessageTest::testDoReceivedAction() {
void BtInterestedMessageTest::testOnSendComplete() {
BtInterestedMessage msg;
- PeerHandle peer = new Peer("host", 6969, 16*1024, 256*1024);
+ PeerHandle peer = new Peer("host", 6969);
msg.setPeer(peer);
CPPUNIT_ASSERT(!peer->amInterested);
msg.onSendComplete();