Some refactorings:

- Overrides added
 - usages of push_back() replaced with emplace_back()
 - Loop variable made const-refernce
 - NULL replaced with nullptr
 - Names used in the declaration and definition unified
 - size() replaced with empty
 - Identical cases merged
This commit is contained in:
offa 2020-01-21 21:04:42 +01:00 committed by Martin Hořeňovský
parent ab520f4e97
commit 06c32862b3
No known key found for this signature in database
GPG key ID: DE48307B8B0D381A
10 changed files with 24 additions and 29 deletions

View file

@ -17,9 +17,9 @@ TEST_CASE( "vector<string> -> toString", "[toString][vector]" )
{
std::vector<std::string> vv;
REQUIRE( ::Catch::Detail::stringify(vv) == "{ }" );
vv.push_back( "hello" );
vv.emplace_back( "hello" );
REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\" }" );
vv.push_back( "world" );
vv.emplace_back( "world" );
REQUIRE( ::Catch::Detail::stringify(vv) == "{ \"hello\", \"world\" }" );
}
@ -83,4 +83,4 @@ TEST_CASE( "array<int, N> -> toString", "[toString][containers][array]" ) {
REQUIRE( Catch::Detail::stringify( oneValue ) == "{ 42 }" );
std::array<int, 2> twoValues = {{ 42, 250 }};
REQUIRE( Catch::Detail::stringify( twoValues ) == "{ 42, 250 }" );
}
}