summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-12-21 10:43:12 -0500
committerNick Mathewson <nickm@torproject.org>2017-12-21 10:43:12 -0500
commit3b08184338fd9b0b3e3bd3e5260684cd078beae0 (patch)
treeac18ea3bc49f5ecd9e34ba3a655dc0975a402ee4 /src/test
parentc604a76a53204eb20af0fab0a9f1f49fba393fd9 (diff)
parent7d845976e3897fac8e78a4a26688ac57b660151b (diff)
downloadtor-3b08184338fd9b0b3e3bd3e5260684cd078beae0.tar.gz
tor-3b08184338fd9b0b3e3bd3e5260684cd078beae0.zip
Merge branch 'maint-0.2.8' into maint-0.2.9
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_circuitmux.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test_circuitmux.c b/src/test/test_circuitmux.c
index 9e8fb54964..1ffa17247d 100644
--- a/src/test/test_circuitmux.c
+++ b/src/test/test_circuitmux.c
@@ -34,8 +34,9 @@ test_cmux_destroy_cell_queue(void *arg)
circuitmux_t *cmux = NULL;
channel_t *ch = NULL;
circuit_t *circ = NULL;
- cell_queue_t *cq = NULL;
+ destroy_cell_queue_t *cq = NULL;
packed_cell_t *pc = NULL;
+ destroy_cell_t *dc = NULL;
scheduler_init();
@@ -63,11 +64,9 @@ test_cmux_destroy_cell_queue(void *arg)
tt_int_op(cq->n, OP_EQ, 3);
- pc = cell_queue_pop(cq);
- tt_assert(pc);
- tt_mem_op(pc->body, OP_EQ, "\x00\x00\x00\x64\x04\x0a\x00\x00\x00", 9);
- packed_cell_free(pc);
- pc = NULL;
+ dc = destroy_cell_queue_pop(cq);
+ tt_assert(dc);
+ tt_uint_op(dc->circid, OP_EQ, 100);
tt_int_op(circuitmux_num_cells(cmux), OP_EQ, 2);
@@ -75,6 +74,7 @@ test_cmux_destroy_cell_queue(void *arg)
circuitmux_free(cmux);
channel_free(ch);
packed_cell_free(pc);
+ tor_free(dc);
}
struct testcase_t circuitmux_tests[] = {