Stripped trailing whitespace from all source code lines
(replaces need for PRs #310 and #504)
This commit is contained in:
parent
8c32b49d5f
commit
e91738103c
47 changed files with 398 additions and 398 deletions
|
@ -22,7 +22,7 @@ struct TestData {
|
|||
float_nine_point_one( 9.1f ),
|
||||
double_pi( 3.1415926535 )
|
||||
{}
|
||||
|
||||
|
||||
int int_seven;
|
||||
std::string str_hello;
|
||||
float float_nine_point_one;
|
||||
|
@ -37,7 +37,7 @@ struct TestDef {
|
|||
TestDef& operator[]( const std::string& ) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
// The "failing" tests all use the CHECK macro, which continues if the specific test fails.
|
||||
|
@ -49,14 +49,14 @@ TEST_CASE( "Equality checks that should succeed", "" )
|
|||
|
||||
TestDef td;
|
||||
td + "hello" + "hello";
|
||||
|
||||
|
||||
TestData data;
|
||||
|
||||
|
||||
REQUIRE( data.int_seven == 7 );
|
||||
REQUIRE( data.float_nine_point_one == Approx( 9.1f ) );
|
||||
REQUIRE( data.double_pi == Approx( 3.1415926535 ) );
|
||||
REQUIRE( data.str_hello == "hello" );
|
||||
REQUIRE( "hello" == data.str_hello );
|
||||
REQUIRE( "hello" == data.str_hello );
|
||||
REQUIRE( data.str_hello.size() == 5 );
|
||||
|
||||
double x = 1.1 + 0.1 + 0.1;
|
||||
|
@ -66,7 +66,7 @@ TEST_CASE( "Equality checks that should succeed", "" )
|
|||
TEST_CASE( "Equality checks that should fail", "[.][failing][!mayfail]" )
|
||||
{
|
||||
TestData data;
|
||||
|
||||
|
||||
CHECK( data.int_seven == 6 );
|
||||
CHECK( data.int_seven == 8 );
|
||||
CHECK( data.int_seven == 0 );
|
||||
|
@ -87,7 +87,7 @@ TEST_CASE( "Equality checks that should fail", "[.][failing][!mayfail]" )
|
|||
TEST_CASE( "Inequality checks that should succeed", "" )
|
||||
{
|
||||
TestData data;
|
||||
|
||||
|
||||
REQUIRE( data.int_seven != 6 );
|
||||
REQUIRE( data.int_seven != 8 );
|
||||
REQUIRE( data.float_nine_point_one != Approx( 9.11f ) );
|
||||
|
@ -104,7 +104,7 @@ TEST_CASE( "Inequality checks that should succeed", "" )
|
|||
TEST_CASE( "Inequality checks that should fail", "[.][failing]" )
|
||||
{
|
||||
TestData data;
|
||||
|
||||
|
||||
CHECK( data.int_seven != 7 );
|
||||
CHECK( data.float_nine_point_one != Approx( 9.1f ) );
|
||||
CHECK( data.double_pi != Approx( 3.1415926535 ) );
|
||||
|
@ -116,7 +116,7 @@ TEST_CASE( "Inequality checks that should fail", "[.][failing]" )
|
|||
TEST_CASE( "Ordering comparison checks that should succeed", "" )
|
||||
{
|
||||
TestData data;
|
||||
|
||||
|
||||
REQUIRE( data.int_seven < 8 );
|
||||
REQUIRE( data.int_seven > 6 );
|
||||
REQUIRE( data.int_seven > 0 );
|
||||
|
@ -126,14 +126,14 @@ TEST_CASE( "Ordering comparison checks that should succeed", "" )
|
|||
REQUIRE( data.int_seven >= 6 );
|
||||
REQUIRE( data.int_seven <= 7 );
|
||||
REQUIRE( data.int_seven <= 8 );
|
||||
|
||||
|
||||
REQUIRE( data.float_nine_point_one > 9 );
|
||||
REQUIRE( data.float_nine_point_one < 10 );
|
||||
REQUIRE( data.float_nine_point_one < 9.2 );
|
||||
|
||||
|
||||
REQUIRE( data.str_hello <= "hello" );
|
||||
REQUIRE( data.str_hello >= "hello" );
|
||||
|
||||
|
||||
REQUIRE( data.str_hello < "hellp" );
|
||||
REQUIRE( data.str_hello < "zebra" );
|
||||
REQUIRE( data.str_hello > "hellm" );
|
||||
|
@ -143,7 +143,7 @@ TEST_CASE( "Ordering comparison checks that should succeed", "" )
|
|||
TEST_CASE( "Ordering comparison checks that should fail", "[.][failing]" )
|
||||
{
|
||||
TestData data;
|
||||
|
||||
|
||||
CHECK( data.int_seven > 7 );
|
||||
CHECK( data.int_seven < 7 );
|
||||
CHECK( data.int_seven > 8 );
|
||||
|
@ -153,11 +153,11 @@ TEST_CASE( "Ordering comparison checks that should fail", "[.][failing]" )
|
|||
|
||||
CHECK( data.int_seven >= 8 );
|
||||
CHECK( data.int_seven <= 6 );
|
||||
|
||||
|
||||
CHECK( data.float_nine_point_one < 9 );
|
||||
CHECK( data.float_nine_point_one > 10 );
|
||||
CHECK( data.float_nine_point_one > 9.2 );
|
||||
|
||||
|
||||
CHECK( data.str_hello > "hello" );
|
||||
CHECK( data.str_hello < "hello" );
|
||||
CHECK( data.str_hello > "hellp" );
|
||||
|
@ -178,7 +178,7 @@ TEST_CASE( "Comparisons with int literals don't warn when mixing signed/ unsigne
|
|||
unsigned long ul = 4;
|
||||
char c = 5;
|
||||
unsigned char uc = 6;
|
||||
|
||||
|
||||
REQUIRE( i == 1 );
|
||||
REQUIRE( ui == 2 );
|
||||
REQUIRE( l == 3 );
|
||||
|
@ -215,7 +215,7 @@ TEST_CASE( "comparisons between int variables", "" )
|
|||
unsigned short unsigned_short_var = 1;
|
||||
unsigned int unsigned_int_var = 1;
|
||||
unsigned long unsigned_long_var = 1L;
|
||||
|
||||
|
||||
REQUIRE( long_var == unsigned_char_var );
|
||||
REQUIRE( long_var == unsigned_short_var );
|
||||
REQUIRE( long_var == unsigned_int_var );
|
||||
|
@ -252,7 +252,7 @@ template<typename T>
|
|||
struct Ex
|
||||
{
|
||||
Ex( T ){}
|
||||
|
||||
|
||||
bool operator == ( const T& ) const { return true; }
|
||||
T operator * ( const T& ) const { return T(); }
|
||||
};
|
||||
|
@ -273,13 +273,13 @@ TEST_CASE( "Pointers can be compared to null", "" )
|
|||
{
|
||||
TestData* p = CATCH_NULL;
|
||||
TestData* pNULL = CATCH_NULL;
|
||||
|
||||
|
||||
REQUIRE( p == CATCH_NULL );
|
||||
REQUIRE( p == pNULL );
|
||||
|
||||
|
||||
TestData data;
|
||||
p = &data;
|
||||
|
||||
|
||||
REQUIRE( p != CATCH_NULL );
|
||||
|
||||
const TestData* cp = p;
|
||||
|
@ -290,7 +290,7 @@ TEST_CASE( "Pointers can be compared to null", "" )
|
|||
|
||||
REQUIRE( returnsNull() == CATCH_NULL );
|
||||
REQUIRE( returnsConstNull() == CATCH_NULL );
|
||||
|
||||
|
||||
REQUIRE( CATCH_NULL != p );
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ TEST_CASE( "Pointers can be compared to null", "" )
|
|||
TEST_CASE( "'Not' checks that should succeed", "" )
|
||||
{
|
||||
bool falseValue = false;
|
||||
|
||||
|
||||
REQUIRE( false == false );
|
||||
REQUIRE( true == true );
|
||||
REQUIRE( !false );
|
||||
|
@ -320,15 +320,15 @@ TEST_CASE( "'Not' checks that should succeed", "" )
|
|||
TEST_CASE( "'Not' checks that should fail", "[.][failing]" )
|
||||
{
|
||||
bool trueValue = true;
|
||||
|
||||
|
||||
CHECK( false != false );
|
||||
CHECK( true != true );
|
||||
CHECK( !true );
|
||||
CHECK_FALSE( true );
|
||||
|
||||
|
||||
CHECK( !trueValue );
|
||||
CHECK_FALSE( trueValue );
|
||||
|
||||
|
||||
CHECK( !(1 == 1) );
|
||||
CHECK_FALSE( 1 == 1 );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue