mirror of
https://github.com/curl/curl.git
synced 2026-08-26 17:43:31 +03:00
unit tests: use the unit test infrastructure better
Allow UNITTEST_STOP to return the error code, use the fail & abort macros to indicate test failure and return success instead of fail if the unit test can't test anything because of missing features at compile-time. A couple of tests could never fail because they were overriding the failure return code.
This commit is contained in:
parent
419a745da6
commit
a13ef31d0f
7 changed files with 60 additions and 79 deletions
|
|
@ -47,7 +47,7 @@ static void unit_stop(void)
|
|||
}
|
||||
|
||||
UNITTEST_START
|
||||
{
|
||||
|
||||
int i;
|
||||
CURLcode code;
|
||||
struct Curl_addrinfo *addrhead = addrs;
|
||||
|
|
@ -71,6 +71,4 @@ UNITTEST_START
|
|||
|
||||
abort_unless(addrhead != addrs, "addresses are not being reordered");
|
||||
|
||||
return 0;
|
||||
}
|
||||
UNITTEST_STOP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue