Skip to content

Commit

Permalink
Use raft_dealloc_envelope() in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhamlin committed Jan 3, 2015
1 parent 9aa74c1 commit 518aa7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_raft_wire.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ void Test_raft_write_request_vote_envelope(CuTest* tc) {
for (uint32_t i = 0; i < arr_size; ++i) {
CuAssertIntEquals(tc, expected_request_vote_message[i], env.p_message[i]);
}

raft_dealloc_envelope(&env);
CuAssertPtrEquals(tc, NULL, env.p_message);
}

void Test_raft_read_request_vote_message(CuTest* tc) {
Expand Down Expand Up @@ -90,6 +93,9 @@ void Test_raft_write_request_vote_response_envelope(CuTest* tc) {
expected_request_vote_response_message[i],
env.p_message[i]);
}

raft_dealloc_envelope(&env);
CuAssertPtrEquals(tc, NULL, env.p_message);
}

void Test_raft_read_request_vote_response_message(CuTest* tc) {
Expand Down

0 comments on commit 518aa7f

Please sign in to comment.