[mlpack-git] master: Suppress non-bad warnings; they confuse people. The homebrew-science folks are confused by these. (93a21fc)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:16:08 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40

>---------------------------------------------------------------

commit 93a21fc4dd735dc1f4db5cb3df509c273c24354b
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.


>---------------------------------------------------------------

93a21fc4dd735dc1f4db5cb3df509c273c24354b
 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