diff options
author | Mukund Sivaraman <muks@isc.org> | 2013-01-28 10:54:34 +0100 |
---|---|---|
committer | Mukund Sivaraman <muks@isc.org> | 2013-01-29 05:59:00 +0100 |
commit | e8c5250c5b3924c34159c92b2e3a23b8878572e6 (patch) | |
tree | 65b1047fecadc51b2c8d0ec45b2cfc3f2f349021 /src/lib/dns/tests/rdata_mx_unittest.cc | |
parent | [2390] Update std::string NS constructor to use the MasterLexer (diff) | |
download | kea-e8c5250c5b3924c34159c92b2e3a23b8878572e6.tar.xz kea-e8c5250c5b3924c34159c92b2e3a23b8878572e6.zip |
[2390] Update std::string MX constructor to use the MasterLexer
Also adjust tests.
Diffstat (limited to 'src/lib/dns/tests/rdata_mx_unittest.cc')
-rw-r--r-- | src/lib/dns/tests/rdata_mx_unittest.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/dns/tests/rdata_mx_unittest.cc b/src/lib/dns/tests/rdata_mx_unittest.cc index 59639444a7..e1ae811a56 100644 --- a/src/lib/dns/tests/rdata_mx_unittest.cc +++ b/src/lib/dns/tests/rdata_mx_unittest.cc @@ -38,7 +38,7 @@ class Rdata_MX_Test : public RdataTest { const generic::MX rdata_mx(10, Name("mx.example.com")); TEST_F(Rdata_MX_Test, createFromText) { - const generic::MX rdata_mx2("10 mx.example.com"); + const generic::MX rdata_mx2("10 mx.example.com."); EXPECT_EQ(0, rdata_mx2.compare(rdata_mx)); } @@ -48,6 +48,9 @@ TEST_F(Rdata_MX_Test, badText) { EXPECT_THROW(const generic::MX rdata_mx("SPOON"), InvalidRdataText); EXPECT_THROW(const generic::MX rdata_mx("10 mx. example.com."), InvalidRdataText); + // No origin and relative + EXPECT_THROW(const generic::MX rdata_mx("10 mx.example.com"), + MissingNameOrigin); } TEST_F(Rdata_MX_Test, copy) { |