瀏覽代碼

Merge pull request #613 from Dmitry-Me/testResultOfSetError

Test SetError() has effect
Lee Thomason 8 年之前
父節點
當前提交
dbf18add4c
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      xmltest.cpp

+ 3 - 1
xmltest.cpp

@@ -1925,7 +1925,9 @@ int main( int argc, const char ** argv )
 	{
 		XMLDocument doc;
 		for( int i = 0; i < XML_ERROR_COUNT; i++ ) {
-			doc.SetError( (XMLError)i, 0, 0, 0 );
+			const XMLError error = static_cast<XMLError>(i);
+			doc.SetError( error, 0, 0, 0 );
+			XMLTest( "ErrorID() after SetError()", error, doc.ErrorID() );
 			doc.ErrorName();
 		}
 	}