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

Method testCreateMessage

test/BtHaveAllMessageTest.cc:63–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void BtHaveAllMessageTest::testCreateMessage()
64{
65 BtHaveAllMessage msg;
66 unsigned char data[5];
67 bittorrent::createPeerMessageString(data, sizeof(data), 1, 14);
68 auto rawmsg = msg.createMessage();
69 CPPUNIT_ASSERT_EQUAL((size_t)5, rawmsg.size());
70 CPPUNIT_ASSERT(std::equal(std::begin(rawmsg), std::end(rawmsg), data));
71}
72
73void BtHaveAllMessageTest::testDoReceivedAction()
74{

Callers

nothing calls this directly

Calls 3

createPeerMessageStringFunction · 0.85
createMessageMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected