| 41 | } |
| 42 | |
| 43 | void ProjectTestJobPrivate::gotResult(ITestSuite* suite, const TestResult& result) |
| 44 | { |
| 45 | if (suite == m_currentSuite) { |
| 46 | m_result.total++; |
| 47 | q->emitPercent(m_result.total, m_result.total + m_suites.size()); |
| 48 | |
| 49 | switch (result.suiteResult) { |
| 50 | case TestResult::Passed: |
| 51 | m_result.passed++; |
| 52 | break; |
| 53 | |
| 54 | case TestResult::Failed: |
| 55 | m_result.failed++; |
| 56 | break; |
| 57 | |
| 58 | case TestResult::Error: |
| 59 | m_result.error++; |
| 60 | break; |
| 61 | |
| 62 | default: |
| 63 | break; |
| 64 | } |
| 65 | |
| 66 | if (m_suites.isEmpty()) { |
| 67 | q->emitResult(); |
| 68 | } else { |
| 69 | runNext(); |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | ProjectTestJob::ProjectTestJob(IProject* project, QObject* parent) |
| 75 | : KJob(parent) |
no test coverage detected