[mlpack-git] master: Suppress non-bad warnings; they confuse people. The homebrew-science folks are confused by these. (5707e99)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Wed Feb 11 22:41:52 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/8b3dd9b9dfabadaeb7d62151162f20e1bf9fbbe3...5707e99d911e58f7dc37fb3ebe49cbde1066e208
>---------------------------------------------------------------
commit 5707e99d911e58f7dc37fb3ebe49cbde1066e208
Author: Ryan Curtin <ryan at ratml.org>
Date: Wed Feb 11 22:39:04 2015 -0500
Suppress non-bad warnings; they confuse people.
The homebrew-science folks are confused by these.
>---------------------------------------------------------------
5707e99d911e58f7dc37fb3ebe49cbde1066e208
src/mlpack/tests/load_save_test.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/mlpack/tests/load_save_test.cpp b/src/mlpack/tests/load_save_test.cpp
index d889dea..8b27ea2 100644
--- a/src/mlpack/tests/load_save_test.cpp
+++ b/src/mlpack/tests/load_save_test.cpp
@@ -21,7 +21,9 @@ BOOST_AUTO_TEST_SUITE(LoadSaveTest);
BOOST_AUTO_TEST_CASE(NoExtensionLoad)
{
arma::mat out;
+ Log::Warn.ignoreInput = true;
BOOST_REQUIRE(data::Load("noextension", out) == false);
+ Log::Warn.ignoreInput = false;
}
/**
@@ -30,7 +32,9 @@ BOOST_AUTO_TEST_CASE(NoExtensionLoad)
BOOST_AUTO_TEST_CASE(NoExtensionSave)
{
arma::mat out;
+ Log::Warn.ignoreInput = true;
BOOST_REQUIRE(data::Save("noextension", out) == false);
+ Log::Warn.ignoreInput = false;
}
/**
@@ -39,7 +43,9 @@ BOOST_AUTO_TEST_CASE(NoExtensionSave)
BOOST_AUTO_TEST_CASE(NotExistLoad)
{
arma::mat out;
+ Log::Warn.ignoreInput = true;
BOOST_REQUIRE(data::Load("nonexistentfile_______________.csv", out) == false);
+ Log::Warn.ignoreInput = false;
}
/**
@@ -314,7 +320,9 @@ BOOST_AUTO_TEST_CASE(LoadRawBinaryTest)
== true);
// Now reload through our interface.
+ Log::Warn.ignoreInput = true;
BOOST_REQUIRE(data::Load("test_file.bin", test) == true);
+ Log::Warn.ignoreInput = false;
BOOST_REQUIRE_EQUAL(test.n_rows, 1);
BOOST_REQUIRE_EQUAL(test.n_cols, 8);
@@ -502,10 +510,13 @@ BOOST_AUTO_TEST_CASE(NoHDF5Test)
arma::mat test;
test.randu(5, 5);
+ // Stop warnings.
+ Log::Warn.ignoreInput = true;
BOOST_REQUIRE(data::Save("test_file.h5", test) == false);
BOOST_REQUIRE(data::Save("test_file.hdf5", test) == false);
BOOST_REQUIRE(data::Save("test_file.hdf", test) == false);
BOOST_REQUIRE(data::Save("test_file.he5", test) == false);
+ Log::Warn.ignoreInput = false;
}
#endif
More information about the mlpack-git
mailing list