diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-08 00:51:20 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-09 21:39:43 +0900 |
| commit | b97a7c8ecf410daaac12346c91591d15772f3c7f (patch) | |
| tree | 2a7b686043ee2d835fc0810a4e060857881702cd /test/BtCancelMessageTest.cc | |
| parent | 9d15d732edd512a3ff03147da459feaddde511fe (diff) | |
Use int32_t for begin, length in RangeBtMessage
Diffstat (limited to 'test/BtCancelMessageTest.cc')
| -rw-r--r-- | test/BtCancelMessageTest.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/BtCancelMessageTest.cc b/test/BtCancelMessageTest.cc index 11f6c615..79621841 100644 --- a/test/BtCancelMessageTest.cc +++ b/test/BtCancelMessageTest.cc @@ -33,14 +33,15 @@ public: class MockBtMessageDispatcher2 : public MockBtMessageDispatcher { public: size_t index; - uint32_t begin; - size_t length; + int32_t begin; + int32_t length; public: MockBtMessageDispatcher2():index(0), begin(0), length(0) {} - virtual void doCancelSendingPieceAction(size_t index, uint32_t begin, size_t length) { + virtual void doCancelSendingPieceAction + (size_t index, int32_t begin, int32_t length) { this->index = index; this->begin = begin; this->length = length; @@ -60,8 +61,8 @@ void BtCancelMessageTest::testCreate() { SharedHandle<BtCancelMessage> pm = BtCancelMessage::create(&msg[4], 13); CPPUNIT_ASSERT_EQUAL((uint8_t)8, pm->getId()); CPPUNIT_ASSERT_EQUAL((size_t)12345, pm->getIndex()); - CPPUNIT_ASSERT_EQUAL((uint32_t)256, pm->getBegin()); - CPPUNIT_ASSERT_EQUAL((size_t)1024, pm->getLength()); + CPPUNIT_ASSERT_EQUAL(256, pm->getBegin()); + CPPUNIT_ASSERT_EQUAL(1024, pm->getLength()); // case: payload size is wrong try { |
