diff options
author | James Booth <boothj5@gmail.com> | 2015-04-21 23:35:37 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-04-21 23:35:37 +0100 |
commit | bc445ccdfb0f8e210e793925e120b01bd0d9b918 (patch) | |
tree | 72c6fe466ed140cac3f04def74d88fdba20d54b4 /tests | |
parent | ebca38e22483ec7054596a8ecf0bdccd85e76e0a (diff) | |
parent | 88739d5c59022b4d1f1b67da3128cb4a3266ecf9 (diff) | |
download | profani-tty-bc445ccdfb0f8e210e793925e120b01bd0d9b918.tar.gz |
Merge branch 'master' into pgp
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_cmd_win.c | 8 | ||||
-rw-r--r-- | tests/ui/stub_ui.c | 13 |
2 files changed, 15 insertions, 6 deletions
diff --git a/tests/test_cmd_win.c b/tests/test_cmd_win.c index bc19ebf3..7ad01c49 100644 --- a/tests/test_cmd_win.c +++ b/tests/test_cmd_win.c @@ -15,8 +15,8 @@ void cmd_win_shows_message_when_win_doesnt_exist(void **state) CommandHelp *help = malloc(sizeof(CommandHelp)); gchar *args[] = { "3", NULL }; - expect_value(ui_switch_win, i, 3); - will_return(ui_switch_win, FALSE); + expect_value(ui_switch_win_num, i, 3); + will_return(ui_switch_win_num, FALSE); expect_cons_show("Window 3 does not exist."); @@ -31,8 +31,8 @@ void cmd_win_switches_to_given_win_when_exists(void **state) CommandHelp *help = malloc(sizeof(CommandHelp)); gchar *args[] = { "12", NULL }; - expect_value(ui_switch_win, i, 12); - will_return(ui_switch_win, TRUE); + expect_value(ui_switch_win_num, i, 12); + will_return(ui_switch_win_num, TRUE); gboolean result = cmd_win(args, *help); assert_true(result); diff --git a/tests/ui/stub_ui.c b/tests/ui/stub_ui.c index d7fdeb0a..54faa50a 100644 --- a/tests/ui/stub_ui.c +++ b/tests/ui/stub_ui.c @@ -64,7 +64,12 @@ GSList* ui_get_chat_recipients(void) return NULL; } -gboolean ui_switch_win(const int i) +gboolean ui_switch_win(ProfWin *win) +{ + return FALSE; +} + +gboolean ui_switch_win_num(const int i) { check_expected(i); return (gboolean)mock(); @@ -99,8 +104,12 @@ unsigned long ui_get_idle_time(void) } void ui_reset_idle_time(void) {} -void ui_new_chat_win(const char * const barejid) {} void ui_new_private_win(const char * const fulljid) {} +ProfWin* ui_new_chat_win(const char * const barejid) +{ + return NULL; +} + void ui_print_system_msg_from_recipient(const char * const barejid, const char *message) {} gint ui_unread(void) { |