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

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/UsageTests/ToStringTuple.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/ToStringTuple.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/ToStringTuple.tests.cpp')
-rw-r--r--tests/SelfTest/UsageTests/ToStringTuple.tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp b/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp
index b2813a81..9d1d2c46 100644
--- a/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp
+++ b/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp
@@ -29,8 +29,8 @@ TEST_CASE( "tuple<int>", "[toString][tuple]" )
TEST_CASE( "tuple<float,int>", "[toString][tuple]" )
{
typedef std::tuple<float,int> type;
- CHECK( "1.2f" == ::Catch::Detail::stringify(float(1.2)) );
- CHECK( "{ 1.2f, 0 }" == ::Catch::Detail::stringify(type{1.2f,0}) );
+ CHECK( "1.5f" == ::Catch::Detail::stringify(float(1.5)) );
+ CHECK( "{ 1.5f, 0 }" == ::Catch::Detail::stringify(type{1.5f,0}) );
}
TEST_CASE( "tuple<string,string>", "[toString][tuple]" )
@@ -42,8 +42,8 @@ TEST_CASE( "tuple<string,string>", "[toString][tuple]" )
TEST_CASE( "tuple<tuple<int>,tuple<>,float>", "[toString][tuple]" )
{
typedef std::tuple<std::tuple<int>,std::tuple<>,float> type;
- type value { std::tuple<int>{42}, {}, 1.2f };
- CHECK( "{ { 42 }, { }, 1.2f }" == ::Catch::Detail::stringify(value) );
+ type value { std::tuple<int>{42}, {}, 1.5f };
+ CHECK( "{ { 42 }, { }, 1.5f }" == ::Catch::Detail::stringify(value) );
}
TEST_CASE( "tuple<nullptr,int,const char *>", "[approvals][toString][tuple]" ) {