mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-19 19:28:42 +00:00
Clara cleanups
* Clara is now split between a header and a cpp file. * Removed the deprecated `+` and `+=` operators for composing a parser. * Renamed `clara` and `detail` namespaces to be inline with the rest of Catch2 (they are now `Clara` and `Detail` respectively). * Taken most of user-exposed types out of the `Detail` namespace completely (instead of using `using` directives to bring them into the outer namespace).
This commit is contained in:
parent
b824d06844
commit
24b83edf8a
9 changed files with 1082 additions and 969 deletions
|
@ -19,9 +19,9 @@
|
|||
|
||||
namespace Catch {
|
||||
|
||||
clara::Parser makeCommandLineParser( ConfigData& config ) {
|
||||
Clara::Parser makeCommandLineParser( ConfigData& config ) {
|
||||
|
||||
using namespace clara;
|
||||
using namespace Clara;
|
||||
|
||||
auto const setWarning = [&]( std::string const& warning ) {
|
||||
auto warningSet = [&]() {
|
||||
|
@ -68,12 +68,12 @@ namespace Catch {
|
|||
else if( startsWith( "random", order ) )
|
||||
config.runOrder = RunTests::InRandomOrder;
|
||||
else
|
||||
return clara::ParserResult::runtimeError( "Unrecognised ordering: '" + order + "'" );
|
||||
return ParserResult::runtimeError( "Unrecognised ordering: '" + order + "'" );
|
||||
return ParserResult::ok( ParseResultType::Matched );
|
||||
};
|
||||
auto const setRngSeed = [&]( std::string const& seed ) {
|
||||
if( seed != "time" )
|
||||
return clara::detail::convertInto( seed, config.rngSeed );
|
||||
return Clara::Detail::convertInto( seed, config.rngSeed );
|
||||
config.rngSeed = static_cast<unsigned int>( std::time(nullptr) );
|
||||
return ParserResult::ok( ParseResultType::Matched );
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue