From 77450a67afba78de8b533d970b30d1dfe22c0896 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Tue, 20 Dec 2011 16:31:12 +0000 Subject: [PATCH] Fixes for old Boost.UnitTestFramework. --- src/mlpack/tests/tree_test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mlpack/tests/tree_test.cpp b/src/mlpack/tests/tree_test.cpp index 93c02cbe9d..9116d18644 100644 --- a/src/mlpack/tests/tree_test.cpp +++ b/src/mlpack/tests/tree_test.cpp @@ -25,7 +25,7 @@ BOOST_AUTO_TEST_CASE(HRectBoundEmptyConstructor) { HRectBound<2> b; - BOOST_REQUIRE_EQUAL(b.Dim(), 0); + BOOST_REQUIRE_EQUAL((int) b.Dim(), 0); } /** @@ -846,7 +846,7 @@ BOOST_AUTO_TEST_CASE(PeriodicHRectBoundMinDistancePoint) d[0] = Range(-10.0, 10.0); // Box is of infinite size. point[0] = 810.0; // 800 away from the only image of the box. - BOOST_REQUIRE_CLOSE(d.MinDistance(point), 640000, 1e-5); + BOOST_REQUIRE_CLOSE(d.MinDistance(point), 640000.0, 1e-5); PeriodicHRectBound<2> e(arma::vec("-5.0")); e[0] = Range(2.0, 4.0); // Box size of -5 should function the same as 5. @@ -961,7 +961,7 @@ BOOST_AUTO_TEST_CASE(PeriodicHRectBoundMinDistanceBound) a[0] = Range(2.0, 3.0); d[0] = Range(9.5, 11); - BOOST_REQUIRE_CLOSE(a.MinDistance(d), 1, 1e-5); + BOOST_REQUIRE_CLOSE(a.MinDistance(d), 1.0, 1e-5); }