"docs/source/tutorials/hello_nas.rst" did not exist on "eb77376e026657a1c5b1317104a46868629c3439"
Commit 6c8a3865 authored by dmauro's avatar dmauro Committed by dinord
Browse files

Googletest export

Explicitly used unsigned chars for testing for valid XML characters

PiperOrigin-RevId: 408692969
parent 79efd968
...@@ -3934,12 +3934,13 @@ class XmlUnitTestResultPrinter : public EmptyTestEventListener { ...@@ -3934,12 +3934,13 @@ class XmlUnitTestResultPrinter : public EmptyTestEventListener {
private: private:
// Is c a whitespace character that is normalized to a space character // Is c a whitespace character that is normalized to a space character
// when it appears in an XML attribute value? // when it appears in an XML attribute value?
static bool IsNormalizableWhitespace(char c) { static bool IsNormalizableWhitespace(unsigned char c) {
return c == 0x9 || c == 0xA || c == 0xD; return c == '\t' || c == '\n' || c == '\r';
} }
// May c appear in a well-formed XML document? // May c appear in a well-formed XML document?
static bool IsValidXmlCharacter(char c) { // https://www.w3.org/TR/REC-xml/#charsets
static bool IsValidXmlCharacter(unsigned char c) {
return IsNormalizableWhitespace(c) || c >= 0x20; return IsNormalizableWhitespace(c) || c >= 0x20;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment