Commit 30c527ee authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[1397] Add missing TreeNodeRRset::addRdata() implementation for new interface

parent 6db69288
......@@ -195,6 +195,11 @@ TreeNodeRRset::addRdata(const rdata::Rdata&) {
isc_throw(Unexpected, "unexpected method called on TreeNodeRRset");
}
void
TreeNodeRRset::addRdata(const std::string&) {
isc_throw(Unexpected, "unexpected method called on TreeNodeRRset");
}
namespace {
// In this namespace we define a set of helper stuff to implement the
// RdataIterator for the TreeNodeRRset. We should eventually optimize
......
......@@ -204,6 +204,11 @@ public:
/// It throws \c isc::Unexpected unconditionally.
virtual void addRdata(const dns::rdata::Rdata& rdata);
/// \brief Specialized version of \c addRdata() for \c TreeNodeRRset.
///
/// It throws \c isc::Unexpected unconditionally.
virtual void addRdata(const std::string& rdata_str);
virtual dns::RdataIteratorPtr getRdataIterator() const;
/// \brief Specialized version of \c getRRsig() for \c TreeNodeRRset.
......
......@@ -663,6 +663,7 @@ TEST_F(TreeNodeRRsetTest, unexpectedMethods) {
EXPECT_THROW(rrset.setTTL(RRTTL(0)), isc::Unexpected);
EXPECT_THROW(rrset.addRdata(createRdata(RRType::A(), rrclass_, "0.0.0.0")),
isc::Unexpected);
EXPECT_THROW(rrset.addRdata("0.0.0.0"), isc::Unexpected);
RdataPtr sig_rdata = createRdata(
RRType::RRSIG(), rrclass_,
"A 5 2 3600 20120814220826 20120715220826 5300 example.com. FAKE");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment