You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is inappropriate. The ios_base::floatfield is a mask, not a value.
This essentially selects hexfloat output, but if we wanted to do that we should do it explicitly.
Reproduce
This essentially what our TestResult operator is doing:
Expected behavior
I think we didn't want hexfloat output, or we would have asked for it by name.
I'm guessing the intent was to clear the floatfield, and we do that with unsetf.
None of our unit tests actually call operator<< with a floating point value, so it never mattered. We should fix the bug anyway.
The text was updated successfully, but these errors were encountered:
commit f587e6a420c467a69b7f977875052077aef2913b
Author: Baptiste Lepilleur <[email protected]>
Date: Thu May 26 15:55:24 2011
Fixed compilation issues with MSVC 6: replace usage of ostringstream with valueToString to support 64 bits integer and high precision floating point conversion to string.
I guess nobody else ever thought to check it! I merged your PR. You can close this, or leave it open to try << with a float.
Uh oh!
There was an error while loading. Please reload this page.
TestResult operator<< uses
This is inappropriate. The ios_base::floatfield is a mask, not a value.
This essentially selects hexfloat output, but if we wanted to do that we should do it explicitly.
Reproduce
This essentially what our TestResult operator is doing:
https://gcc.godbolt.org/z/e93L45
Expected behavior
I think we didn't want hexfloat output, or we would have asked for it by name.
I'm guessing the intent was to clear the floatfield, and we do that with
unsetf
.None of our unit tests actually call operator<< with a floating point value, so it never mattered. We should fix the bug anyway.
The text was updated successfully, but these errors were encountered: