Appends the user-supplied message to the Google-Test-generated message.
| 3496 | |
| 3497 | // Appends the user-supplied message to the Google-Test-generated message. |
| 3498 | std::string AppendUserMessage(const std::string& gtest_msg, |
| 3499 | const Message& user_msg) { |
| 3500 | // Appends the user message if it's non-empty. |
| 3501 | const std::string user_msg_string = user_msg.GetString(); |
| 3502 | if (user_msg_string.empty()) { |
| 3503 | return gtest_msg; |
| 3504 | } |
| 3505 | |
| 3506 | return gtest_msg + "\n" + user_msg_string; |
| 3507 | } |
| 3508 | |
| 3509 | } // namespace internal |
| 3510 |