Closed abhiota closed 4 months ago
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
This makes GTest easier to use, by making its messages slightly more readable. This is clearly nice-to-have. The patch is probably only 15 additional lines of code + test cases. We are happy to provide a patch for it.
For exceptions with multi-line e.what() descriptions, GTest currently prints:
Modifications:
The
FormatCxxExceptionMessage
function will detect if the description contains any newline characters. If it contains no newlines, keep the logic as is it was previously (i.e. print the error message on the same line). If the description contains newlines, print the exception with newlines in it and replace every\n
by\n>
before printing (of course, with special handling to correctly handle the potential presence/absence of a trailing\n
).