clean up the pass/fail logic, still return the same value from test if it fails

This commit is contained in:
Lee Thomason (grinliz)
2013-07-31 12:24:52 -07:00
parent 70d343f513
commit db304256bb
2 changed files with 3 additions and 6 deletions

View File

@@ -21,7 +21,6 @@
#endif
using namespace tinyxml2;
int gTests = 0;
int gPass = 0;
int gFail = 0;
@@ -48,8 +47,6 @@ bool XMLTest (const char* testString, const char* expected, const char* found, b
}
}
++gTests;
if ( pass )
++gPass;
else
@@ -71,8 +68,6 @@ template< class T > bool XMLTest( const char* testString, T expected, T found, b
else
printf (" %s [%d][%d]\n", testString, static_cast<int>(expected), static_cast<int>(found) );
++gTests;
if ( pass )
++gPass;
else
@@ -1267,5 +1262,6 @@ int main( int argc, const char ** argv )
#endif
printf ("\nPass %d, Fail %d\n", gPass, gFail);
return (gTests - gPass);
return gFail;
}