Fixed main not cleaning up on special CLI actions
This commit is contained in:
parent
503f9e2896
commit
30f2982423
2 changed files with 6 additions and 8 deletions
|
@ -66,10 +66,9 @@ Example main
|
|||
int main(int argc, char *argv[]) {
|
||||
struct criterion_test_set *tests = criterion_initialize();
|
||||
|
||||
if (!criterion_handle_args(argc, argv, true))
|
||||
return 0;
|
||||
|
||||
int result = !criterion_run_all_tests(set);
|
||||
int result = 0;
|
||||
if (criterion_handle_args(argc, argv, true))
|
||||
result = !criterion_run_all_tests(set);
|
||||
|
||||
criterion_finalize(set);
|
||||
return result;
|
||||
|
|
|
@ -26,10 +26,9 @@
|
|||
CR_API int main(int argc, char *argv[]) {
|
||||
struct criterion_test_set *tests = criterion_initialize();
|
||||
|
||||
if (!criterion_handle_args(argc, argv, true))
|
||||
return 0;
|
||||
|
||||
int result = !criterion_run_all_tests(tests);
|
||||
int result = 0;
|
||||
if (criterion_handle_args(argc, argv, true))
|
||||
result = !criterion_run_all_tests(tests);
|
||||
|
||||
criterion_finalize(tests);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue