MCPcopy Create free account
hub / github.com/cpputest/cpputest / encodeXmlText

Method encodeXmlText

src/CppUTest/JUnitTestOutput.cpp:205–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205SimpleString JUnitTestOutput::encodeXmlText(const SimpleString& textbody)
206{
207 SimpleString buf = textbody.asCharString();
208 buf.replace("&", "&");
209 buf.replace("\"", """);
210 buf.replace("<", "&lt;");
211 buf.replace(">", "&gt;");
212 buf.replace("\n", "{newline}");
213 return buf;
214}
215
216void JUnitTestOutput::writeTestCases()
217{

Callers

nothing calls this directly

Calls 2

asCharStringMethod · 0.80
replaceMethod · 0.80

Tested by

no test coverage detected