test/testrunner.cpp: fixed exit code when count of fails tests equals to 256.

When 256 tests fails return code was 0 and it was wrong. Now exit code
may be only 0 or 1 and not show how many tests fails.

Thanks to aggro80@ for pointing to this!
This commit is contained in:
Slava Semushin 2009-07-19 03:12:55 +07:00
parent ffac9281c4
commit d961e4b5c1
1 changed files with 4 additions and 1 deletions

View File

@ -16,10 +16,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/
*/
#include <cstdlib>
#include "testsuite.h"
int main(int argc, const char *argv[])
{
return TestFixture::runTests((argc == 2) ? argv[1] : NULL);
size_t ret = TestFixture::runTests((argc == 2) ? argv[1] : NULL);
return (ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}