mirror of
https://github.com/curl/curl.git
synced 2026-07-25 12:47:21 +03:00
tests: rename more CURLcode variables to result
For consistency. Also: - one remaining in `src/tool_writeout.c`. - replace casting an `int` to `CURLcode`. - lib758: rename `CURLMcode` `result` to `mresult`. - move literals to the right side of if expressions. Follow-up tod0dc6e2ec0#20426 Follow-up to56f600ec23Closes #20432
This commit is contained in:
parent
26c39d8df1
commit
2da1bbca96
33 changed files with 307 additions and 303 deletions
|
|
@ -30,23 +30,23 @@
|
|||
struct test_spec {
|
||||
const char *input;
|
||||
const char *exp_output;
|
||||
CURLcode exp_res;
|
||||
CURLcode result_exp;
|
||||
};
|
||||
|
||||
static bool do_test(const struct test_spec *spec, size_t i,
|
||||
struct dynbuf *dbuf)
|
||||
{
|
||||
CURLcode res;
|
||||
CURLcode result;
|
||||
const char *in = spec->input;
|
||||
|
||||
curlx_dyn_reset(dbuf);
|
||||
res = Curl_x509_GTime2str(dbuf, in, in + strlen(in));
|
||||
if(res != spec->exp_res) {
|
||||
result = Curl_x509_GTime2str(dbuf, in, in + strlen(in));
|
||||
if(result != spec->result_exp) {
|
||||
curl_mfprintf(stderr, "test %zu: expect result %d, got %d\n",
|
||||
i, spec->exp_res, res);
|
||||
i, spec->result_exp, result);
|
||||
return FALSE;
|
||||
}
|
||||
else if(!res && strcmp(spec->exp_output, curlx_dyn_ptr(dbuf))) {
|
||||
else if(!result && strcmp(spec->exp_output, curlx_dyn_ptr(dbuf))) {
|
||||
curl_mfprintf(stderr,
|
||||
"test %zu: input '%s', expected output '%s', got '%s'\n",
|
||||
i, in, spec->exp_output, curlx_dyn_ptr(dbuf));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue