[mlpack] 17/30: Change formatted output test
Barak A. Pearlmutter
barak+git at pearlmutter.net
Mon Dec 26 10:15:26 UTC 2016
This is an automated email from the git hooks/post-receive script.
bap pushed a commit to branch master
in repository mlpack.
commit 3eaad751fe7d2eace55ce6f121281b0640080757
Author: shikhar <shikharbhardwaj68 at gmail.com>
Date: Fri Dec 16 16:06:26 2016 +0530
Change formatted output test
---
src/mlpack/tests/cli_test.cpp | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/mlpack/tests/cli_test.cpp b/src/mlpack/tests/cli_test.cpp
index 0f5650f..06200ea 100644
--- a/src/mlpack/tests/cli_test.cpp
+++ b/src/mlpack/tests/cli_test.cpp
@@ -289,6 +289,20 @@ BOOST_AUTO_TEST_CASE(TestPrefixedOutStreamModifiers)
}
/**
+ * Test formatted output.
+ */
+BOOST_AUTO_TEST_CASE(TestFormattedOutput)
+{
+ std::stringstream ss;
+ PrefixedOutStream pss(ss, BASH_GREEN "[INFO ]" BASH_CLEAR);
+
+ const double pi = std::acos(-1.0);
+ pss << std::setprecision(10) << pi;
+
+ BOOST_REQUIRE_EQUAL(ss.str(),
+ BASH_GREEN "[INFO ]" BASH_CLEAR "3.141592654");
+}
+/**
* We should be able to start and then stop a timer multiple times and it should
* save the value.
*/
@@ -349,18 +363,5 @@ BOOST_AUTO_TEST_CASE(TwiceStopTimerTest)
BOOST_REQUIRE_THROW(Timer::Stop("test_timer"), std::runtime_error);
}
-/**
- * Test formatted output.
- */
-BOOST_AUTO_TEST_CASE(TestFormattedOutput)
-{
- std::stringstream ss;
- PrefixedOutStream pss(ss, BASH_GREEN "[INFO ]" BASH_CLEAR);
- const double pi = std::acos(-1.0);
- pss << std::setprecision(10) << pi;
-
- BOOST_REQUIRE_EQUAL(ss.str(),
- BASH_GREEN "[INFO ]" BASH_CLEAR "3.141592654");
-}
BOOST_AUTO_TEST_SUITE_END();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git
More information about the debian-science-commits
mailing list