Explorar o código

Merge pull request #601 from Dmitry-Me/testErrorIdAfterParse

Test ErrorID after Parse()
Lee Thomason %!s(int64=8) %!d(string=hai) anos
pai
achega
82e20b1831
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      xmltest.cpp

+ 3 - 2
xmltest.cpp

@@ -1997,10 +1997,11 @@ int main( int argc, const char ** argv )
             void TestParseError(const char *testString, const char *docStr, XMLError expected_error, int expectedLine)
             {
                 XMLDocument doc;
-                XMLError err = doc.Parse(docStr);
+                const XMLError parseError = doc.Parse(docStr);
 
+                XMLTest(testString, parseError, doc.ErrorID());
                 XMLTest(testString, true, doc.Error());
-                XMLTest(testString, expected_error, err);
+                XMLTest(testString, expected_error, parseError);
                 XMLTest(testString, expectedLine, doc.GetErrorLineNum());
             };