LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Reads and makes available the command line parameters. More...
#include "unit_test_base.h"
Public Member Functions | |
CommandLineArguments () | |
Constructor: automatically parses from Boost arguments. More... | |
CommandLineArguments (int argc, char **argv) | |
Constructor: parses from specified arguments. More... | |
void | ParseArguments (int argc, char **argv) |
Parses arguments. More... | |
std::string | Executable () const |
Returns the name of the executable as started. More... | |
std::vector< std::string > const & | Arguments () const |
Returns the list of non-Boost-test arguments on the command line. More... | |
bool | hasArgument (size_t iArg) const |
Returns whether we have arguments up to the iArg-th (0-based) More... | |
std::string const & | Argument (size_t iArg) const |
Returns the value of the iArg-th (0-based; no range check!) More... | |
Private Member Functions | |
void | Clear () |
Erases the stored arguments. More... | |
Private Attributes | |
std::string | exec_name |
name of the test executable (from argv[0]) More... | |
std::vector< std::string > | args |
command line arguments (from argv[0]) More... | |
Reads and makes available the command line parameters.
Definition at line 63 of file unit_test_base.h.
|
inline |
Constructor: automatically parses from Boost arguments.
Definition at line 66 of file unit_test_base.h.
References Clear().
|
inline |
Constructor: parses from specified arguments.
Definition at line 69 of file unit_test_base.h.
References ParseArguments().
|
inline |
Returns the value of the iArg-th (0-based; no range check!)
Definition at line 84 of file unit_test_base.h.
References args.
|
inline |
Returns the list of non-Boost-test arguments on the command line.
Definition at line 78 of file unit_test_base.h.
References args.
|
inlineprivate |
Erases the stored arguments.
Definition at line 91 of file unit_test_base.h.
Referenced by CommandLineArguments(), and ParseArguments().
|
inline |
Returns the name of the executable as started.
Definition at line 75 of file unit_test_base.h.
References exec_name.
|
inline |
Returns whether we have arguments up to the iArg-th (0-based)
Definition at line 81 of file unit_test_base.h.
References args.
|
inline |
Parses arguments.
Definition at line 99 of file unit_test_base.h.
References args, Clear(), and exec_name.
Referenced by CommandLineArguments().
|
private |
command line arguments (from argv[0])
Definition at line 88 of file unit_test_base.h.
Referenced by Argument(), Arguments(), testing::TestSharedGlobalResource< RES >::CreateDefaultResource(), testing::TestSharedGlobalResource< RES >::CreateResource(), hasArgument(), ParseArguments(), testing::TestSharedGlobalResource< RES >::ProposeDefaultSharedResource(), testing::TestSharedGlobalResource< RES >::ProposeSharedResource(), testing::TesterEnvironment< ConfigurationClass >::SetupProvider(), testing::TesterEnvironment< ConfigurationClass >::SetupProviderFor(), testing::TesterEnvironment< ConfigurationClass >::SetupProviderFromService(), and testing::TesterEnvironment< ConfigurationClass >::SetupProviderFromServiceFor().
|
private |
name of the test executable (from argv[0])
Definition at line 87 of file unit_test_base.h.
Referenced by Executable(), and ParseArguments().