Appends the user-supplied message to the Google-Test-generated message.
| 3471 | |
| 3472 | // Appends the user-supplied message to the Google-Test-generated message. |
| 3473 | std::string AppendUserMessage(const std::string& gtest_msg, |
| 3474 | const Message& user_msg) { |
| 3475 | // Appends the user message if it's non-empty. |
| 3476 | const std::string user_msg_string = user_msg.GetString(); |
| 3477 | if (user_msg_string.empty()) { |
| 3478 | return gtest_msg; |
| 3479 | } |
| 3480 | |
| 3481 | return gtest_msg + "\n" + user_msg_string; |
| 3482 | } |
| 3483 | |
| 3484 | } // namespace internal |
| 3485 |