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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhil Nash2017-06-21 09:40:52 +0100
committerPhil Nash2017-06-21 09:40:52 +0100
commite0c6c4aee7f22e8a47dbe07cd497d2e5fd5fe205 (patch)
treed50a5f89bf7f7c65b679eaca99655b7fba49602f
parentc43d5f673fe781f043119c2cb11e50069860b199 (diff)
downloadcatch3-e0c6c4aee7f22e8a47dbe07cd497d2e5fd5fe205.tar.gz
Another attempt to fix VS ICEs - split cli parser up.
-rw-r--r--include/internal/catch_commandline.hpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/internal/catch_commandline.hpp b/include/internal/catch_commandline.hpp
index ea2d7e45..66359a11 100644
--- a/include/internal/catch_commandline.hpp
+++ b/include/internal/catch_commandline.hpp
@@ -74,7 +74,7 @@ namespace Catch {
return ParserResult::ok( ParseResultType::Matched );
};
- auto cli
+ auto cli1
= ExeName( config.processName )
+ Help( config.showHelp )
+ Opt( config.listTests )
@@ -94,8 +94,10 @@ namespace Catch {
( "skip exception tests" )
+ Opt( config.showInvisibles )
["-i"]["--invisibles"]
- ( "show invisibles (tabs, newlines)" )
- + Opt( config.outputFilename, "filename" )
+ ( "show invisibles (tabs, newlines)" );
+
+ auto cli2
+ = Opt( config.outputFilename, "filename" )
["-o"]["--out"]
( "output filename" )
+ Opt( config.reporterNames, "name" )
@@ -118,8 +120,10 @@ namespace Catch {
( "show test durations" )
+ Opt( loadTestNamesFromFile, "filename" )
["-f"]["--input-file"]
- ( "load test names to run from a file" )
- + Opt( config.filenamesAsTags )
+ ( "load test names to run from a file" );
+
+ auto cli3
+ = Opt( config.filenamesAsTags )
["-#"]["--filenames-as-tags"]
( "adds a tag for the filename" )
+ Opt( config.sectionsToRun, "section name" )
@@ -144,7 +148,8 @@ namespace Catch {
+ Arg( config.testsOrTags, "test name|pattern|tags" )
( "which test or tests to use" );
- return cli;
+ // Assemble from smaller parsers because some VS versions give ICEs otherwise
+ return cli1 + cli2 + cli3;
}
} // end namespace Catch