mirror of
https://github.com/curl/curl.git
synced 2026-08-03 08:00:34 +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
|
|
@ -83,7 +83,7 @@ struct test_case {
|
|||
int exp_cf6_creations;
|
||||
timediff_t min_duration_ms;
|
||||
timediff_t max_duration_ms;
|
||||
CURLcode exp_res;
|
||||
CURLcode result_exp;
|
||||
const char *pref_family;
|
||||
};
|
||||
|
||||
|
|
@ -242,11 +242,11 @@ static void check_result(const struct test_case *tc, struct test_result *tr)
|
|||
duration_ms = curlx_timediff_ms(tr->ended, tr->started);
|
||||
curl_mfprintf(stderr, "%d: test case took %dms\n", tc->id, (int)duration_ms);
|
||||
|
||||
if(tr->result != tc->exp_res && CURLE_OPERATION_TIMEDOUT != tr->result) {
|
||||
if(tr->result != tc->result_exp && CURLE_OPERATION_TIMEDOUT != tr->result) {
|
||||
/* on CI we encounter the TIMEOUT result, since images get less CPU
|
||||
* and events are not as sharply timed. */
|
||||
curl_msprintf(msg, "%d: expected result %d but got %d",
|
||||
tc->id, tc->exp_res, tr->result);
|
||||
tc->id, tc->result_exp, tr->result);
|
||||
fail(msg);
|
||||
}
|
||||
if(tr->cf4.creations != tc->exp_cf4_creations) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue