Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/test/testoption.hpp"
Support for selecting and configuring testcases via commandline arguments.
A preconfigured wrapper around boost::program_options, with the ability to tolerate unknown options. The commandline to be parsed is taken wrapped into a Cmdline instance; after parsing this commandline vector will contain only the remaining unrecognised parts.
Definition at line 51 of file testoption.hpp.
Public Member Functions | |
TestOption (lib::Cmdline &cmdline) | |
set up an options parser to use the current commandline. More... | |
const string | getTestgroup () |
const string | getTestID () |
bool | handleHelpRequest () |
handles the –help switch by printing a syntax description More... | |
std::optional< uint64_t > | optSeed () |
bool | shouldDescribe () |
Friends | |
ostream & | operator<< (ostream &, const TestOption &) |
for outputting the help messages. More... | |
Private Attributes | |
boost::program_options::variables_map | parameters |
boost::program_options::options_description | syntax |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
NonCopyable (NonCopyable const &)=delete | |
NonCopyable & | operator= (NonCopyable const &)=delete |
TestOption | ( | lib::Cmdline & | cmdline | ) |
set up an options parser to use the current commandline.
Recognises the following options
Definition at line 46 of file testoption.cpp.
const string getTestgroup | ( | ) |
Definition at line 86 of file testoption.cpp.
Referenced by main().
const string getTestID | ( | ) |
Definition at line 95 of file testoption.cpp.
bool handleHelpRequest | ( | ) |
handles the –help switch by printing a syntax description
false
if there was no help request and the Suite should indeed be executed. Definition at line 125 of file testoption.cpp.
Referenced by main().
bool shouldDescribe | ( | ) |
true
if –describe switch was given Definition at line 115 of file testoption.cpp.
Referenced by main().
|
friend |
for outputting the help messages.
Forward accumulated help messages from all contained option definitions
Definition at line 137 of file testoption.cpp.