mirror of
https://github.com/curl/curl.git
synced 2026-07-26 03:27: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
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
static CURLcode test_unit1627(const char *arg)
|
||||
{
|
||||
UNITTEST_BEGIN_SIMPLE
|
||||
|
||||
size_t i, j;
|
||||
/* existing schemes in different cases */
|
||||
static const char *okay[] = {
|
||||
|
|
@ -65,8 +67,6 @@ static CURLcode test_unit1627(const char *arg)
|
|||
"GhJk", "LzXc", "VbNm"
|
||||
};
|
||||
|
||||
(void)arg;
|
||||
|
||||
for(i = 0; i < CURL_ARRAYSIZE(okay); i++) {
|
||||
char buffer[32];
|
||||
const struct Curl_scheme *get = Curl_get_scheme(okay[i]);
|
||||
|
|
@ -96,10 +96,9 @@ static CURLcode test_unit1627(const char *arg)
|
|||
|
||||
curl_mprintf("%zu invokes\n", i + j);
|
||||
|
||||
if(i != CURL_ARRAYSIZE(okay))
|
||||
return CURLE_FAILED_INIT;
|
||||
if(j != CURL_ARRAYSIZE(notokay))
|
||||
if(i != CURL_ARRAYSIZE(okay) ||
|
||||
j != CURL_ARRAYSIZE(notokay))
|
||||
return CURLE_FAILED_INIT;
|
||||
|
||||
return CURLE_OK;
|
||||
UNITTEST_END_SIMPLE
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue