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 59 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... | |
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 54 of file testoption.cpp.
const string getTestgroup | ( | ) |
Definition at line 92 of file testoption.cpp.
Referenced by TestOption_test::doIt(), and main().
const string getTestID | ( | ) |
Definition at line 101 of file testoption.cpp.
Referenced by TestOption_test::doIt().
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 122 of file testoption.cpp.
Referenced by main().
bool shouldDescribe | ( | ) |
true
if –describe switch was given Definition at line 112 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 134 of file testoption.cpp.