Definition at line 46 of file utest.
◆ utest() [1/2]
tools::utest::utest |
( |
std::ostream & |
a_out | ) |
|
|
inline |
Definition at line 50 of file utest.
◆ ~ utest()
virtual tools::utest::~ utest |
( |
| ) |
|
|
inline |
Definition at line 51 of file utest.
◆ utest() [2/2]
tools::utest::utest |
( |
const utest & |
a_from | ) |
|
|
inline |
Definition at line 53 of file utest.
53 :parent(a_from),
m_out(a_from.m_out){}
◆ add() [1/4]
void tools::utest::add |
( |
const std::string & |
a_name, |
|
|
test::cfunc |
a_func |
|
) |
| |
|
inline |
Definition at line 65 of file utest.
66 (*this).push_back(named_test(a_name,test(
false,a_func)));
◆ add() [2/4]
void tools::utest::add |
( |
const std::string & |
a_name, |
|
|
test::func |
a_func |
|
) |
| |
|
inline |
Definition at line 56 of file utest.
57 (*this).push_back(named_test(a_name,test(
false,a_func)));
◆ add() [3/4]
void tools::utest::add |
( |
const std::string & |
a_name, |
|
|
test::func2 |
a_func |
|
) |
| |
|
inline |
Definition at line 59 of file utest.
60 (*this).push_back(named_test(a_name,test(
false,a_func)));
◆ add() [4/4]
void tools::utest::add |
( |
const std::string & |
a_name, |
|
|
test::func3 |
a_func |
|
) |
| |
|
inline |
Definition at line 62 of file utest.
63 (*this).push_back(named_test(a_name,test(
false,a_func)));
◆ exec()
bool tools::utest::exec |
( |
const args & |
a_args, |
|
|
bool |
a_verbose, |
|
|
int |
a_argc = 0 , |
|
|
char ** |
a_argv = 0 |
|
) |
| |
|
inline |
Definition at line 69 of file utest.
70 {
tools_vforit(named_test,*
this,it) (*it).second.m_do_it =
false;}
73 const std::string& key = (*it).first;
76 const std::string& name = (*itn).first;
77 if(key==std::string(
"-"+name)) {
found=
true;
break;}
78 if(key==std::string(
"-no_"+name)) {
found=
true;
break;}
81 m_out <<
"WARNING : arg " << sout(key) <<
" is not a test." << std::endl;
87 const std::string& name = (*it).first;
88 if(a_args.is_arg(
"-"+name)) {
89 (*it).second.m_do_it =
true;
95 tools_vforit(named_test,*
this,it) (*it).second.m_do_it =
true;
99 const std::string& name = (*it).first;
100 if(a_args.is_arg(
"-no_"+name)) {
101 (*it).second.m_do_it =
false;
108 const std::string& name = (*it).first;
109 if((*it).second.m_do_it && (*it).second.m_func) {
110 if(a_verbose)
m_out <<
"test_" << name <<
" ..." << std::endl;
111 if(!(*it).second.m_func(
m_out,a_verbose)) {
112 m_out <<
"test_" << name <<
" failed." << std::endl;
115 if(a_verbose)
m_out <<
"test_" << name <<
" end." << std::endl;
120 const std::string& name = (*it).first;
121 if((*it).second.m_do_it && (*it).second.m_func2) {
122 if(a_verbose)
m_out <<
"test_" << name <<
" ..." << std::endl;
123 if(!(*it).second.m_func2(
m_out,a_args)) {
124 m_out <<
"test_" << name <<
" failed." << std::endl;
127 if(a_verbose)
m_out <<
"test_" << name <<
" end." << std::endl;
132 const std::string& name = (*it).first;
133 if((*it).second.m_do_it && (*it).second.m_func3) {
134 if(a_verbose)
m_out <<
"test_" << name <<
" ..." << std::endl;
135 if(!(*it).second.m_func3(
m_out,a_argc,a_argv)) {
136 m_out <<
"test_" << name <<
" failed." << std::endl;
139 if(a_verbose)
m_out <<
"test_" << name <<
" end." << std::endl;
144 const std::string& name = (*it).first;
145 if((*it).second.m_do_it && (*it).second.m_cfunc) {
146 if(a_verbose)
m_out <<
"test_" << name <<
" ..." << std::endl;
147 if(!(*it).second.m_cfunc(stdout,a_verbose)) {
148 m_out <<
"test_" << name <<
" failed." << std::endl;
151 if(a_verbose)
m_out <<
"test_" << name <<
" end." << std::endl;
155 tools_vforit(named_test,*
this,it) (*it).second.m_do_it =
false;
◆ list()
void tools::utest::list |
( |
| ) |
|
|
inline |
◆ operator=()
utest& tools::utest::operator= |
( |
const utest & |
a_from | ) |
|
|
inline |
Definition at line 54 of file utest.
54 { parent::operator=(a_from);
return *
this;}
◆ m_out
std::ostream& tools::utest::m_out |
|
protected |
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/utest