MCPcopy Create free account
hub / github.com/aria2/aria2 / testCreateMessage

Method testCreateMessage

test/BtNotInterestedMessageTest.cc:60–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void BtNotInterestedMessageTest::testCreateMessage()
61{
62 BtNotInterestedMessage msg;
63 unsigned char data[5];
64 bittorrent::createPeerMessageString(data, sizeof(data), 1, 3);
65 auto rawmsg = msg.createMessage();
66 CPPUNIT_ASSERT_EQUAL((size_t)5, rawmsg.size());
67 CPPUNIT_ASSERT(std::equal(std::begin(rawmsg), std::end(rawmsg), data));
68}
69
70void BtNotInterestedMessageTest::testDoReceivedAction()
71{

Callers

nothing calls this directly

Calls 3

createPeerMessageStringFunction · 0.85
createMessageMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected