]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Explicitly call reportAllTypes() on test suite init, it is needed for various tests.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 15 Apr 2019 10:32:18 +0000 (12:32 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 15 Apr 2019 12:06:18 +0000 (14:06 +0200)
pdns/recursordist/test-syncres_cc.cc
pdns/recursordist/testrunner.cc
pdns/test-dnsrecordcontent.cc
pdns/test-dnsrecords_cc.cc

index 4b5e6297225b103aa743da7232ea85819c7bd0f5..f31f115e721658bfe8bc689fd76acb1118693c86 100644 (file)
@@ -113,8 +113,6 @@ static void init(bool debug=false)
     g_log.toConsole(Logger::Error);
   }
 
-  reportAllTypes();
-
   t_RC = std::unique_ptr<MemRecursorCache>(new MemRecursorCache());
 
   SyncRes::s_maxqperq = 50;
index b6a685288678178690367322c76c72989dab8ebd..78c2a1d4f5f9b382b9678ac29342ce030c16663c 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 #define BOOST_TEST_DYN_LINK
-#define BOOST_TEST_MAIN
-#define BOOST_TEST_MODULE unit
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 #include <boost/test/unit_test.hpp>
 
+#include <iostream>
+#include <dnsrecords.hh>
 
+bool init_unit_test() {
+  std::cerr << "Initing..." << std::endl;
+  reportAllTypes();
+  return true;
+}
+
+// entry point:
+int main(int argc, char* argv[])
+{
+  return boost::unit_test::unit_test_main( &init_unit_test, argc, argv );
+}
index 1d99f1f6c519f42e324c3ab9c5da1324be45932b..527b49b8dd9471f6bc6c73d8a21b9135d4f4214e 100644 (file)
@@ -10,7 +10,6 @@
 BOOST_AUTO_TEST_SUITE(test_dnsrecordcontent)
 
 BOOST_AUTO_TEST_CASE(test_equality) {
-  reportAllTypes();
   ComboAddress ip("1.2.3.4"), ip2("10.0.0.1"), ip6("::1");
   ARecordContent a1(ip), a2(ip), a3(ip2);
   AAAARecordContent aaaa(ip6), aaaa1(ip6);
index 764d8fdf367343b08c2ac14e6f64ba7e760ba851..5e50111a3f1d6a3bef404f3c762124090d37aeae 100644 (file)
@@ -44,7 +44,6 @@ BOOST_AUTO_TEST_CASE(test_record_types) {
   // tuple contains <type, user value, zone representation, line value, broken>
   typedef boost::tuple<QType::typeenum, std::string, std::string, std::string, broken_marker> case_t;
   typedef std::list<case_t> cases_t;
-  reportAllTypes();
   MRRecordContent::report();
   IPSECKEYRecordContent::report();
   KXRecordContent::report();