Subject: [Boost-bugs] [Boost C++ Libraries] #12631: BOOST_TEST_MESSAGE generates incorrect output when used in BOOST_DATA_TEST_CASE
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-11-29 04:44:59
#12631: BOOST_TEST_MESSAGE generates incorrect output when used in
BOOST_DATA_TEST_CASE
---------------------------------------------+---------------------
Reporter: Philip Miller <philip.miller@â¦> | Owner: rogeeff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
Version: Boost 1.61.0 | Severity: Problem
Keywords: |
---------------------------------------------+---------------------
When I use BOOST_TEST_MESSAGE in a BOOST_DATA_TEST_CASE, I get the
following misleading/incorrect output:
{{{
Entering test case "test_update"
Testing update :
Failure occurred in a following context:
filename = util/test_image2.jpg;
Update Volume with 100
Failure occurred in a following context:
filename = util/test_image2.jpg;
Test case TestReadImageComment/test_update did not check any assertions
}}}
The context is the the boost data test case arguments even though there
are no test errors. I tried debugging the code, but how to fix this is not
obvious to me.
Here is the modified test from the BOOST_TEST_MESSAGE documentation:
{{{
#if 0
BOOST_AUTO_TEST_CASE(test_update) //, *utf::disabled())
#else
std::string filenames[] = { "util/test_image2.jpg" };
BOOST_DATA_TEST_CASE(test_update,
btd::make(filenames),
filename)
#endif
{
std::string field_name = "Volume";
int value = 100;
BOOST_TEST_MESSAGE("Testing update :");
BOOST_TEST_MESSAGE("Update " << field_name << " with " << value);
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/12631> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC