diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-07-10 15:07:32 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-07-10 15:26:34 -0400 |
commit | ec6c155f827000e337796f1f1c54299fbc5cf72a (patch) | |
tree | e165ed24d0bc530ab25710214e0a63e2f052ed1e /src/or/circuitmux.h | |
parent | b6e8c74667cf723c5ef4d081fc901752e05f9a9b (diff) | |
download | tor-ec6c155f827000e337796f1f1c54299fbc5cf72a.tar.gz tor-ec6c155f827000e337796f1f1c54299fbc5cf72a.zip |
Add some basic unit tests for the circuit map data structure.
These show off the new mocking code by mocking the circuitmux code
so that we can test the circuit map code in isolation.
Diffstat (limited to 'src/or/circuitmux.h')
-rw-r--r-- | src/or/circuitmux.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/circuitmux.h b/src/or/circuitmux.h index a6bc415cdd..ffa28be06d 100644 --- a/src/or/circuitmux.h +++ b/src/or/circuitmux.h @@ -10,6 +10,7 @@ #define TOR_CIRCUITMUX_H #include "or.h" +#include "testsupport.h" typedef struct circuitmux_policy_s circuitmux_policy_t; typedef struct circuitmux_policy_data_s circuitmux_policy_data_t; @@ -127,9 +128,10 @@ void circuitmux_notify_xmit_cells(circuitmux_t *cmux, circuit_t *circ, void circuitmux_notify_xmit_destroy(circuitmux_t *cmux); /* Circuit interface */ -void circuitmux_attach_circuit(circuitmux_t *cmux, circuit_t *circ, - cell_direction_t direction); -void circuitmux_detach_circuit(circuitmux_t *cmux, circuit_t *circ); +MOCK_DECL(void, circuitmux_attach_circuit, (circuitmux_t *cmux, circuit_t *circ, + cell_direction_t direction)); +MOCK_DECL(void, circuitmux_detach_circuit, + (circuitmux_t *cmux, circuit_t *circ)); void circuitmux_clear_num_cells(circuitmux_t *cmux, circuit_t *circ); void circuitmux_set_num_cells(circuitmux_t *cmux, circuit_t *circ, unsigned int n_cells); |