From: Otto Moerbeek Date: Wed, 9 Feb 2022 10:58:34 +0000 (+0100) Subject: Use assert instead of BOOST_CHECK in a tight loop as BOOST_CHECK is reaaaaally slow. X-Git-Tag: auth-4.7.0-alpha1~14^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e2745ccdc000e43c859de75424d288cf5111b83c;p=thirdparty%2Fpdns.git Use assert instead of BOOST_CHECK in a tight loop as BOOST_CHECK is reaaaaally slow. --- diff --git a/pdns/test-dnsname_cc.cc b/pdns/test-dnsname_cc.cc index f1fca240c9..41f882df53 100644 --- a/pdns/test-dnsname_cc.cc +++ b/pdns/test-dnsname_cc.cc @@ -431,7 +431,7 @@ BOOST_AUTO_TEST_CASE(test_QuestionHash) { for(unsigned int n = 0; n < 100000; ++n) { packet.clear(); DNSPacketWriter dpw(packet, DNSName(std::to_string(n) + "." + std::to_string(n*2) + "."), QType::AAAA); - BOOST_CHECK(ok); + assert(ok); counts[hashQuestion(&packet[0], packet.size() - 4, 0, ok) % counts.size()]++; }