From 0be7fb56a9c4306e3c36cd59ed56f938caa69109 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Sat, 7 Nov 2015 21:05:23 +0100 Subject: [PATCH] add two more DNSName tests --- pdns/test-dnsname_cc.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pdns/test-dnsname_cc.cc b/pdns/test-dnsname_cc.cc index 485fdb978..d21d36123 100644 --- a/pdns/test-dnsname_cc.cc +++ b/pdns/test-dnsname_cc.cc @@ -160,6 +160,9 @@ BOOST_AUTO_TEST_CASE(test_trim) { BOOST_CHECK_EQUAL(w.toString(), "powerdns.com."); DNSName w2("powerdns.com."); BOOST_CHECK(w==w2); + + DNSName root("."); + BOOST_CHECK_EQUAL(root.countLabels(), 0); } BOOST_AUTO_TEST_CASE(test_toolong) { @@ -197,6 +200,9 @@ BOOST_AUTO_TEST_CASE(test_specials) { DNSName wcard("*.powerdns.com"); BOOST_CHECK(wcard.isWildcard()); + + DNSName notwcard("www.powerdns.com"); + BOOST_CHECK(!notwcard.isWildcard()); } -- 2.40.0