Skip to content

Commit 309dab8

Browse files
Abseil Teamcopybara-github
authored andcommitted
Automated Code Change
PiperOrigin-RevId: 782277586 Change-Id: Idd7ffd0a585fa8b307ecafb8b3d53abbf124a774
1 parent 3983f67 commit 309dab8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

googletest/src/gtest.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ std::string UnitTestOptions::GetAbsolutePathToOutputFile() {
713713
const char* const gtest_output_flag = s.c_str();
714714

715715
std::string format = GetOutputFormat();
716-
if (format.empty()) format = std::string(kDefaultOutputFormat);
716+
if (format.empty()) format = kDefaultOutputFormat;
717717

718718
const char* const colon = strchr(gtest_output_flag, ':');
719719
if (colon == nullptr)
@@ -4355,8 +4355,8 @@ void XmlUnitTestResultPrinter::OutputXmlTestResult(::std::ostream* stream,
43554355
internal::FormatCompilerIndependentFileLocation(part.file_name(),
43564356
part.line_number());
43574357
const std::string summary = location + "\n" + part.summary();
4358-
*stream << " <skipped message=\""
4359-
<< EscapeXmlAttribute(summary.c_str()) << "\">";
4358+
*stream << " <skipped message=\"" << EscapeXmlAttribute(summary)
4359+
<< "\">";
43604360
const std::string detail = location + "\n" + part.message();
43614361
OutputXmlCDataSection(stream, RemoveInvalidXmlCharacters(detail).c_str());
43624362
*stream << "</skipped>\n";

0 commit comments

Comments
 (0)