We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec9302c commit 638ad26Copy full SHA for 638ad26
src/test_lib_json/jsontest.h
@@ -8,6 +8,7 @@
8
9
#include <cstdio>
10
#include <deque>
11
+#include <iomanip>
12
#include <json/config.h>
13
#include <json/value.h>
14
#include <json/writer.h>
@@ -83,9 +84,7 @@ class TestResult {
83
84
// Generic operator that will work with anything ostream can deal with.
85
template <typename T> TestResult& operator<<(const T& value) {
86
Json::OStringStream oss;
- oss.precision(16);
87
- oss.setf(std::ios_base::floatfield);
88
- oss << value;
+ oss << std::setprecision(16) << std::hexfloat << value;
89
return addToLastFailure(oss.str());
90
}
91
0 commit comments