From: bert hubert Date: Sun, 29 Nov 2015 10:50:26 +0000 (+0100) Subject: add a single-netmask long test case for netmasktree X-Git-Tag: dnsdist-1.0.0-alpha1~174 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b302705ca68d27106ff1a9bcad3649aab02897fc;p=pdns add a single-netmask long test case for netmasktree --- diff --git a/pdns/test-nmtree.cc b/pdns/test-nmtree.cc index 5cb758357..2aaedf8f8 100644 --- a/pdns/test-nmtree.cc +++ b/pdns/test-nmtree.cc @@ -46,6 +46,12 @@ BOOST_AUTO_TEST_CASE(test_basic) { BOOST_CHECK_EQUAL(nmt.lookup(ComboAddress("fe80::1"))->second, 2); } +BOOST_AUTO_TEST_CASE(test_single) { + NetmaskTree nmt; + nmt.insert(Netmask("127.0.0.0/8")).second=1; + BOOST_CHECK_EQUAL(nmt.lookup(ComboAddress("127.0.0.1"))->second, 1); +} + BOOST_AUTO_TEST_CASE(test_scale) { string start="192.168."; NetmaskTree works;