ddavis2speedray / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Default manipulators for every stringstream Message will create #246

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently the Message class creates a default stringstream for streaming 
expected, actual and auxilary message. There is no way to apply global 
manipulators. I want to be able to print doubles with enough precision 
without having to remember to do a setprecision on every ASSERT/EXPECT. 
Also, if the double is in one of the arguments to ASSERT/EXPECT is a 
double there is no way to control its output.

Message should be modified to at the very least provide enough precision 
by default when printing doubles. A more generic mechanism for providing a 
set of default manipulators to be applied to every stringstream Message 
creates would be useful.

see the discussion in this thread:
http://groups.google.com/group/googletestframework/browse_thread/thread/4d5
55d778f59afdf

Original issue reported on code.google.com by markabo...@googlemail.com on 5 Jan 2010 at 9:26

GoogleCodeExporter commented 9 years ago
We'll change the default precision in a Message.  I don't see a great need for 
adding
a mechanism to change the behavior of Messages globally, so we won't do that 
yet.

This should also fix gmock's issue 91:
http://code.google.com/p/googlemock/issues/detail?id=91

Original comment by w...@google.com on 5 Jan 2010 at 4:32

GoogleCodeExporter commented 9 years ago
Fixed in r365.

Original comment by w...@google.com on 8 Jan 2010 at 12:25

GoogleCodeExporter commented 9 years ago

Original comment by w...@google.com on 8 Jan 2010 at 12:36