Expose a useful mock from test_channel.c

This commit is contained in:
Andrea Shepard 2014-01-21 00:58:27 -08:00
parent 79b8f14c25
commit bef11b7156
2 changed files with 4 additions and 2 deletions

View File

@ -13,4 +13,7 @@ void make_fake_cell(cell_t *c);
void make_fake_var_cell(var_cell_t *c); void make_fake_var_cell(var_cell_t *c);
channel_t * new_fake_channel(void); channel_t * new_fake_channel(void);
/* Also exposes some a mock used by both test_channel.c and test_relay.c */
void scheduler_release_channel_mock(channel_t *ch);
#endif /* !defined(TOR_FAKECHANS_H) */ #endif /* !defined(TOR_FAKECHANS_H) */

View File

@ -35,7 +35,6 @@ static int chan_test_write_packed_cell(channel_t *ch,
packed_cell_t *packed_cell); packed_cell_t *packed_cell);
static int chan_test_write_var_cell(channel_t *ch, var_cell_t *var_cell); static int chan_test_write_var_cell(channel_t *ch, var_cell_t *var_cell);
static void scheduler_channel_doesnt_want_writes_mock(channel_t *ch); static void scheduler_channel_doesnt_want_writes_mock(channel_t *ch);
static void scheduler_release_channel_mock(channel_t *ch);
static void test_channel_flush(void *arg); static void test_channel_flush(void *arg);
static void test_channel_lifecycle(void *arg); static void test_channel_lifecycle(void *arg);
@ -218,7 +217,7 @@ scheduler_channel_doesnt_want_writes_mock(channel_t *ch)
return; return;
} }
static void void
scheduler_release_channel_mock(channel_t *ch) scheduler_release_channel_mock(channel_t *ch)
{ {
(void)ch; (void)ch;