SimpleString TestFailure::createUserText(const SimpleString& text) { SimpleString userMessage = ""; if (!text.isEmpty()) { userMessage += "Message: "; userMessage += text; userMessage += "\n\t"; } return userMessage; }
CheckFailure::CheckFailure(UtestShell* test, const char* fileName, int lineNumber, const SimpleString& checkString, const SimpleString& conditionString, const SimpleString& text) : TestFailure(test, fileName, lineNumber) { message_ = ""; if (!text.isEmpty()) { message_ += "Message: "; message_ += text; message_ += "\n\t"; } message_ += checkString; message_ += "("; message_ += conditionString; message_ += ") failed"; }
SimpleString TestFailure::createUserText(const SimpleString& text) { SimpleString userMessage = ""; if (!text.isEmpty()) { //This is a kludge to turn off "Message: " for this case. //I don't think "Message: " adds anything,a s you get to see the //message. I propose we remove "Message: " lead in if (!text.startsWith("LONGS_EQUAL")) userMessage += "Message: "; userMessage += text; userMessage += "\n\t"; } return userMessage; }