| 460 | } |
| 461 | |
| 462 | void 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 |
nothing calls this directly
no test coverage detected