mirror of
https://github.com/curl/curl.git
synced 2026-07-25 15:57:17 +03:00
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:
parent
a076f821e1
commit
bb5500a752
8 changed files with 56 additions and 61 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue