mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-28 07:15:39 +02: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:
@@ -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 );
|
||||
};
|
||||
|
Reference in New Issue
Block a user