Subject: [Boost-bugs] [Boost C++ Libraries] #7257: Boost.Test alters and does not restore ostream precision after any Test macro
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-08-21 13:59:26
#7257: Boost.Test alters and does not restore ostream precision after any Test
macro
------------------------------+---------------------------------------------
Reporter: pbristow | Owner: rogeeff
Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
Version: Boost 1.51.0 | Severity: Problem
Keywords: test precision |
------------------------------+---------------------------------------------
Boost.Test alters and does not restore ostream precision after any Test
macro.
std::cout.precision(17);
std::streamsize precision1 = std::cout.precision(); // 17
BOOST_TEST_MESSAGE(""); or any BOOST_TEST_* calls.
std::streamsize precision2 = std::cout.precision(); // 6 (default)
BOOST_CHECK_EQUAL(precision1, precision2); // expect both 17
This means that it is necessary to reset precision after every call to a
BOOST_TEST_* macro, which is a tiresome and unexpected feature.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/7257> 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:10 UTC