mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
tweaks
This commit is contained in:
parent
a7e657fd9b
commit
e035e2835d
@ -108,20 +108,6 @@ namespace Catch {
|
|||||||
std::set<TestCase> m_testsAlreadyRun;
|
std::set<TestCase> m_testsAlreadyRun;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline void showHelp( std::string const& processName ) {
|
|
||||||
Clara::CommandLine<ConfigData> cli = makeCommandLineParser();
|
|
||||||
|
|
||||||
std::cout << "\nCatch v" << libraryVersion.majorVersion << "."
|
|
||||||
<< libraryVersion.minorVersion << " build "
|
|
||||||
<< libraryVersion.buildNumber;
|
|
||||||
if( libraryVersion.branchName != "master" )
|
|
||||||
std::cout << " (" << libraryVersion.branchName << " branch)";
|
|
||||||
std::cout << "\n";
|
|
||||||
|
|
||||||
cli.usage( std::cout, processName );
|
|
||||||
std::cout << "\nFor more detail usage please see: https://github.com/philsquared/Catch/wiki/Command-line\n" << std::endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
class Session {
|
class Session {
|
||||||
static bool alreadyInstantiated;
|
static bool alreadyInstantiated;
|
||||||
|
|
||||||
@ -142,6 +128,18 @@ namespace Catch {
|
|||||||
Catch::cleanUp();
|
Catch::cleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void showHelp( std::string const& processName ) {
|
||||||
|
std::cout << "\nCatch v" << libraryVersion.majorVersion << "."
|
||||||
|
<< libraryVersion.minorVersion << " build "
|
||||||
|
<< libraryVersion.buildNumber;
|
||||||
|
if( libraryVersion.branchName != "master" )
|
||||||
|
std::cout << " (" << libraryVersion.branchName << " branch)";
|
||||||
|
std::cout << "\n";
|
||||||
|
|
||||||
|
cli.usage( std::cout, processName );
|
||||||
|
std::cout << "For more detail usage please see the project docs\n" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
int applyCommandLine( int argc, char* const argv[], OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
|
int applyCommandLine( int argc, char* const argv[], OnUnusedOptions::DoWhat unusedOptionBehaviour = OnUnusedOptions::Fail ) {
|
||||||
try {
|
try {
|
||||||
unusedTokens = cli.parseInto( argc, argv, configData );
|
unusedTokens = cli.parseInto( argc, argv, configData );
|
||||||
|
@ -110,11 +110,11 @@ namespace Catch {
|
|||||||
.longOpt( "warn" )
|
.longOpt( "warn" )
|
||||||
.argName( "warning name" );
|
.argName( "warning name" );
|
||||||
|
|
||||||
cli.bind( &setVerbosity )
|
// cli.bind( &setVerbosity )
|
||||||
.describe( "level of verbosity (0=no output)" )
|
// .describe( "level of verbosity (0=no output)" )
|
||||||
.shortOpt( "v")
|
// .shortOpt( "v")
|
||||||
.longOpt( "verbosity" )
|
// .longOpt( "verbosity" )
|
||||||
.argName( "level" );
|
// .argName( "level" );
|
||||||
|
|
||||||
cli.bind( &addTestOrTags )
|
cli.bind( &addTestOrTags )
|
||||||
.describe( "which test or tests to use" )
|
.describe( "which test or tests to use" )
|
||||||
|
Loading…
Reference in New Issue
Block a user