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.c | |
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.c')
-rw-r--r-- | src/or/circuitmux.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/or/circuitmux.c b/src/or/circuitmux.c index c84e0ce09c..081416368e 100644 --- a/src/or/circuitmux.c +++ b/src/or/circuitmux.c @@ -922,9 +922,9 @@ circuitmux_num_circuits(circuitmux_t *cmux) * Attach a circuit to a circuitmux, for the specified direction. */ -void -circuitmux_attach_circuit(circuitmux_t *cmux, circuit_t *circ, - cell_direction_t direction) +MOCK_IMPL(void, +circuitmux_attach_circuit,(circuitmux_t *cmux, circuit_t *circ, + cell_direction_t direction)) { channel_t *chan = NULL; uint64_t channel_id; @@ -1071,8 +1071,8 @@ circuitmux_attach_circuit(circuitmux_t *cmux, circuit_t *circ, * no-op if not attached. */ -void -circuitmux_detach_circuit(circuitmux_t *cmux, circuit_t *circ) +MOCK_IMPL(void, +circuitmux_detach_circuit,(circuitmux_t *cmux, circuit_t *circ)) { chanid_circid_muxinfo_t search, *hashent = NULL; /* |