![]() |
Lumiera 0.pre.04
»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. | |
| const string | getTestgroup () |
| const string | getTestID () |
| bool | handleHelpRequest () |
| handles the –help switch by printing a syntax description | |
| bool | shouldDescribe () |
| std::optional< uint64_t > | optSeed () |
Friends | |
| ostream & | operator<< (ostream &, const TestOption &) |
| for outputting the help messages. | |
Private Attributes | |
| boost::program_options::options_description | syntax |
| boost::program_options::variables_map | parameters |
Additional Inherited Members | |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| 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.
References Suite::ALLGROUP, TestOption::parameters, and TestOption::syntax.
| const string getTestgroup | ( | ) |
Definition at line 86 of file testoption.cpp.
References TestOption::parameters.
Referenced by main().
Here is the caller graph for this function:| const string getTestID | ( | ) |
Definition at line 95 of file testoption.cpp.
References TestOption::parameters.
| 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.
References TestOption::parameters.
Referenced by main().
Here is the caller graph for this function:| bool shouldDescribe | ( | ) |
true if –describe switch was given Definition at line 115 of file testoption.cpp.
References TestOption::parameters.
Referenced by main().
Here is the caller graph for this function:| optional< uint64_t > optSeed | ( | ) |
Definition at line 105 of file testoption.cpp.
References TestOption::parameters.
Referenced by main().
Here is the caller graph for this function:
|
private |
Definition at line 64 of file testoption.hpp.
Referenced by TestOption::TestOption().
|
private |
Definition at line 65 of file testoption.hpp.
Referenced by TestOption::TestOption(), TestOption::getTestgroup(), TestOption::getTestID(), TestOption::handleHelpRequest(), TestOption::optSeed(), and TestOption::shouldDescribe().
|
friend |
for outputting the help messages.
Forward accumulated help messages from all contained option definitions
Definition at line 136 of file testoption.cpp.
Inheritance diagram for TestOption:
Collaboration diagram for TestOption: