mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 23:36:11 +01:00
Format floats like doubles when printing - but add ‘f’ suffix (a lá #291)
This commit is contained in:
parent
ce56209250
commit
d89e74faff
@ -158,6 +158,7 @@ std::string toString( int value );
|
|||||||
std::string toString( unsigned long value );
|
std::string toString( unsigned long value );
|
||||||
std::string toString( unsigned int value );
|
std::string toString( unsigned int value );
|
||||||
std::string toString( const double value );
|
std::string toString( const double value );
|
||||||
|
std::string toString( const float value );
|
||||||
std::string toString( bool value );
|
std::string toString( bool value );
|
||||||
std::string toString( char value );
|
std::string toString( char value );
|
||||||
std::string toString( signed char value );
|
std::string toString( signed char value );
|
||||||
|
@ -103,9 +103,10 @@ std::string toString( unsigned int value ) {
|
|||||||
return toString( static_cast<unsigned long>( value ) );
|
return toString( static_cast<unsigned long>( value ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string toString( const double value ) {
|
template<typename T>
|
||||||
|
std::string fpToString( T value, int precision ) {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
oss << std::setprecision( 10 )
|
oss << std::setprecision( precision )
|
||||||
<< std::fixed
|
<< std::fixed
|
||||||
<< value;
|
<< value;
|
||||||
std::string d = oss.str();
|
std::string d = oss.str();
|
||||||
@ -118,6 +119,13 @@ std::string toString( const double value ) {
|
|||||||
return d;
|
return d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string toString( const double value ) {
|
||||||
|
return fpToString( value, 10 );
|
||||||
|
}
|
||||||
|
std::string toString( const float value ) {
|
||||||
|
return fpToString( value, 5 ) + "f";
|
||||||
|
}
|
||||||
|
|
||||||
std::string toString( bool value ) {
|
std::string toString( bool value ) {
|
||||||
return value ? "true" : "false";
|
return value ? "true" : "false";
|
||||||
}
|
}
|
||||||
|
@ -49,22 +49,22 @@ with expansion:
|
|||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one == Approx( 9.11f ) )
|
CHECK( data.float_nine_point_one == Approx( 9.11f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 9.1099996567 )
|
9.1f == Approx( 9.1099996567 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one == Approx( 9.0f ) )
|
CHECK( data.float_nine_point_one == Approx( 9.0f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 9.0 )
|
9.1f == Approx( 9.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one == Approx( 1 ) )
|
CHECK( data.float_nine_point_one == Approx( 1 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 1.0 )
|
9.1f == Approx( 1.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one == Approx( 0 ) )
|
CHECK( data.float_nine_point_one == Approx( 0 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 0.0 )
|
9.1f == Approx( 0.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.double_pi == Approx( 3.1415 ) )
|
CHECK( data.double_pi == Approx( 3.1415 ) )
|
||||||
@ -110,7 +110,7 @@ with expansion:
|
|||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one != Approx( 9.1f ) )
|
CHECK( data.float_nine_point_one != Approx( 9.1f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 9.1000003815 )
|
9.1f != Approx( 9.1000003815 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.double_pi != Approx( 3.1415926535 ) )
|
CHECK( data.double_pi != Approx( 3.1415926535 ) )
|
||||||
@ -176,17 +176,17 @@ with expansion:
|
|||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one < 9 )
|
CHECK( data.float_nine_point_one < 9 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 < 9
|
9.1f < 9
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one > 10 )
|
CHECK( data.float_nine_point_one > 10 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 > 10
|
9.1f > 10
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one > 9.2 )
|
CHECK( data.float_nine_point_one > 9.2 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 > 9.2
|
9.1f > 9.2
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.str_hello > "hello" )
|
CHECK( data.str_hello > "hello" )
|
||||||
|
@ -73,13 +73,13 @@ ApproxTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( 1.23f == Approx( 1.23f ) )
|
REQUIRE( 1.23f == Approx( 1.23f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
1.23 == Approx( 1.2300000191 )
|
1.23f == Approx( 1.2300000191 )
|
||||||
|
|
||||||
ApproxTests.cpp:<line number>:
|
ApproxTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( 0.0f == Approx( 0.0f ) )
|
REQUIRE( 0.0f == Approx( 0.0f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
0 == Approx( 0.0 )
|
0.0f == Approx( 0.0 )
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Approximate comparisons with ints
|
Approximate comparisons with ints
|
||||||
@ -109,7 +109,7 @@ ApproxTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( 1.0f == Approx( 1 ) )
|
REQUIRE( 1.0f == Approx( 1 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
1 == Approx( 1.0 )
|
1.0f == Approx( 1.0 )
|
||||||
|
|
||||||
ApproxTests.cpp:<line number>:
|
ApproxTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
@ -127,7 +127,7 @@ ApproxTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( 1.234f == Approx( dMedium ) )
|
REQUIRE( 1.234f == Approx( dMedium ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
1.234 == Approx( 1.234 )
|
1.234f == Approx( 1.234 )
|
||||||
|
|
||||||
ApproxTests.cpp:<line number>:
|
ApproxTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
@ -269,7 +269,7 @@ ConditionTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one == Approx( 9.1f ) )
|
REQUIRE( data.float_nine_point_one == Approx( 9.1f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 9.1000003815 )
|
9.1f == Approx( 9.1000003815 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
@ -325,22 +325,22 @@ with expansion:
|
|||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one == Approx( 9.11f ) )
|
CHECK( data.float_nine_point_one == Approx( 9.11f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 9.1099996567 )
|
9.1f == Approx( 9.1099996567 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one == Approx( 9.0f ) )
|
CHECK( data.float_nine_point_one == Approx( 9.0f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 9.0 )
|
9.1f == Approx( 9.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one == Approx( 1 ) )
|
CHECK( data.float_nine_point_one == Approx( 1 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 1.0 )
|
9.1f == Approx( 1.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one == Approx( 0 ) )
|
CHECK( data.float_nine_point_one == Approx( 0 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 0.0 )
|
9.1f == Approx( 0.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.double_pi == Approx( 3.1415 ) )
|
CHECK( data.double_pi == Approx( 3.1415 ) )
|
||||||
@ -394,25 +394,25 @@ ConditionTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one != Approx( 9.11f ) )
|
REQUIRE( data.float_nine_point_one != Approx( 9.11f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 9.1099996567 )
|
9.1f != Approx( 9.1099996567 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one != Approx( 9.0f ) )
|
REQUIRE( data.float_nine_point_one != Approx( 9.0f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 9.0 )
|
9.1f != Approx( 9.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one != Approx( 1 ) )
|
REQUIRE( data.float_nine_point_one != Approx( 1 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 1.0 )
|
9.1f != Approx( 1.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one != Approx( 0 ) )
|
REQUIRE( data.float_nine_point_one != Approx( 0 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 0.0 )
|
9.1f != Approx( 0.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
@ -458,7 +458,7 @@ with expansion:
|
|||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one != Approx( 9.1f ) )
|
CHECK( data.float_nine_point_one != Approx( 9.1f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 9.1000003815 )
|
9.1f != Approx( 9.1000003815 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.double_pi != Approx( 3.1415926535 ) )
|
CHECK( data.double_pi != Approx( 3.1415926535 ) )
|
||||||
@ -533,19 +533,19 @@ ConditionTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one > 9 )
|
REQUIRE( data.float_nine_point_one > 9 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 > 9
|
9.1f > 9
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one < 10 )
|
REQUIRE( data.float_nine_point_one < 10 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 < 10
|
9.1f < 10
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one < 9.2 )
|
REQUIRE( data.float_nine_point_one < 9.2 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 < 9.2
|
9.1f < 9.2
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
@ -632,17 +632,17 @@ with expansion:
|
|||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one < 9 )
|
CHECK( data.float_nine_point_one < 9 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 < 9
|
9.1f < 9
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one > 10 )
|
CHECK( data.float_nine_point_one > 10 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 > 10
|
9.1f > 10
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one > 9.2 )
|
CHECK( data.float_nine_point_one > 9.2 )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 > 9.2
|
9.1f > 9.2
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.str_hello > "hello" )
|
CHECK( data.str_hello > "hello" )
|
||||||
|
@ -73,13 +73,13 @@ ApproxTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( 1.23f == Approx( 1.23f ) )
|
REQUIRE( 1.23f == Approx( 1.23f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
1.23 == Approx( 1.2300000191 )
|
1.23f == Approx( 1.2300000191 )
|
||||||
|
|
||||||
ApproxTests.cpp:<line number>:
|
ApproxTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( 0.0f == Approx( 0.0f ) )
|
REQUIRE( 0.0f == Approx( 0.0f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
0 == Approx( 0.0 )
|
0.0f == Approx( 0.0 )
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Approximate comparisons with ints
|
Approximate comparisons with ints
|
||||||
@ -109,7 +109,7 @@ ApproxTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( 1.0f == Approx( 1 ) )
|
REQUIRE( 1.0f == Approx( 1 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
1 == Approx( 1.0 )
|
1.0f == Approx( 1.0 )
|
||||||
|
|
||||||
ApproxTests.cpp:<line number>:
|
ApproxTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
@ -127,7 +127,7 @@ ApproxTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( 1.234f == Approx( dMedium ) )
|
REQUIRE( 1.234f == Approx( dMedium ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
1.234 == Approx( 1.234 )
|
1.234f == Approx( 1.234 )
|
||||||
|
|
||||||
ApproxTests.cpp:<line number>:
|
ApproxTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
@ -269,7 +269,7 @@ ConditionTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one == Approx( 9.1f ) )
|
REQUIRE( data.float_nine_point_one == Approx( 9.1f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 == Approx( 9.1000003815 )
|
9.1f == Approx( 9.1000003815 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
@ -339,25 +339,25 @@ ConditionTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one != Approx( 9.11f ) )
|
REQUIRE( data.float_nine_point_one != Approx( 9.11f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 9.1099996567 )
|
9.1f != Approx( 9.1099996567 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one != Approx( 9.0f ) )
|
REQUIRE( data.float_nine_point_one != Approx( 9.0f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 9.0 )
|
9.1f != Approx( 9.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one != Approx( 1 ) )
|
REQUIRE( data.float_nine_point_one != Approx( 1 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 1.0 )
|
9.1f != Approx( 1.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
REQUIRE( data.float_nine_point_one != Approx( 0 ) )
|
REQUIRE( data.float_nine_point_one != Approx( 0 ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 0.0 )
|
9.1f != Approx( 0.0 )
|
||||||
|
|
||||||
ConditionTests.cpp:<line number>:
|
ConditionTests.cpp:<line number>:
|
||||||
PASSED:
|
PASSED:
|
||||||
@ -403,7 +403,7 @@ with expansion:
|
|||||||
ConditionTests.cpp:<line number>: FAILED:
|
ConditionTests.cpp:<line number>: FAILED:
|
||||||
CHECK( data.float_nine_point_one != Approx( 9.1f ) )
|
CHECK( data.float_nine_point_one != Approx( 9.1f ) )
|
||||||
with expansion:
|
with expansion:
|
||||||
9.1 != Approx( 9.1000003815 )
|
9.1f != Approx( 9.1000003815 )
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 11 passed | 3 failed | 1 failed as expected | total: 15
|
test cases: 11 passed | 3 failed | 1 failed as expected | total: 15
|
||||||
|
@ -30,16 +30,16 @@ ConditionTests.cpp:<line number>
|
|||||||
<failure message="7 == 0" type="CHECK">
|
<failure message="7 == 0" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="9.1 == Approx( 9.1099996567 )" type="CHECK">
|
<failure message="9.1f == Approx( 9.1099996567 )" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="9.1 == Approx( 9.0 )" type="CHECK">
|
<failure message="9.1f == Approx( 9.0 )" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="9.1 == Approx( 1.0 )" type="CHECK">
|
<failure message="9.1f == Approx( 1.0 )" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="9.1 == Approx( 0.0 )" type="CHECK">
|
<failure message="9.1f == Approx( 0.0 )" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="3.1415926535 == Approx( 3.1415 )" type="CHECK">
|
<failure message="3.1415926535 == Approx( 3.1415 )" type="CHECK">
|
||||||
@ -66,7 +66,7 @@ ConditionTests.cpp:<line number>
|
|||||||
<failure message="7 != 7" type="CHECK">
|
<failure message="7 != 7" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="9.1 != Approx( 9.1000003815 )" type="CHECK">
|
<failure message="9.1f != Approx( 9.1000003815 )" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="3.1415926535 != Approx( 3.1415926535 )" type="CHECK">
|
<failure message="3.1415926535 != Approx( 3.1415926535 )" type="CHECK">
|
||||||
@ -105,13 +105,13 @@ ConditionTests.cpp:<line number>
|
|||||||
<failure message="7 <= 6" type="CHECK">
|
<failure message="7 <= 6" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="9.1 < 9" type="CHECK">
|
<failure message="9.1f < 9" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="9.1 > 10" type="CHECK">
|
<failure message="9.1f > 10" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message="9.1 > 9.2" type="CHECK">
|
<failure message="9.1f > 9.2" type="CHECK">
|
||||||
ConditionTests.cpp:<line number>
|
ConditionTests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
<failure message=""hello" > "hello"" type="CHECK">
|
<failure message=""hello" > "hello"" type="CHECK">
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
1.23f == Approx( 1.23f )
|
1.23f == Approx( 1.23f )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
1.23 == Approx( 1.2300000191 )
|
1.23f == Approx( 1.2300000191 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ApproxTests.cpp" >
|
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ApproxTests.cpp" >
|
||||||
@ -84,7 +84,7 @@
|
|||||||
0.0f == Approx( 0.0f )
|
0.0f == Approx( 0.0f )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
0 == Approx( 0.0 )
|
0.0f == Approx( 0.0 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
@ -114,7 +114,7 @@
|
|||||||
1.0f == Approx( 1 )
|
1.0f == Approx( 1 )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
1 == Approx( 1.0 )
|
1.0f == Approx( 1.0 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ApproxTests.cpp" >
|
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ApproxTests.cpp" >
|
||||||
@ -138,7 +138,7 @@
|
|||||||
1.234f == Approx( dMedium )
|
1.234f == Approx( dMedium )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
1.234 == Approx( 1.234 )
|
1.234f == Approx( 1.234 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ApproxTests.cpp" >
|
<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 )
|
data.float_nine_point_one == Approx( 9.1f )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 == Approx( 9.1000003815 )
|
9.1f == Approx( 9.1000003815 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<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 )
|
data.float_nine_point_one == Approx( 9.11f )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 == Approx( 9.1099996567 )
|
9.1f == Approx( 9.1099996567 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<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 )
|
data.float_nine_point_one == Approx( 9.0f )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 == Approx( 9.0 )
|
9.1f == Approx( 9.0 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -386,7 +386,7 @@
|
|||||||
data.float_nine_point_one == Approx( 1 )
|
data.float_nine_point_one == Approx( 1 )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 == Approx( 1.0 )
|
9.1f == Approx( 1.0 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -394,7 +394,7 @@
|
|||||||
data.float_nine_point_one == Approx( 0 )
|
data.float_nine_point_one == Approx( 0 )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 == Approx( 0.0 )
|
9.1f == Approx( 0.0 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<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 )
|
data.float_nine_point_one != Approx( 9.11f )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 != Approx( 9.1099996567 )
|
9.1f != Approx( 9.1099996567 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<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 )
|
data.float_nine_point_one != Approx( 9.0f )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 != Approx( 9.0 )
|
9.1f != Approx( 9.0 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -485,7 +485,7 @@
|
|||||||
data.float_nine_point_one != Approx( 1 )
|
data.float_nine_point_one != Approx( 1 )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 != Approx( 1.0 )
|
9.1f != Approx( 1.0 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -493,7 +493,7 @@
|
|||||||
data.float_nine_point_one != Approx( 0 )
|
data.float_nine_point_one != Approx( 0 )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 != Approx( 0.0 )
|
9.1f != Approx( 0.0 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<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 )
|
data.float_nine_point_one != Approx( 9.1f )
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 != Approx( 9.1000003815 )
|
9.1f != Approx( 9.1000003815 )
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -651,7 +651,7 @@
|
|||||||
data.float_nine_point_one > 9
|
data.float_nine_point_one > 9
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 > 9
|
9.1f > 9
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -659,7 +659,7 @@
|
|||||||
data.float_nine_point_one < 10
|
data.float_nine_point_one < 10
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 < 10
|
9.1f < 10
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -667,7 +667,7 @@
|
|||||||
data.float_nine_point_one < 9.2
|
data.float_nine_point_one < 9.2
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 < 9.2
|
9.1f < 9.2
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="true" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -790,7 +790,7 @@
|
|||||||
data.float_nine_point_one < 9
|
data.float_nine_point_one < 9
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 < 9
|
9.1f < 9
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -798,7 +798,7 @@
|
|||||||
data.float_nine_point_one > 10
|
data.float_nine_point_one > 10
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 > 10
|
9.1f > 10
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
@ -806,7 +806,7 @@
|
|||||||
data.float_nine_point_one > 9.2
|
data.float_nine_point_one > 9.2
|
||||||
</Original>
|
</Original>
|
||||||
<Expanded>
|
<Expanded>
|
||||||
9.1 > 9.2
|
9.1f > 9.2
|
||||||
</Expanded>
|
</Expanded>
|
||||||
</Expression>
|
</Expression>
|
||||||
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
<Expression success="false" filename="/Users/philnash/Dev/OSS/Catch/projects/SelfTest/ConditionTests.cpp" >
|
||||||
|
Loading…
Reference in New Issue
Block a user