mirror of https://github.com/AxioDL/tinyxml2.git
add simple test for not-crashing
This commit is contained in:
parent
f2496f5824
commit
92e521b431
|
@ -186,6 +186,8 @@ public:
|
||||||
char* ParseName( char* in );
|
char* ParseName( char* in );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void operator=(const StrPair& rhs);
|
||||||
|
|
||||||
void Reset();
|
void Reset();
|
||||||
void CollapseWhitespace();
|
void CollapseWhitespace();
|
||||||
|
|
||||||
|
|
|
@ -1329,6 +1329,14 @@ int main( int argc, const char ** argv )
|
||||||
doc.Print();
|
doc.Print();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// Test that it doesn't crash.
|
||||||
|
const char* xml = "<?xml version=\"1.0\"?><root><sample><field0><1</field0><field1>2</field1></sample></root>";
|
||||||
|
XMLDocument doc;
|
||||||
|
doc.Parse(xml);
|
||||||
|
doc.PrintError();
|
||||||
|
}
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
// the question being explored is what kind of print to use:
|
// the question being explored is what kind of print to use:
|
||||||
// https://github.com/leethomason/tinyxml2/issues/63
|
// https://github.com/leethomason/tinyxml2/issues/63
|
||||||
|
|
Loading…
Reference in New Issue