publisher: fix encoding bug in routing table publisher
refs: #4453
Change-Id: I03e819e963f0957f3d40ff25e378f2b9b17357b7
diff --git a/tests/publisher/test-dataset-interest-handler.cpp b/tests/publisher/test-dataset-interest-handler.cpp
index ccd3b64..7cc4a84 100644
--- a/tests/publisher/test-dataset-interest-handler.cpp
+++ b/tests/publisher/test-dataset-interest-handler.cpp
@@ -102,7 +102,7 @@
face.receive(ndn::Interest(ndn::Name("/localhost/nlsr/routing-table")));
processDatasetInterest(face,
[] (const ndn::Block& block) {
- return block.type() == ndn::tlv::nlsr::RouteTableEntry; });
+ return block.type() == ndn::tlv::nlsr::RoutingTable; });
}
@@ -147,7 +147,7 @@
face.receive(ndn::Interest(ndn::Name("/ndn/This/Router/routing-table")));
processDatasetInterest(face,
[] (const ndn::Block& block) {
- return block.type() == ndn::tlv::nlsr::RouteTableEntry; });
+ return block.type() == ndn::tlv::nlsr::RoutingTable; });
}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/tlv/test-routing-table-entry.cpp b/tests/tlv/test-routing-table-entry.cpp
index 5b882a2..a58918e 100644
--- a/tests/tlv/test-routing-table-entry.cpp
+++ b/tests/tlv/test-routing-table-entry.cpp
@@ -178,11 +178,11 @@
std::ostringstream os;
os << rt;
- BOOST_CHECK_EQUAL(os.str(), "Routing Table: \n"
- "Destination: /dest1\n"
- "Nexthops: NexthopList(\n"
- "NextHop(Uri: nexthop1, Cost: 99)\n"
- "\n)");
+ BOOST_CHECK_EQUAL(os.str(),
+ "Destination: /dest1\n"
+ "NexthopList(\n"
+ "NextHop(Uri: nexthop1, Cost: 99)\n"
+ ")");
}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/tests/tlv/test-routing-table.cpp b/tests/tlv/test-routing-table.cpp
index c4b798f..c7af5ae 100644
--- a/tests/tlv/test-routing-table.cpp
+++ b/tests/tlv/test-routing-table.cpp
@@ -155,11 +155,10 @@
os << rtStatus;
BOOST_CHECK_EQUAL(os.str(), "Routing Table Status: \n"
- "Routing Table: \n"
"Destination: /dest1\n"
- "Nexthops: NexthopList(\n"
+ "NexthopList(\n"
"NextHop(Uri: nexthop, Cost: 99)\n"
- "\n)");
+ ")");
}
BOOST_AUTO_TEST_SUITE_END()