Called when a test has failed. This method should not be called directly in your test buy you should call fail() instead (macro)
| 62 | // Called when a test has failed. |
| 63 | // This method should not be called directly in your test buy you should call fail() instead (macro) |
| 64 | void Test::applyFail(const std::string& testText, const char* filename, long lineNumber) { |
| 65 | |
| 66 | if (mOutputStream) { |
| 67 | |
| 68 | // Display the failure message |
| 69 | *mOutputStream << mName << " failure : (" << testText << "), " << |
| 70 | filename << "(line " << lineNumber << ")" << std::endl; |
| 71 | } |
| 72 | |
| 73 | // Increase the number of failed tests |
| 74 | mNbFailedTests++; |
| 75 | } |
| 76 | |
| 77 | /// Display the report of the unit test and return the number of failed tests |
| 78 | long Test::report() const { |
nothing calls this directly
no outgoing calls
no test coverage detected