Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_commandline.cpp
diff options
context:
space:
mode:
authoroffa2020-01-21 21:04:42 +0100
committerMartin Hořeňovský2020-01-25 09:01:04 +0100
commit2d172dc688ffab0867a94928159e93384475a870 (patch)
tree0198f95dadc3560939d8a02736e2e93cee2f6d91 /include/internal/catch_commandline.cpp
parent587a20b312a44fef5373b53b897a9bd5ebfa5c0b (diff)
downloadcatch3-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 'include/internal/catch_commandline.cpp')
-rw-r--r--include/internal/catch_commandline.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/internal/catch_commandline.cpp b/include/internal/catch_commandline.cpp
index 365a3c9d..ecb7dc2f 100644
--- a/include/internal/catch_commandline.cpp
+++ b/include/internal/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 ) {
@@ -214,7 +213,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;