mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 13:37:40 +03:00
2009-11-15 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use dynamic_pointer_cast * test/BtPieceMessageTest.cc * test/BtRequestMessageTest.cc * test/DefaultBtRequestFactoryTest.cc
This commit is contained in:
parent
f11adceba7
commit
7b63e121c7
4 changed files with 23 additions and 13 deletions
|
@ -174,8 +174,8 @@ void BtRequestMessageTest::testDoReceivedAction_hasPieceAndAmNotChoking() {
|
|||
msg->doReceivedAction();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)1, _dispatcher->messageQueue.size());
|
||||
MockBtMessage2* pieceMsg =
|
||||
(MockBtMessage2*)_dispatcher->messageQueue.front().get();
|
||||
SharedHandle<MockBtMessage2> pieceMsg =
|
||||
dynamic_pointer_cast<MockBtMessage2>(_dispatcher->messageQueue.front());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("piece"), pieceMsg->type);
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)1, pieceMsg->index);
|
||||
CPPUNIT_ASSERT_EQUAL((uint32_t)16, pieceMsg->begin);
|
||||
|
@ -188,8 +188,8 @@ void BtRequestMessageTest::testDoReceivedAction_hasPieceAndAmChokingAndFastExten
|
|||
msg->doReceivedAction();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)1, _dispatcher->messageQueue.size());
|
||||
MockBtMessage2* pieceMsg =
|
||||
(MockBtMessage2*)_dispatcher->messageQueue.front().get();
|
||||
SharedHandle<MockBtMessage2> pieceMsg =
|
||||
dynamic_pointer_cast<MockBtMessage2>(_dispatcher->messageQueue.front());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("reject"), pieceMsg->type);
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)1, pieceMsg->index);
|
||||
CPPUNIT_ASSERT_EQUAL((uint32_t)16, pieceMsg->begin);
|
||||
|
@ -210,8 +210,8 @@ void BtRequestMessageTest::testDoReceivedAction_doesntHavePieceAndFastExtensionE
|
|||
msg->doReceivedAction();
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)1, _dispatcher->messageQueue.size());
|
||||
MockBtMessage2* pieceMsg =
|
||||
(MockBtMessage2*)_dispatcher->messageQueue.front().get();
|
||||
SharedHandle<MockBtMessage2> pieceMsg =
|
||||
dynamic_pointer_cast<MockBtMessage2>(_dispatcher->messageQueue.front());
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("reject"), pieceMsg->type);
|
||||
CPPUNIT_ASSERT_EQUAL((size_t)2, pieceMsg->index);
|
||||
CPPUNIT_ASSERT_EQUAL((uint32_t)16, pieceMsg->begin);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue