| 176 | } |
| 177 | |
| 178 | int |
| 179 | run() const |
| 180 | { |
| 181 | int numfailed(0); |
| 182 | for (std::pair<TestFunc, char const *> const &namefunc : funcs) { |
| 183 | TestFunc const &func = namefunc.first; |
| 184 | char const *const name = namefunc.second; |
| 185 | |
| 186 | std::cerr << name << " : "; |
| 187 | |
| 188 | std::string const fres(func()); |
| 189 | if (fres.empty()) { |
| 190 | std::cerr << "pass" << std::endl; |
| 191 | } else { |
| 192 | std::cerr << "FAIL" << std::endl; |
| 193 | std::cerr << fres << std::endl; |
| 194 | ++numfailed; |
| 195 | } |
| 196 | } |
| 197 | return numfailed; |
| 198 | } |
| 199 | }; |
| 200 | |
| 201 | int |