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

Method testReceivedErrorMessage

test/DHTMessageFactoryImplTest.cc:462–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462void DHTMessageFactoryImplTest::testReceivedErrorMessage()
463{
464 Dict dict;
465 dict.put("t", String::g(transactionID, DHT_TRANSACTION_ID_LENGTH));
466 dict.put("y", "e");
467 auto list = List::g();
468 list->append(Integer::g(404));
469 list->append("Not found");
470 dict.put("e", std::move(list));
471
472 try {
473 factory->createResponseMessage("announce_peer", &dict,
474 remoteNode_->getIPAddress(),
475 remoteNode_->getPort());
476 CPPUNIT_FAIL("exception must be thrown.");
477 }
478 catch (RecoverableException& e) {
479 std::cerr << e.stackTrace() << std::endl;
480 }
481}
482
483} // namespace aria2

Callers

nothing calls this directly

Calls 5

stackTraceMethod · 0.80
putMethod · 0.45
appendMethod · 0.45
createResponseMessageMethod · 0.45
getPortMethod · 0.45

Tested by

no test coverage detected