Skip to content

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

Closed
vszakats wants to merge 5 commits intocurl:masterfrom
vszakats:curlcheck
Closed

tests: move curlcheck.h to libtest as unitcheck.h#17868
vszakats wants to merge 5 commits intocurl:masterfrom
vszakats:curlcheck

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jul 8, 2025

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.
  • units: drop now redundant per-test curlx header includes.

vszakats added 2 commits July 9, 2025 00:57
To make units and tunits depend on the same dir.
Also, curlcheck.h depends on first.c and test.h in libtests, so even
though it's not made for actual libtests, the logic resides there.
@vszakats vszakats closed this in 784c17b Jul 9, 2025
@vszakats vszakats deleted the curlcheck branch July 9, 2025 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant