mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 13:37:40 +03:00
Use raw pointers to PieceStorage, PeerStorage and DownloadContxt for BtMessages
This commit is contained in:
parent
09c597fbb8
commit
1a299c4d7c
21 changed files with 87 additions and 63 deletions
|
@ -80,8 +80,8 @@ void BtHaveMessageTest::testDoReceivedAction() {
|
|||
BtHaveMessage msg;
|
||||
msg.setIndex(1);
|
||||
msg.setPeer(peer);
|
||||
std::shared_ptr<MockPieceStorage> pieceStorage(new MockPieceStorage());
|
||||
msg.setPieceStorage(pieceStorage);
|
||||
auto pieceStorage = make_unique<MockPieceStorage>();
|
||||
msg.setPieceStorage(pieceStorage.get());
|
||||
|
||||
CPPUNIT_ASSERT(!peer->hasPiece(msg.getIndex()));
|
||||
|
||||
|
@ -97,8 +97,8 @@ void BtHaveMessageTest::testDoReceivedAction_goodByeSeeder()
|
|||
BtHaveMessage msg;
|
||||
msg.setIndex(0);
|
||||
msg.setPeer(peer);
|
||||
std::shared_ptr<MockPieceStorage> pieceStorage(new MockPieceStorage());
|
||||
msg.setPieceStorage(pieceStorage);
|
||||
auto pieceStorage = make_unique<MockPieceStorage>();
|
||||
msg.setPieceStorage(pieceStorage.get());
|
||||
|
||||
// peer is not seeder and client have not completed download
|
||||
msg.doReceivedAction();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue