Sfoglia il codice sorgente

Issue 299 - test for code changes

Ant Mitchell 11 anni fa
parent
commit
148cc1a0a5
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  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 --------------
 	{