mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 13:55:39 +02:00
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.
This commit is contained in:
@@ -622,35 +622,39 @@ at Condition.tests.cpp:<line number>
|
||||
FAILED:
|
||||
CHECK( data.float_nine_point_one == Approx( 9.11f ) )
|
||||
with expansion:
|
||||
9.1f == Approx( 9.1099996567 )
|
||||
9.100000381f
|
||||
==
|
||||
Approx( 9.10999965667724609 )
|
||||
at Condition.tests.cpp:<line number>
|
||||
</skipped>
|
||||
<skipped message="CHECK(data.float_nine_point_one == Approx( 9.0f ))">
|
||||
FAILED:
|
||||
CHECK( data.float_nine_point_one == Approx( 9.0f ) )
|
||||
with expansion:
|
||||
9.1f == Approx( 9.0 )
|
||||
9.100000381f == Approx( 9.0 )
|
||||
at Condition.tests.cpp:<line number>
|
||||
</skipped>
|
||||
<skipped message="CHECK(data.float_nine_point_one == Approx( 1 ))">
|
||||
FAILED:
|
||||
CHECK( data.float_nine_point_one == Approx( 1 ) )
|
||||
with expansion:
|
||||
9.1f == Approx( 1.0 )
|
||||
9.100000381f == Approx( 1.0 )
|
||||
at Condition.tests.cpp:<line number>
|
||||
</skipped>
|
||||
<skipped message="CHECK(data.float_nine_point_one == Approx( 0 ))">
|
||||
FAILED:
|
||||
CHECK( data.float_nine_point_one == Approx( 0 ) )
|
||||
with expansion:
|
||||
9.1f == Approx( 0.0 )
|
||||
9.100000381f == Approx( 0.0 )
|
||||
at Condition.tests.cpp:<line number>
|
||||
</skipped>
|
||||
<skipped message="CHECK(data.double_pi == Approx( 3.1415 ))">
|
||||
FAILED:
|
||||
CHECK( data.double_pi == Approx( 3.1415 ) )
|
||||
with expansion:
|
||||
3.1415926535 == Approx( 3.1415 )
|
||||
3.14159265350000005
|
||||
==
|
||||
Approx( 3.14150000000000018 )
|
||||
at Condition.tests.cpp:<line number>
|
||||
</skipped>
|
||||
<skipped message="CHECK(data.str_hello == "goodbye")">
|
||||
@@ -685,7 +689,9 @@ at Condition.tests.cpp:<line number>
|
||||
FAILED:
|
||||
CHECK( x == Approx( 1.301 ) )
|
||||
with expansion:
|
||||
1.3 == Approx( 1.301 )
|
||||
1.30000000000000027
|
||||
==
|
||||
Approx( 1.30099999999999993 )
|
||||
at Condition.tests.cpp:<line number>
|
||||
</skipped>
|
||||
</testCase>
|
||||
@@ -702,14 +708,18 @@ at Condition.tests.cpp:<line number>
|
||||
FAILED:
|
||||
CHECK( data.float_nine_point_one != Approx( 9.1f ) )
|
||||
with expansion:
|
||||
9.1f != Approx( 9.1000003815 )
|
||||
9.100000381f
|
||||
!=
|
||||
Approx( 9.10000038146972656 )
|
||||
at Condition.tests.cpp:<line number>
|
||||
</skipped>
|
||||
<skipped message="CHECK(data.double_pi != Approx( 3.1415926535 ))">
|
||||
FAILED:
|
||||
CHECK( data.double_pi != Approx( 3.1415926535 ) )
|
||||
with expansion:
|
||||
3.1415926535 != Approx( 3.1415926535 )
|
||||
3.14159265350000005
|
||||
!=
|
||||
Approx( 3.14159265350000005 )
|
||||
at Condition.tests.cpp:<line number>
|
||||
</skipped>
|
||||
<skipped message="CHECK(data.str_hello != "hello")">
|
||||
@@ -813,21 +823,21 @@ at Condition.tests.cpp:<line number>
|
||||
FAILED:
|
||||
CHECK( data.float_nine_point_one < 9 )
|
||||
with expansion:
|
||||
9.1f < 9
|
||||
9.100000381f < 9
|
||||
at Condition.tests.cpp:<line number>
|
||||
</failure>
|
||||
<failure message="CHECK(data.float_nine_point_one > 10)">
|
||||
FAILED:
|
||||
CHECK( data.float_nine_point_one > 10 )
|
||||
with expansion:
|
||||
9.1f > 10
|
||||
9.100000381f > 10
|
||||
at Condition.tests.cpp:<line number>
|
||||
</failure>
|
||||
<failure message="CHECK(data.float_nine_point_one > 9.2)">
|
||||
FAILED:
|
||||
CHECK( data.float_nine_point_one > 9.2 )
|
||||
with expansion:
|
||||
9.1f > 9.2
|
||||
9.100000381f > 9.19999999999999929
|
||||
at Condition.tests.cpp:<line number>
|
||||
</failure>
|
||||
<failure message="CHECK(data.str_hello > "hello")">
|
||||
@@ -1009,7 +1019,7 @@ at Exception.tests.cpp:<line number>
|
||||
<testCase name="Unexpected exceptions can be translated" duration="{duration}">
|
||||
<error message="TEST_CASE()">
|
||||
FAILED:
|
||||
3.14
|
||||
3.14000000000000012
|
||||
at Exception.tests.cpp:<line number>
|
||||
</error>
|
||||
</testCase>
|
||||
|
Reference in New Issue
Block a user