From: Pieter Lexis Date: Mon, 18 Jan 2016 14:21:50 +0000 (+0100) Subject: Add empty ComboAddress equality unit-test X-Git-Tag: dnsdist-1.0.0-alpha2~54^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c9ff7d54ae3a27ab0b3e03add95c5aac02994f9f;p=pdns Add empty ComboAddress equality unit-test --- diff --git a/pdns/test-iputils_hh.cc b/pdns/test-iputils_hh.cc index 89076bd48..37e09bd8b 100644 --- a/pdns/test-iputils_hh.cc +++ b/pdns/test-iputils_hh.cc @@ -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) {