diff options
| author | offa | 2020-01-21 21:04:42 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-16 15:25:23 +0100 |
| commit | 06c32862b3d7d20544ba876e590e799667b3afa8 (patch) | |
| tree | 3f15b5a7abc220c562c353f128c989ba312f782f /src/catch2/catch_commandline.cpp | |
| parent | ab520f4e97ad5e9b01c0f08cda868d9690d35aff (diff) | |
| download | catch3-06c32862b3d7d20544ba876e590e799667b3afa8.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 'src/catch2/catch_commandline.cpp')
| -rw-r--r-- | src/catch2/catch_commandline.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/catch2/catch_commandline.cpp b/src/catch2/catch_commandline.cpp index 434664c8..3640a226 100644 --- a/src/catch2/catch_commandline.cpp +++ b/src/catch2/catch_commandline.cpp @@ -50,14 +50,13 @@ namespace Catch { if( !startsWith( line, '"' ) ) line = '"' + line + '"'; config.testsOrTags.push_back( line ); - config.testsOrTags.push_back( "," ); - + config.testsOrTags.emplace_back( "," ); } } //Remove comma in the end if(!config.testsOrTags.empty()) config.testsOrTags.erase( config.testsOrTags.end()-1 ); - + return ParserResult::ok( ParseResultType::Matched ); }; auto const setTestOrder = [&]( std::string const& order ) { @@ -211,7 +210,7 @@ namespace Catch { | Opt( config.benchmarkNoAnalysis ) ["--benchmark-no-analysis"] ( "perform only measurements; do not perform any analysis" ) - | Arg( config.testsOrTags, "test name|pattern|tags" ) + | Arg( config.testsOrTags, "test name|pattern|tags" ) ( "which test or tests to use" ); return cli; |