Procházet zdrojové kódy

Merge pull request #312 from Dmitry-Me/newDocumentMustBeEmpty

Document must be initially empty
Lee Thomason před 11 roky
rodič
revize
a1a4a13825
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      xmltest.cpp

+ 3 - 0
xmltest.cpp

@@ -1167,6 +1167,9 @@ int main( int argc, const char ** argv )
 
 
     {
     {
         XMLDocument doc;
         XMLDocument doc;
+        XMLTest( "Document is initially empty", doc.NoChildren(), true );
+        doc.Clear();
+        XMLTest( "Empty is empty after Clear()", doc.NoChildren(), true );
         doc.LoadFile( "resources/dream.xml" );
         doc.LoadFile( "resources/dream.xml" );
         XMLTest( "Document has something to Clear()", doc.NoChildren(), false );
         XMLTest( "Document has something to Clear()", doc.NoChildren(), false );
         doc.Clear();
         doc.Clear();