summaryrefslogtreecommitdiffstats
path: root/googletest/src/gtest.cc
diff options
context:
space:
mode:
authorCopybara-Service <copybara-worker@google.com>2022-01-17 20:59:48 (GMT)
committerCopybara-Service <copybara-worker@google.com>2022-01-17 20:59:48 (GMT)
commitc9643a2e45ed0cb18b8409c62994be7c6e66dc1b (patch)
tree85be6845e202a5632a356e27a23d171ac3acfd14 /googletest/src/gtest.cc
parent4e9fe30884414b58d219d0170d39cbad96e5758a (diff)
parent1b4cf359589d51bd244a779d082589536e2a6c9b (diff)
downloadgoogletest-c9643a2e45ed0cb18b8409c62994be7c6e66dc1b.zip
googletest-c9643a2e45ed0cb18b8409c62994be7c6e66dc1b.tar.gz
googletest-c9643a2e45ed0cb18b8409c62994be7c6e66dc1b.tar.bz2
Merge pull request #3721 from joshiayush:i3719
PiperOrigin-RevId: 422405356 Change-Id: I8ea22485d9a25dce81a28d0c323a73b36d15e912
Diffstat (limited to 'googletest/src/gtest.cc')
-rw-r--r--googletest/src/gtest.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
index d1ccd17..7f1580f 100644
--- a/googletest/src/gtest.cc
+++ b/googletest/src/gtest.cc
@@ -4079,8 +4079,9 @@ std::string XmlUnitTestResultPrinter::EscapeXml(
m << '"';
break;
default:
- if (IsValidXmlCharacter(ch)) {
- if (is_attribute && IsNormalizableWhitespace(ch))
+ if (IsValidXmlCharacter(static_cast<unsigned char>(ch))) {
+ if (is_attribute &&
+ IsNormalizableWhitespace(static_cast<unsigned char>(ch)))
m << "&#x" << String::FormatByte(static_cast<unsigned char>(ch))
<< ";";
else
@@ -4101,7 +4102,7 @@ std::string XmlUnitTestResultPrinter::RemoveInvalidXmlCharacters(
std::string output;
output.reserve(str.size());
for (std::string::const_iterator it = str.begin(); it != str.end(); ++it)
- if (IsValidXmlCharacter(*it))
+ if (IsValidXmlCharacter(static_cast<unsigned char>(*it)))
output.push_back(*it);
return output;