]> granicus.if.org Git - pdns/commitdiff
Add empty ComboAddress equality unit-test
authorPieter Lexis <pieter.lexis@powerdns.com>
Mon, 18 Jan 2016 14:21:50 +0000 (15:21 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Mon, 18 Jan 2016 16:32:49 +0000 (17:32 +0100)
pdns/test-iputils_hh.cc

index 89076bd4858eb333cb993b53fd2de9114d921c83..37e09bd8bf278db3c68eaf7b17e05179a6d847f8 100644 (file)
@@ -33,6 +33,12 @@ BOOST_AUTO_TEST_CASE(test_ComboAddress) {
   
   withport = ComboAddress("[::]:5300", 53);
   BOOST_CHECK_EQUAL(withport.sin4.sin_port, htons(5300));
+
+  // Verify that 2 'empty' ComboAddresses are equal, used in syncres.hh to
+  // signal auth-zones
+  ComboAddress a = ComboAddress();
+  ComboAddress b = ComboAddress();
+  BOOST_CHECK(a == b);
 }
 
 BOOST_AUTO_TEST_CASE(test_ComboAddressTruncate) {