]> granicus.if.org Git - pdns/commitdiff
disable boost random tests for now, plus remove some boost thigns from zoneparser...
authorbert hubert <bert.hubert@netherlabs.nl>
Fri, 20 Feb 2015 15:41:40 +0000 (16:41 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Fri, 20 Feb 2015 15:41:40 +0000 (16:41 +0100)
pdns/test-dns_random_hh.cc
pdns/test-zoneparser_tng_cc.cc

index 7c839b341649d3dc544ec5221bcdf67f73497823..c4e1fbb5cd3a4e49763c6d406c9656d4cde8282f 100644 (file)
@@ -1,5 +1,9 @@
 #define BOOST_TEST_DYN_LINK
 #define BOOST_TEST_NO_MAIN
+
+#include "config.h"
+#ifndef HAVE_CXX11 
+
 #include <boost/test/unit_test.hpp>
 #include <boost/assign/std/map.hpp>
 #include <boost/foreach.hpp>
@@ -11,6 +15,7 @@
 #include "dns_random.hh"
 #include "namespaces.hh"
 
+
 using namespace boost;
 using namespace boost::accumulators;
 
@@ -25,18 +30,25 @@ typedef accumulator_set<
 
 BOOST_AUTO_TEST_SUITE(test_dns_random_hh)
 
+
+
 BOOST_AUTO_TEST_CASE(test_dns_random_average) {
+
   dns_random_init("loremipsumdolorx");
   acc_t acc;
 
-
   for(unsigned int n=0; n < 100000; ++n)  {
     acc(dns_random(100000)/100000.0);
   }
   BOOST_CHECK_CLOSE(0.5, median(acc), 2.0); // within 2%
   BOOST_CHECK_CLOSE(0.5, mean(acc), 2.0);
   
+
   // please add covariance tests, chi-square, Kolmogorov-Smirnov
 }
 
+
+
 BOOST_AUTO_TEST_SUITE_END()
+
+#endif
\ No newline at end of file
index 506fcdff39b7dd074e5bc970432bdbc7c335f3f7..0445a157f421eb31d15e9c3c07e83548dda265ef 100644 (file)
@@ -26,7 +26,7 @@ BOOST_AUTO_TEST_CASE(test_tng_record_types) {
   ZoneParserTNG zp(pathbuf.str(), "unit.test");
   DNSResourceRecord rr;
 
-  boost::iostreams::stream<boost::iostreams::file_source> ifs(pathbuf.str());
+  ifstream ifs(pathbuf.str());
 
   while(zp.get(rr)) {
     // make sure these concur.