| 169 | } |
| 170 | |
| 171 | bool summary() const |
| 172 | { |
| 173 | const int total = m_passed + m_failed; |
| 174 | std::cout << '\n' << std::string(64, '=') << '\n' |
| 175 | << bold(QStringLiteral("Results: %1/%2 passed") |
| 176 | .arg(m_passed).arg(total)).toStdString() << '\n'; |
| 177 | if (m_skipped) |
| 178 | std::cout << " Skipped: " << m_skipped << '\n'; |
| 179 | if (m_failed) |
| 180 | std::cout << red(QStringLiteral(" Failed: %1").arg(m_failed)) |
| 181 | .toStdString() << '\n'; |
| 182 | std::cout << std::string(64, '=') << '\n'; |
| 183 | return m_failed == 0; |
| 184 | } |
| 185 | |
| 186 | int failed() const { return m_failed; } |
| 187 | |