diff options
| author | offa | 2020-01-21 21:04:42 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-01-25 09:01:04 +0100 |
| commit | 2d172dc688ffab0867a94928159e93384475a870 (patch) | |
| tree | 0198f95dadc3560939d8a02736e2e93cee2f6d91 /projects/SelfTest/UsageTests/ToStringVector.tests.cpp | |
| parent | 587a20b312a44fef5373b53b897a9bd5ebfa5c0b (diff) | |
| download | catch3-2d172dc688ffab0867a94928159e93384475a870.tar.gz | |
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
Diffstat (limited to 'projects/SelfTest/UsageTests/ToStringVector.tests.cpp')
| -rw-r--r-- | projects/SelfTest/UsageTests/ToStringVector.tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/projects/SelfTest/UsageTests/ToStringVector.tests.cpp b/projects/SelfTest/UsageTests/ToStringVector.tests.cpp index 63b49e50..ea4d5c86 100644 --- a/projects/SelfTest/UsageTests/ToStringVector.tests.cpp +++ b/projects/SelfTest/UsageTests/ToStringVector.tests.cpp @@ -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 }" ); -}
\ No newline at end of file +} |