| 64 | } |
| 65 | |
| 66 | void BtAllowedFastMessageTest::testCreateMessage() |
| 67 | { |
| 68 | BtAllowedFastMessage msg; |
| 69 | msg.setIndex(12345); |
| 70 | unsigned char data[9]; |
| 71 | bittorrent::createPeerMessageString(data, sizeof(data), 5, 17); |
| 72 | bittorrent::setIntParam(&data[5], 12345); |
| 73 | auto rawmsg = msg.createMessage(); |
| 74 | CPPUNIT_ASSERT_EQUAL((size_t)9, rawmsg.size()); |
| 75 | CPPUNIT_ASSERT(std::equal(std::begin(rawmsg), std::end(rawmsg), data)); |
| 76 | } |
| 77 | |
| 78 | void BtAllowedFastMessageTest::testDoReceivedAction() |
| 79 | { |
nothing calls this directly
no test coverage detected