Commit 6cd40e80 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

added getNSName()


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@545 e5f2f494-b856-4b98-b285-d166d9295462
parent 4a72bd95
......@@ -180,6 +180,12 @@ NS::compare(const Rdata& other) const
return (compareNames(nsname_, other_ns.nsname_));
}
const Name&
NS::getNSName() const
{
return (nsname_);
}
SOA::SOA(InputBuffer& buffer, size_t rdata_len) :
mname_(buffer), rname_(buffer)
{
......
......@@ -145,6 +145,10 @@ public:
virtual void toWire(OutputBuffer& buffer) const;
virtual void toWire(MessageRenderer& buffer) const;
virtual int compare(const Rdata& other) const;
///
/// Specialized methods
///
const Name& getNSName() const;
private:
Name nsname_;
};
......
......@@ -304,6 +304,11 @@ TEST_F(RdataTest, compare_NS)
EXPECT_GT(0, small.compare(large));
}
TEST_F(RdataTest, getNSName)
{
EXPECT_EQ(Name("ns.example.com"), rdata_ns.getNSName());
}
TEST_F(RdataTest, createFromText_SOA)
{
//TBD
......
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