| 162 | } |
| 163 | |
| 164 | int |
| 165 | run() const |
| 166 | { |
| 167 | int numfailed(0); |
| 168 | for (std::pair<TestFunc, char const *> const &namefunc : funcs) { |
| 169 | TestFunc const &func = namefunc.first; |
| 170 | char const *const name = namefunc.second; |
| 171 | |
| 172 | std::cerr << name << " : "; |
| 173 | |
| 174 | std::string const fres(func()); |
| 175 | if (fres.empty()) { |
| 176 | std::cerr << "pass" << std::endl; |
| 177 | } else { |
| 178 | std::cerr << "FAIL" << std::endl; |
| 179 | std::cerr << fres << std::endl; |
| 180 | ++numfailed; |
| 181 | } |
| 182 | } |
| 183 | return numfailed; |
| 184 | } |
| 185 | }; |
| 186 | |
| 187 | int |