]> granicus.if.org Git - pdns/commitdiff
test-dnsrecords: fix reversed logic for broken bad-values check
authorStefan Bühler <stbuehler@web.de>
Thu, 28 Dec 2017 22:09:38 +0000 (23:09 +0100)
committerStefan Bühler <stbuehler@web.de>
Thu, 28 Dec 2017 22:09:38 +0000 (23:09 +0100)
pdns/test-dnsrecords_cc.cc

index 665cfd2de6edee3d71b404591f4e60b527578bc4..3b1402a96b7bcc70732ae86288d1f3b7205b9e7c 100644 (file)
@@ -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 );
     }