units: tidy up begin/end blocks

- use `UNITTEST_BEGIN_SIMPLE`/`UNITTEST_END_SIMPLE` where missing.
- drop redundant `(void)arg;` where using `UNITTEST_BEGIN*`.
- unit1636: drop redundant block after `UNITTEST_BEGIN*`.
- unit1609: fix typo in comment.
- unit1627: merge to `if`s.

Closes #21715
This commit is contained in:
Viktor Szakats 2026-05-21 04:21:33 +02:00
parent a076f821e1
commit bb5500a752
No known key found for this signature in database
8 changed files with 56 additions and 61 deletions

View file

@ -36,6 +36,8 @@ struct check1625 {
static CURLcode test_unit1625(const char *arg)
{
UNITTEST_BEGIN_SIMPLE
size_t i;
static const struct check1625 list[] = {
/* basic case */
@ -101,7 +103,6 @@ static CURLcode test_unit1625(const char *arg)
/* hyphenated second token */
{ "Encoding: extra-good, super-nice", "Encoding:", "super-nice", TRUE },
};
(void)arg;
for(i = 0; i < CURL_ARRAYSIZE(list); i++) {
bool check = Curl_compareheader(list[i].in,
@ -123,12 +124,12 @@ static CURLcode test_unit1625(const char *arg)
if(i != CURL_ARRAYSIZE(list))
return CURLE_FAILED_INIT;
return CURLE_OK;
UNITTEST_END_SIMPLE
}
#else /* CURL_DISABLE_HTTP */
static CURLcode test_unit1625(const char *arg)
{
(void)arg;
return CURLE_OK;
UNITTEST_BEGIN_SIMPLE
UNITTEST_END_SIMPLE
}
#endif