Explorar o código

Issue 299 - test for code changes

Ant Mitchell %!s(int64=11) %!d(string=hai) anos
pai
achega
148cc1a0a5
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      xmltest.cpp

+ 8 - 0
xmltest.cpp

@@ -1425,6 +1425,14 @@ int main( int argc, const char ** argv )
 		XMLPrinter printer;
 		doc.Print( &printer );
 	}
+	{
+		// Issue 299. Can print elements that are not linked in. 
+		// Will crash if issue not fixed.
+		XMLDocument doc;
+		XMLElement* newElement = doc.NewElement( "printme" );
+		XMLPrinter printer;
+		newElement->Accept( &printer );
+	}
 
 	// ----------- Performance tracking --------------
 	{