mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-03 21:49:32 +01:00 
			
		
		
		
	Format floats like doubles when printing - but add ‘f’ suffix (a lá #291)
This commit is contained in:
		@@ -49,22 +49,22 @@ with expansion:
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.float_nine_point_one == Approx( 9.11f ) )
 | 
			
		||||
with expansion:
 | 
			
		||||
  9.1 == Approx( 9.1099996567 )
 | 
			
		||||
  9.1f == Approx( 9.1099996567 )
 | 
			
		||||
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.float_nine_point_one == Approx( 9.0f ) )
 | 
			
		||||
with expansion:
 | 
			
		||||
  9.1 == Approx( 9.0 )
 | 
			
		||||
  9.1f == Approx( 9.0 )
 | 
			
		||||
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.float_nine_point_one == Approx( 1 ) )
 | 
			
		||||
with expansion:
 | 
			
		||||
  9.1 == Approx( 1.0 )
 | 
			
		||||
  9.1f == Approx( 1.0 )
 | 
			
		||||
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.float_nine_point_one == Approx( 0 ) )
 | 
			
		||||
with expansion:
 | 
			
		||||
  9.1 == Approx( 0.0 )
 | 
			
		||||
  9.1f == Approx( 0.0 )
 | 
			
		||||
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.double_pi == Approx( 3.1415 ) )
 | 
			
		||||
@@ -110,7 +110,7 @@ with expansion:
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.float_nine_point_one != Approx( 9.1f ) )
 | 
			
		||||
with expansion:
 | 
			
		||||
  9.1 != Approx( 9.1000003815 )
 | 
			
		||||
  9.1f != Approx( 9.1000003815 )
 | 
			
		||||
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.double_pi != Approx( 3.1415926535 ) )
 | 
			
		||||
@@ -176,17 +176,17 @@ with expansion:
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.float_nine_point_one < 9 )
 | 
			
		||||
with expansion:
 | 
			
		||||
  9.1 < 9
 | 
			
		||||
  9.1f < 9
 | 
			
		||||
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.float_nine_point_one > 10 )
 | 
			
		||||
with expansion:
 | 
			
		||||
  9.1 > 10
 | 
			
		||||
  9.1f > 10
 | 
			
		||||
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.float_nine_point_one > 9.2 )
 | 
			
		||||
with expansion:
 | 
			
		||||
  9.1 > 9.2
 | 
			
		||||
  9.1f > 9.2
 | 
			
		||||
 | 
			
		||||
ConditionTests.cpp:<line number>: FAILED:
 | 
			
		||||
  CHECK( data.str_hello > "hello" )
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user