Skip to content

Commit

Permalink
remove dead code and improve server transport variable name in test_c…
Browse files Browse the repository at this point in the history
…lient_0x11_ECU_reset.c
  • Loading branch information
driftregion committed Jul 24, 2024
1 parent 24c60fd commit dc0e887
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_client_0x11_ECU_reset.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ int main() {

for (size_t i = 0; i < sizeof(p) / sizeof(p[0]); i++) {
ENV_CLIENT_INIT(client);
UDSTpHandle_t *srv = ENV_TpNew("server");
UDSTpHandle_t *srv_tp = ENV_TpNew("server");

// when the client sends a ECU reset request with these options
client.options = p[i].options;
UDSSendECUReset(&client, kHardReset);

// and the server responds with this message
UDSTpSend(srv, p[i].resp, p[i].resp_len, NULL);
UDSTpSend(srv_tp, p[i].resp, p[i].resp_len, NULL);

// then the client should receive a response with this error code
ENV_RunMillis(50);
TEST_INT_EQUAL(client.state, kRequestStateIdle);
TEST_INT_EQUAL(client.err, p[i].expected_err);
// assert(client.err == p[i].expected_err);
ENV_TpFree(srv);

ENV_TpFree(srv_tp);
ENV_TpFree(client.tp);
}
}

0 comments on commit dc0e887

Please sign in to comment.