[mlpack] [mlpack/mlpack] Fixes #755 Log compatibility with std::fixed and std::setprecision (#832)
Ryan Curtin
notifications at github.com
Thu Dec 15 15:32:36 EST 2016
Nice, thanks! Can you add this test to `cli_test.cpp` and see if it works?
```
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::precision(10) << pi;
BOOST_REQUIRE_EQUAL(ss.str(),
BASH_GREEN "[INFO ]" BASH_CLEAR "3.141592654");
}
```
After building `mlpack_test` you can test with `mlpack_test -t CLITest/TestFormattedOutput`.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/832#issuecomment-267436188
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://knife.lugatgt.org/pipermail/mlpack/attachments/20161215/addf954f/attachment.html>
More information about the mlpack
mailing list