diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2011-01-05 23:53:24 -0800 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2011-01-05 23:53:24 -0800 |
commit | ebb9c7ae04f905f86f6beddba06a9b0c3e4e0ac8 (patch) | |
tree | ec81d52e6fdc6d35cb6e8b946a0e3c12c6c4fd18 /tests/unit/curlcheck.h | |
parent | 53014175e8dce8bc1ea6fbe00f1da886767d7587 (diff) | |
download | curl-ebb9c7ae04f905f86f6beddba06a9b0c3e4e0ac8.tar.gz |
Made unit_setup() return an error code to abort the test early
This makes it possible to skip the call to unit_stop() in such
cases. Also use Curl_safefree() in unit test 1302 so it will
pass the memory torture test.
Diffstat (limited to 'tests/unit/curlcheck.h')
-rw-r--r-- | tests/unit/curlcheck.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unit/curlcheck.h b/tests/unit/curlcheck.h index 57babe5c7..9d738430c 100644 --- a/tests/unit/curlcheck.h +++ b/tests/unit/curlcheck.h @@ -46,12 +46,13 @@ extern int unitfail; int test(char *unused) \ { \ (void)unused; \ - unit_setup(); \ - { + if (unit_setup()) { \ + fail("unit_setup() failure"); \ + } else { #define UNITTEST_STOP \ + unit_stop(); \ } \ - unit_stop(); \ return unitfail; \ } |