]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
add a test for single character labels and how they compare after our 'a.root-servers... 6229/head
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 25 Jan 2018 21:32:54 +0000 (22:32 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Thu, 25 Jan 2018 21:32:54 +0000 (22:32 +0100)
pdns/test-dnsname_cc.cc

index 31efaf3ce84319a3a666bd834f9311bee441395c..93ed7eb81a9350e8fbdae8b7139631d71fab0d63 100644 (file)
@@ -15,6 +15,13 @@ using std::string;
 BOOST_AUTO_TEST_SUITE(dnsname_cc)
 
 BOOST_AUTO_TEST_CASE(test_basic) {
+  DNSName aroot("a.root-servers.net"), broot("b.root-servers.net");
+  BOOST_CHECK(aroot < broot);
+  BOOST_CHECK(!(broot < aroot));  
+  BOOST_CHECK(aroot.canonCompare(broot));
+  BOOST_CHECK(!broot.canonCompare(aroot));  
+  
+
   string before("www.ds9a.nl.");
   DNSName b(before);
   BOOST_CHECK_EQUAL(b.getRawLabels().size(), 3);