BUG: If at least one test fails, the percent cannot be greater than 99

This commit is contained in:
Andy Cedilnik 2004-01-22 11:10:03 -05:00
parent fad0651d84
commit c1ba581da4
1 changed files with 4 additions and 0 deletions

View File

@ -2132,6 +2132,10 @@ int cmCTest::TestDirectory(bool memcheck)
} }
float percent = float(passed.size()) * 100.0f / total; float percent = float(passed.size()) * 100.0f / total;
if ( failed.size() > 0 && percent > 99)
{
percent = 99;
}
fprintf(stderr,"\n%.0f%% tests passed, %i tests failed out of %i\n", fprintf(stderr,"\n%.0f%% tests passed, %i tests failed out of %i\n",
percent, int(failed.size()), total); percent, int(failed.size()), total);