Skip to content

Commit d961e4b

Browse files
committed
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!
1 parent ffac928 commit d961e4b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/testrunner.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616
* along with this program. If not, see <http://www.gnu.org/licenses/
1717
*/
1818

19+
#include <cstdlib>
1920
#include "testsuite.h"
2021

2122
int main(int argc, const char *argv[])
2223
{
23-
return TestFixture::runTests((argc == 2) ? argv[1] : NULL);
24+
size_t ret = TestFixture::runTests((argc == 2) ? argv[1] : NULL);
25+
26+
return (ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
2427
}
2528

0 commit comments

Comments
 (0)