Appends the user-supplied message to the Google-Test-generated message.
| 3160 | |
| 3161 | // Appends the user-supplied message to the Google-Test-generated message. |
| 3162 | std::string AppendUserMessage(const std::string& gtest_msg, |
| 3163 | const Message& user_msg) { |
| 3164 | // Appends the user message if it's non-empty. |
| 3165 | const std::string user_msg_string = user_msg.GetString(); |
| 3166 | if (user_msg_string.empty()) { |
| 3167 | return gtest_msg; |
| 3168 | } |
| 3169 | |
| 3170 | return gtest_msg + "\n" + user_msg_string; |
| 3171 | } |
| 3172 | |
| 3173 | } // namespace internal |
| 3174 |