mirror of
https://github.com/curl/curl.git
synced 2026-07-26 18:47:25 +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
|
|
@ -34,6 +34,8 @@ struct check1626 {
|
|||
|
||||
static CURLcode test_unit1626(const char *arg)
|
||||
{
|
||||
UNITTEST_BEGIN_SIMPLE
|
||||
|
||||
size_t i;
|
||||
static const struct check1626 list[] = {
|
||||
/* basic */
|
||||
|
|
@ -94,8 +96,6 @@ static CURLcode test_unit1626(const char *arg)
|
|||
{ "Header : value", "value" },
|
||||
};
|
||||
|
||||
(void)arg;
|
||||
|
||||
for(i = 0; i < CURL_ARRAYSIZE(list); i++) {
|
||||
bool ok;
|
||||
char *get = Curl_copy_header_value(list[i].in);
|
||||
|
|
@ -117,13 +117,13 @@ static CURLcode test_unit1626(const char *arg)
|
|||
if(i != CURL_ARRAYSIZE(list))
|
||||
return CURLE_FAILED_INIT;
|
||||
|
||||
return CURLE_OK;
|
||||
UNITTEST_END_SIMPLE
|
||||
}
|
||||
#else
|
||||
/* for HTTP-disabled builds */
|
||||
static CURLcode test_unit1626(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