tests: move curlcheck.h to libtest as unitcheck.h

To simplify dependencies, and sync tunits and units builds further.

`curlcheck.h` already depended on logic implemented within libtests:
it referenced a global variable (`unitfail`) defined in `first.c` and
declared in `test.h`.

Also:
- rename to `unitcheck.h` to indicate it's meant for unit tests.
- make `unitcheck.h` include `first.h` instead of `test.h`.
  This brings header use closer to libtests. It also includes
  `curlx/curlx.h` for all unit tests by default now.
- move `unitfail` declaration from `test.h` to `first.h`.
  To match its definition in `first.c`.
- drop now redundant per-test curlx header includes.

Closes #17868
This commit is contained in:
Viktor Szakats 2025-07-09 00:43:44 +02:00
parent 9db9137066
commit 784c17b7d9
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
69 changed files with 70 additions and 90 deletions

View file

@ -21,7 +21,7 @@
* SPDX-License-Identifier: curl
*
***************************************************************************/
#include "curlcheck.h"
#include "unitcheck.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>