tests: drop redundant calls to Interest::setCanBePrefix(false)
Change-Id: I320c874e2a39d5fe374b5e8d3c0c53a144501e33
diff --git a/tests/unit/database-test-data.cpp b/tests/unit/database-test-data.cpp
index 3ec18ae..9188eff 100644
--- a/tests/unit/database-test-data.cpp
+++ b/tests/unit/database-test-data.cpp
@@ -85,7 +85,7 @@
io::save(m_cert, TEST_CERT.string());
NDNS_LOG_INFO("save test root cert " << m_certName << " to: " << TEST_CERT.string());
- BOOST_ASSERT(m_certName.size() > 0);
+ BOOST_ASSERT(!m_certName.empty());
NDNS_LOG_TRACE("test certName: " << m_certName);
int certificateIndex = 0;
@@ -139,20 +139,18 @@
rrset = rf.generateNsRrset(label, version.toVersion(), ttl, {"/xx"});
if (contentType != NDNS_AUTH) {
// do not add AUTH packet to link
- m_links.push_back(Link(rrset.getData()));
+ m_links.emplace_back(rrset.getData());
}
}
else if (type == label::TXT_RR_TYPE) {
- rrset = rf.generateTxtRrset(label, version.toVersion(), ttl,
- std::vector<std::string>());
+ rrset = rf.generateTxtRrset(label, version.toVersion(), ttl, {});
}
else if (type == label::APPCERT_RR_TYPE) {
- rrset = rf.generateCertRrset(label, version.toVersion(), ttl,
- m_cert);
+ rrset = rf.generateCertRrset(label, version.toVersion(), ttl, m_cert);
}
- auto data = make_shared<Data>(rrset.getData());
- security::verifySignature(*data, m_cert);
+ auto data = std::make_shared<Data>(rrset.getData());
+ BOOST_VERIFY(security::verifySignature(*data, m_cert));
ManagementTool tool(TEST_DATABASE.string(), m_keyChain);
tool.addRrset(rrset);