Make tor_libevent_get_base() mockable

This commit is contained in:
Andrea Shepard 2014-01-23 20:54:50 -08:00
parent 5e9a88e001
commit 5a07fb96f2
2 changed files with 3 additions and 3 deletions

View File

@ -280,8 +280,8 @@ tor_libevent_initialize(tor_libevent_cfg *torcfg)
} }
/** Return the current Libevent event base that we're set up to use. */ /** Return the current Libevent event base that we're set up to use. */
struct event_base * MOCK_IMPL(struct event_base *,
tor_libevent_get_base(void) tor_libevent_get_base, (void))
{ {
return the_event_base; return the_event_base;
} }

View File

@ -72,7 +72,7 @@ typedef struct tor_libevent_cfg {
} tor_libevent_cfg; } tor_libevent_cfg;
void tor_libevent_initialize(tor_libevent_cfg *cfg); void tor_libevent_initialize(tor_libevent_cfg *cfg);
struct event_base *tor_libevent_get_base(void); MOCK_DECL(struct event_base *, tor_libevent_get_base, (void));
const char *tor_libevent_get_method(void); const char *tor_libevent_get_method(void);
void tor_check_libevent_version(const char *m, int server, void tor_check_libevent_version(const char *m, int server,
const char **badness_out); const char **badness_out);