equal
deleted
inserted
replaced
92 void TestRunner::printResults() |
92 void TestRunner::printResults() |
93 { |
93 { |
94 printf("\nTests executed: %d\n",mTestCount); |
94 printf("\nTests executed: %d\n",mTestCount); |
95 if (mErrors.count() > 0) { |
95 if (mErrors.count() > 0) { |
96 printf("Failures (%d):\n", mErrors.count()); |
96 printf("Failures (%d):\n", mErrors.count()); |
97 foreach(QString error, mErrors) { |
97 foreach(const QString& error, mErrors) { |
98 printf("\n%s", error.toUtf8().data()); |
98 printf("\n%s", error.toUtf8().data()); |
99 } |
99 } |
100 printf("\n"); |
100 printf("\n"); |
101 } else { |
101 } else { |
102 printf("All passed.\n\n"); |
102 printf("All passed.\n\n"); |
160 mParsingDescriptionElement && |
160 mParsingDescriptionElement && |
161 mCurrentTestFailed) { |
161 mCurrentTestFailed) { |
162 QByteArray testResult = mCurrentTestName.toAscii() + " failed:\n"; |
162 QByteArray testResult = mCurrentTestName.toAscii() + " failed:\n"; |
163 testResult += "File: "; |
163 testResult += "File: "; |
164 testResult += mCurrentTestFile.toAscii(); |
164 testResult += mCurrentTestFile.toAscii(); |
165 testResult += "\n"; |
165 testResult += '\n'; |
166 testResult += "Line: "; |
166 testResult += "Line: "; |
167 testResult += QByteArray::number(mCurrentTestFailureLine); |
167 testResult += QByteArray::number(mCurrentTestFailureLine); |
168 testResult += "\n"; |
168 testResult += '\n'; |
169 testResult += "Reason: "; |
169 testResult += "Reason: "; |
170 testResult += ch.toAscii(); |
170 testResult += ch.toAscii(); |
171 testResult += "\n"; |
171 testResult += '\n'; |
172 mErrors.append(QString::fromAscii(testResult.data())); |
172 mErrors.append(QString::fromAscii(testResult.data())); |
173 } |
173 } |
174 return true; |
174 return true; |
175 } |
175 } |
176 |
176 |