From da908a593fded0c4774c6cdfb6b5e51c87f65d88 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 2 Apr 2014 13:38:50 -0400 Subject: Unit tests for connection_edge_process_resolved_cell Also rename a function to be more accurate (resolve->resolved) --- src/or/connection_edge.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/or/connection_edge.h') diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h index cbca31a21..3c0e30a97 100644 --- a/src/or/connection_edge.h +++ b/src/or/connection_edge.h @@ -17,8 +17,9 @@ #define connection_mark_unattached_ap(conn, endreason) \ connection_mark_unattached_ap_((conn), (endreason), __LINE__, SHORT_FILE__) -void connection_mark_unattached_ap_(entry_connection_t *conn, int endreason, - int line, const char *file); +MOCK_DECL(void,connection_mark_unattached_ap_, + (entry_connection_t *conn, int endreason, + int line, const char *file)); int connection_edge_reached_eof(edge_connection_t *conn); int connection_edge_process_inbuf(edge_connection_t *conn, int package_partial); @@ -44,16 +45,17 @@ entry_connection_t *connection_ap_make_link(connection_t *partner, void connection_ap_handshake_socks_reply(entry_connection_t *conn, char *reply, size_t replylen, int endreason); -void connection_ap_handshake_socks_resolved(entry_connection_t *conn, - int answer_type, - size_t answer_len, - const uint8_t *answer, - int ttl, - time_t expires); +MOCK_DECL(void,connection_ap_handshake_socks_resolved, + (entry_connection_t *conn, + int answer_type, + size_t answer_len, + const uint8_t *answer, + int ttl, + time_t expires)); void connection_ap_handshake_socks_resolved_addr(entry_connection_t *conn, - const tor_addr_t *answer, - int ttl, - time_t expires); + const tor_addr_t *answer, + int ttl, + time_t expires); int connection_exit_begin_conn(cell_t *cell, circuit_t *circ); int connection_exit_begin_resolve(cell_t *cell, or_circuit_t *circ); -- cgit v1.2.3