[mlpack-svn] r14039 - mlpack/trunk/src/mlpack/tests

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Fri Dec 21 12:01:38 EST 2012


Author: trironk3
Date: 2012-12-21 12:01:38 -0500 (Fri, 21 Dec 2012)
New Revision: 14039

Modified:
   mlpack/trunk/src/mlpack/tests/sgd_test.cpp
   mlpack/trunk/src/mlpack/tests/tree_test.cpp
Log:
Resolved tests to compile with ancient versions of boost.

Modified: mlpack/trunk/src/mlpack/tests/sgd_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/sgd_test.cpp	2012-12-21 17:00:51 UTC (rev 14038)
+++ mlpack/trunk/src/mlpack/tests/sgd_test.cpp	2012-12-21 17:01:38 UTC (rev 14039)
@@ -49,7 +49,7 @@
 
     BOOST_REQUIRE_SMALL(result, 1e-10);
     for (size_t j = 0; j < i; ++j)
-      BOOST_REQUIRE_CLOSE(coordinates[j], 1.0, 1e-3);
+      BOOST_REQUIRE_CLOSE(coordinates[j], (double) 1.0, 1e-3);
   }
 }
 

Modified: mlpack/trunk/src/mlpack/tests/tree_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/tree_test.cpp	2012-12-21 17:00:51 UTC (rev 14038)
+++ mlpack/trunk/src/mlpack/tests/tree_test.cpp	2012-12-21 17:01:38 UTC (rev 14039)
@@ -1502,7 +1502,7 @@
 
   // Both points are contained in the one node.
   BinarySpaceTree<HRectBound<2> > twoPoint(dataset);
-  BOOST_REQUIRE_CLOSE(twoPoint.FurthestDescendantDistance(), 2, 1e-5);
+  BOOST_REQUIRE_CLOSE(twoPoint.FurthestDescendantDistance(), 2.0, 1e-5);
 }
 
 // Forward declaration of methods we need for the next test.




More information about the mlpack-svn mailing list