From 41aa7177827147ebc77dc58f1cf3b41eb3939ba7 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 12 Mar 2017 18:56:03 +0100 Subject: [PATCH] Proper use of exit to terminate a test. --- tests/test-marray.c | 1 + tests/test-mbuffer.c | 1 + tests/test-mcore.c | 5 +---- tests/test-mdict.c | 2 +- tests/test-mlist.c | 1 + tests/test-mrbtree.c | 2 +- tests/test-mshared.c | 2 +- tests/test-msnapshot.c | 1 + tests/test-mstring.c | 1 + tests/test-mtuple.c | 2 +- tests/test-mvariant.c | 2 +- 11 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/test-marray.c b/tests/test-marray.c index 01ab7100..a0123f2f 100644 --- a/tests/test-marray.c +++ b/tests/test-marray.c @@ -210,4 +210,5 @@ int main(void) { test_uint(); test_mpz(); + exit(0); } diff --git a/tests/test-mbuffer.c b/tests/test-mbuffer.c index 41016308..d146df30 100644 --- a/tests/test-mbuffer.c +++ b/tests/test-mbuffer.c @@ -264,4 +264,5 @@ int main(void) test_stack2(); test_no_thread(); test_global_ishared(); + exit(0); } diff --git a/tests/test-mcore.c b/tests/test-mcore.c index 6b11479c..5d9b0ea4 100644 --- a/tests/test-mcore.c +++ b/tests/test-mcore.c @@ -155,8 +155,5 @@ int main(void) test_invert(); test_min(); test_let(); - return 0; + exit(0); } - - - diff --git a/tests/test-mdict.c b/tests/test-mdict.c index f98025f9..4e947afd 100644 --- a/tests/test-mdict.c +++ b/tests/test-mdict.c @@ -159,7 +159,7 @@ int main(void) init_data(5000000); test_data(); clear_data(); - return 0; + exit(0); } /* diff --git a/tests/test-mlist.c b/tests/test-mlist.c index 8b858b7b..af3926bd 100644 --- a/tests/test-mlist.c +++ b/tests/test-mlist.c @@ -227,4 +227,5 @@ int main(void) { test_uint(); test_mpz(); + exit(0); } diff --git a/tests/test-mrbtree.c b/tests/test-mrbtree.c index e50e5ac3..837ad340 100644 --- a/tests/test-mrbtree.c +++ b/tests/test-mrbtree.c @@ -162,5 +162,5 @@ int main(void) test_uint(); test_float(); test_io(); - return 0; + exit(0); } diff --git a/tests/test-mshared.c b/tests/test-mshared.c index 16397655..4e3caa08 100644 --- a/tests/test-mshared.c +++ b/tests/test-mshared.c @@ -55,5 +55,5 @@ int main(void) assert(shared_int_NULL_p(p1)); shared_int_clear(p1); - return 0; + exit(0); } diff --git a/tests/test-msnapshot.c b/tests/test-msnapshot.c index e2eb587e..384955b4 100644 --- a/tests/test-msnapshot.c +++ b/tests/test-msnapshot.c @@ -70,5 +70,6 @@ static void test_uint(void) int main(void) { test_uint(); + exit(0); } diff --git a/tests/test-mstring.c b/tests/test-mstring.c index ecb83f15..1989ad1f 100644 --- a/tests/test-mstring.c +++ b/tests/test-mstring.c @@ -192,4 +192,5 @@ int main(void) assert (string_equal_p(s1, s2)); string_clear (s1); + exit(0); } diff --git a/tests/test-mtuple.c b/tests/test-mtuple.c index 5ef4c912..338a667f 100644 --- a/tests/test-mtuple.c +++ b/tests/test-mtuple.c @@ -113,5 +113,5 @@ int main(void) mpz_clear(z); check_io(); - return 0; + exit(0); } diff --git a/tests/test-mvariant.c b/tests/test-mvariant.c index 80c98c54..9f40f05b 100644 --- a/tests/test-mvariant.c +++ b/tests/test-mvariant.c @@ -172,6 +172,6 @@ int main(void) test_pair(); test_triple(); test_io(); - return 0; + exit(0); }