From 31c2df981dd096a58c440f37b4d82ea6f48ac85d Mon Sep 17 00:00:00 2001 From: bert hubert Date: Fri, 30 Oct 2015 20:15:17 +0100 Subject: [PATCH] add some more unit tests for DNSName --- pdns/test-dnsname_cc.cc | 5 +++++ 1 file changed, 5 insertions(+) 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.", -- 2.40.0