From b3c33272c6a7860568415cb8bcfc40c9d1f43c12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20B=C3=BChler?= Date: Thu, 28 Dec 2017 23:09:38 +0100 Subject: [PATCH] test-dnsrecords: fix reversed logic for broken bad-values check --- pdns/test-dnsrecords_cc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); } -- 2.40.0