소스 검색

Merge pull request #715 from Dmitry-Me/checkLastChildBeforeInsertion

Check the element is the last child of the document
Lee Thomason 7 년 전
부모
커밋
de6f6616cd
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      xmltest.cpp

+ 1 - 0
xmltest.cpp

@@ -1782,6 +1782,7 @@ int main( int argc, const char ** argv )
 		XMLTest( "Insertion with removal parse round 4", false, doc.Error() );
 		subtree = doc.RootElement()->FirstChildElement("one")->FirstChildElement("subtree");
 		two = doc.RootElement()->FirstChildElement("two");
+		XMLTest("<two> is the last child at root level", true, two == doc.RootElement()->LastChildElement());
 		doc.RootElement()->InsertEndChild(subtree);
 		XMLPrinter printer4(0, true);
 		acceptResult = doc.Accept(&printer4);