From: Stefan Bühler Date: Thu, 28 Dec 2017 22:09:38 +0000 (+0100) Subject: test-dnsrecords: fix reversed logic for broken bad-values check X-Git-Tag: dnsdist-1.3.0~172^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3c33272c6a7860568415cb8bcfc40c9d1f43c12;p=pdns test-dnsrecords: fix reversed logic for broken bad-values check --- diff --git a/pdns/test-dnsrecords_cc.cc b/pdns/test-dnsrecords_cc.cc index 665cfd2de..3b1402a96 100644 --- a/pdns/test-dnsrecords_cc.cc +++ b/pdns/test-dnsrecords_cc.cc @@ -279,7 +279,7 @@ BOOST_AUTO_TEST_CASE(test_record_types_bad_values) { if (val.get<3>()) { bool success=true; BOOST_WARN_EXCEPTION( { auto drc = DNSRecordContent::mastermake(q.getCode(), 1, val.get<1>()); pw.startRecord(DNSName("unit.test"), q.getCode()); drc->toPacket(pw); success=false; }, std::exception, test_dnsrecords_cc_predicate ); - if (success==false) REC_FAIL_XSUCCESS2(q.getName() << " test #" << n << " has unexpectedly passed"); // a bad record was detected when it was supposed not to be detected + if (success) REC_FAIL_XSUCCESS2(q.getName() << " test #" << n << " has unexpectedly passed"); // a bad record was detected when it was supposed not to be detected } else { BOOST_CHECK_EXCEPTION( { auto drc = DNSRecordContent::mastermake(q.getCode(), 1, val.get<1>()); pw.startRecord(DNSName("unit.test"), q.getCode()); drc->toPacket(pw); }, std::exception, test_dnsrecords_cc_predicate ); }