Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2024-04-30 16:43:05 +0200
committerMartin Hořeňovský2024-04-30 17:18:48 +0200
commitef713582d268d9b1b15381325021d7e0f91d6ab9 (patch)
treebb9f73173f9ad2a4fc4c1dd56080a7f50fb5f702 /tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp
parentefb39689d94e43132e4e48f01e676ae6a56d8df6 (diff)
downloadcatch3-ef713582d268d9b1b15381325021d7e0f91d6ab9.tar.gz
Default StringMaker<FloatingPointType>::precision to max_digits10
`max_digits10` is the number of decimal digits that the type _can_ represent, in other words, the number of decimal digits needed to disambiguate any two floating point numbers when serialized to a string.
Diffstat (limited to 'tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp')
-rw-r--r--tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp b/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp
index e073a40a..78c0c80a 100644
--- a/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp
+++ b/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp
@@ -124,8 +124,8 @@ TEST_CASE("Precision of floating point stringification can be set", "[toString][
const auto oldPrecision = sm::precision;
const float testFloat = 1.12345678901234567899f;
- auto str1 = sm::convert(testFloat);
sm::precision = 5;
+ auto str1 = sm::convert( testFloat );
// "1." prefix = 2 chars, f suffix is another char
CHECK(str1.size() == 3 + 5);