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[]) {
|
int main(int argc, char *argv[]) {
|
||||||
struct criterion_test_set *tests = criterion_initialize();
|
struct criterion_test_set *tests = criterion_initialize();
|
||||||
|
|
||||||
if (!criterion_handle_args(argc, argv, true))
|
int result = 0;
|
||||||
return 0;
|
if (criterion_handle_args(argc, argv, true))
|
||||||
|
result = !criterion_run_all_tests(set);
|
||||||
int result = !criterion_run_all_tests(set);
|
|
||||||
|
|
||||||
criterion_finalize(set);
|
criterion_finalize(set);
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -26,10 +26,9 @@
|
||||||
CR_API int main(int argc, char *argv[]) {
|
CR_API int main(int argc, char *argv[]) {
|
||||||
struct criterion_test_set *tests = criterion_initialize();
|
struct criterion_test_set *tests = criterion_initialize();
|
||||||
|
|
||||||
if (!criterion_handle_args(argc, argv, true))
|
int result = 0;
|
||||||
return 0;
|
if (criterion_handle_args(argc, argv, true))
|
||||||
|
result = !criterion_run_all_tests(tests);
|
||||||
int result = !criterion_run_all_tests(tests);
|
|
||||||
|
|
||||||
criterion_finalize(tests);
|
criterion_finalize(tests);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue