]> granicus.if.org Git - pdns/commitdiff
add two more DNSName tests
authorbert hubert <bert.hubert@netherlabs.nl>
Sat, 7 Nov 2015 20:05:23 +0000 (21:05 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Sat, 7 Nov 2015 20:05:23 +0000 (21:05 +0100)
pdns/test-dnsname_cc.cc

index 485fdb97852bbe4e1137c1ce8b17606b1e30ae96..d21d36123d0277bf9711138559d0f370ecffb8d0 100644 (file)
@@ -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());
 }