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;
63 int terminations_count;
66 reporter() : os(std::cout)
71 reporter(std::ostream& out) : os(out)
83 if( tr.
group != current_group )
85 os << std::endl << tr.
group <<
": " << std::flush;
86 current_group = tr.
group;
89 os << tr << std::flush;
95 else terminations_count++;
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:";
161 if( terminations_count > 0 ) os <<
" terminations:" << terminations_count;
162 if( exceptions_count > 0 ) os <<
" exceptions:" << exceptions_count;
163 if( failures_count > 0 ) os <<
" failures:" << failures_count;
164 if( warnings_count > 0 ) os <<
" warnings:" << warnings_count;
165 os <<
" ok:" << ok_count;
171 return not_passed.size() == 0;
178 exceptions_count = 0;
180 terminations_count = 0;