From c9ff7d54ae3a27ab0b3e03add95c5aac02994f9f Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Mon, 18 Jan 2016 15:21:50 +0100 Subject: [PATCH] Add empty ComboAddress equality unit-test --- pdns/test-iputils_hh.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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) { -- 2.40.0