23 os <<
'[' << tr.
test <<
"=F]";
27 os <<
'[' << tr.
test <<
"=C]";
31 os <<
'[' << tr.
test <<
"=X]";
35 os <<
'[' << tr.
test <<
"=W]";
39 os <<
'[' << tr.
test <<
"=T]";
54 std::string current_group;
55 typedef std::vector<tut::test_result> not_passed_list;
56 not_passed_list not_passed;
83 if( tr.
group != current_group )
85 os << std::endl << tr.
group <<
": " << std::flush;
86 current_group = tr.
group;
89 os << tr << std::flush;
99 not_passed.push_back(tr);
107 if( not_passed.size() > 0 )
109 not_passed_list::const_iterator i = not_passed.begin();
110 while( i != not_passed.end() )
116 os <<
"---> " <<
"group: " << tr.
group <<
", test: test<" << tr.
test <<
">" << std::endl;
122 os <<
"assertion failed" << std::endl;
126 os <<
"unexpected exception" << std::endl;
129 os <<
" exception typeid: "
134 os <<
"would be terminated" << std::endl;
137 os <<
"test passed, but cleanup code (destructor) raised an exception" << std::endl;
146 os <<
" failed assertion: \"" << tr.
message <<
"\"" << std::endl;
150 os <<
" message: \"" << tr.
message <<
"\"" << std::endl;
160 os <<
"tests summary:";
171 return not_passed.size() == 0;
Default TUT callback handler.
Definition tut_reporter.h:53
reporter(std::ostream &out)
Definition tut_reporter.h:71
int warnings_count
Definition tut_reporter.h:64
int ok_count
Definition tut_reporter.h:60
int terminations_count
Definition tut_reporter.h:63
int failures_count
Definition tut_reporter.h:62
reporter()
Definition tut_reporter.h:66
void test_completed(const tut::test_result &tr)
Called when a test finished.
Definition tut_reporter.h:81
void run_completed()
Called when all tests in run completed.
Definition tut_reporter.h:103
bool all_ok() const
Definition tut_reporter.h:169
void run_started()
Called when new test run started.
Definition tut_reporter.h:76
int exceptions_count
Definition tut_reporter.h:61
Template Unit Tests Framework for C++.
Definition tut-main.cpp:7
Test runner callback interface.
Definition tut.h:185
Return type of runned test/test group.
Definition tut.h:106
std::string exception_typeid
Definition tut.h:131
result_type result
Definition tut.h:125
std::string group
Test group name.
Definition tut.h:110
std::string message
Exception message for failed test.
Definition tut.h:130
@ term
Definition tut.h:124
@ fail
Definition tut.h:124
@ ex_ctor
Definition tut.h:124
@ warn
Definition tut.h:124
int test
Test number in group.
Definition tut.h:115