From: bert hubert Date: Fri, 30 Oct 2015 19:15:17 +0000 (+0100) Subject: add some more unit tests for DNSName X-Git-Tag: dnsdist-1.0.0-alpha1~270 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=879d161a9335a07346a00f94e6c1f2907e7fa07b;p=pdns add some more unit tests for DNSName --- diff --git a/pdns/test-dnsname_cc.cc b/pdns/test-dnsname_cc.cc index b0a5948dd..f0b640da2 100644 --- a/pdns/test-dnsname_cc.cc +++ b/pdns/test-dnsname_cc.cc @@ -347,6 +347,11 @@ BOOST_AUTO_TEST_CASE(test_compare_canonical) { BOOST_CHECK(DNSName("BeRt.com").canonCompare(DNSName("WWW.berT.com"))); BOOST_CHECK(!DNSName("www.BeRt.com").canonCompare(DNSName("WWW.berT.com"))); + CanonDNSNameCompare a; + BOOST_CHECK(a(DNSName("."), DNSName("www.powerdns.com"))); + BOOST_CHECK(a(DNSName("."), DNSName("www.powerdns.net"))); + BOOST_CHECK(!a(DNSName("www.powerdns.net"), DNSName("."))); + vector vec; for(const std::string& a : {"bert.com.", "alpha.nl.", "articles.xxx.", "Aleph1.powerdns.com.", "ZOMG.powerdns.com.", "aaa.XXX.", "yyy.XXX.",