| 94 | } |
| 95 | |
| 96 | void BtPortMessageTest::testCreateMessage() |
| 97 | { |
| 98 | BtPortMessage msg(6881); |
| 99 | unsigned char data[7]; |
| 100 | bittorrent::createPeerMessageString(data, sizeof(data), 3, 9); |
| 101 | bittorrent::setShortIntParam(&data[5], 6881); |
| 102 | auto rawmsg = msg.createMessage(); |
| 103 | CPPUNIT_ASSERT_EQUAL((size_t)7, rawmsg.size()); |
| 104 | CPPUNIT_ASSERT(std::equal(std::begin(rawmsg), std::end(rawmsg), data)); |
| 105 | } |
| 106 | |
| 107 | void BtPortMessageTest::testDoReceivedAction() |
| 108 | { |
nothing calls this directly
no test coverage detected