mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-17 02:25:38 +02:00
Format floats like doubles when printing - but add ‘f’ suffix (a lá #291)
This commit is contained in:
@@ -76,7 +76,7 @@
|
||||
1.23f == Approx( 1.23f )
|
||||
</Original>
|
||||
<Expanded>
|
||||
1.23 == Approx( 1.2300000191 )
|
||||
1.23f == Approx( 1.2300000191 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ApproxTests.cpp" >
|
||||
@@ -84,7 +84,7 @@
|
||||
0.0f == Approx( 0.0f )
|
||||
</Original>
|
||||
<Expanded>
|
||||
0 == Approx( 0.0 )
|
||||
0.0f == Approx( 0.0 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<OverallResult success="true"/>
|
||||
@@ -114,7 +114,7 @@
|
||||
1.0f == Approx( 1 )
|
||||
</Original>
|
||||
<Expanded>
|
||||
1 == Approx( 1.0 )
|
||||
1.0f == Approx( 1.0 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ApproxTests.cpp" >
|
||||
@@ -138,7 +138,7 @@
|
||||
1.234f == Approx( dMedium )
|
||||
</Original>
|
||||
<Expanded>
|
||||
1.234 == Approx( 1.234 )
|
||||
1.234f == Approx( 1.234 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ApproxTests.cpp" >
|
||||
@@ -295,7 +295,7 @@
|
||||
data.float_nine_point_one == Approx( 9.1f )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 == Approx( 9.1000003815 )
|
||||
9.1f == Approx( 9.1000003815 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -370,7 +370,7 @@
|
||||
data.float_nine_point_one == Approx( 9.11f )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 == Approx( 9.1099996567 )
|
||||
9.1f == Approx( 9.1099996567 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -378,7 +378,7 @@
|
||||
data.float_nine_point_one == Approx( 9.0f )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 == Approx( 9.0 )
|
||||
9.1f == Approx( 9.0 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -386,7 +386,7 @@
|
||||
data.float_nine_point_one == Approx( 1 )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 == Approx( 1.0 )
|
||||
9.1f == Approx( 1.0 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -394,7 +394,7 @@
|
||||
data.float_nine_point_one == Approx( 0 )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 == Approx( 0.0 )
|
||||
9.1f == Approx( 0.0 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -469,7 +469,7 @@
|
||||
data.float_nine_point_one != Approx( 9.11f )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 != Approx( 9.1099996567 )
|
||||
9.1f != Approx( 9.1099996567 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -477,7 +477,7 @@
|
||||
data.float_nine_point_one != Approx( 9.0f )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 != Approx( 9.0 )
|
||||
9.1f != Approx( 9.0 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -485,7 +485,7 @@
|
||||
data.float_nine_point_one != Approx( 1 )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 != Approx( 1.0 )
|
||||
9.1f != Approx( 1.0 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -493,7 +493,7 @@
|
||||
data.float_nine_point_one != Approx( 0 )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 != Approx( 0.0 )
|
||||
9.1f != Approx( 0.0 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -552,7 +552,7 @@
|
||||
data.float_nine_point_one != Approx( 9.1f )
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 != Approx( 9.1000003815 )
|
||||
9.1f != Approx( 9.1000003815 )
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -651,7 +651,7 @@
|
||||
data.float_nine_point_one > 9
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 > 9
|
||||
9.1f > 9
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -659,7 +659,7 @@
|
||||
data.float_nine_point_one < 10
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 < 10
|
||||
9.1f < 10
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -667,7 +667,7 @@
|
||||
data.float_nine_point_one < 9.2
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 < 9.2
|
||||
9.1f < 9.2
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -790,7 +790,7 @@
|
||||
data.float_nine_point_one < 9
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 < 9
|
||||
9.1f < 9
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -798,7 +798,7 @@
|
||||
data.float_nine_point_one > 10
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 > 10
|
||||
9.1f > 10
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
@@ -806,7 +806,7 @@
|
||||
data.float_nine_point_one > 9.2
|
||||
</Original>
|
||||
<Expanded>
|
||||
9.1 > 9.2
|
||||
9.1f > 9.2
|
||||
</Expanded>
|
||||
</Expression>
|
||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||
|
Reference in New Issue
Block a user