diff options
author | James Booth <boothj5@gmail.com> | 2014-12-20 18:39:39 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2014-12-20 18:39:39 +0000 |
commit | 6800bf1cad19d3ec99a3c8333be5fae81a24954d (patch) | |
tree | c086feaef444b1665825c14c49d077af1e62ae83 /tests/ui | |
parent | ea267e2017c8e941166754d50180fdfbca85eefe (diff) | |
download | profani-tty-6800bf1cad19d3ec99a3c8333be5fae81a24954d.tar.gz |
Fixed tests
Diffstat (limited to 'tests/ui')
-rw-r--r-- | tests/ui/mock_ui.c | 13 | ||||
-rw-r--r-- | tests/ui/mock_ui.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c index 2f4b407e..e2327388 100644 --- a/tests/ui/mock_ui.c +++ b/tests/ui/mock_ui.c @@ -94,6 +94,12 @@ win_type_t _mock_ui_current_win_type(void) } static +ProfChatWin * _mock_ui_get_current_chat(void) +{ + return (ProfChatWin*)mock(); +} + +static void _mock_ui_handle_error(const char * const err_msg) { check_expected(err_msg); @@ -395,6 +401,13 @@ mock_current_win_type(win_type_t type) } void +mock_ui_get_current_chat(ProfChatWin *chatwin) +{ + ui_get_current_chat = _mock_ui_get_current_chat; + will_return(_mock_ui_get_current_chat, chatwin); +} + +void ui_current_print_formatted_line_expect(char show_char, int attrs, char *message) { expect_value(_mock_ui_current_print_formatted_line, show_char, show_char); diff --git a/tests/ui/mock_ui.h b/tests/ui/mock_ui.h index 7214ca52..e68ba6dc 100644 --- a/tests/ui/mock_ui.h +++ b/tests/ui/mock_ui.h @@ -47,6 +47,8 @@ void mock_ui_ask_password_returns(char *password); void mock_current_win_type(win_type_t type); +void mock_ui_get_current_chat(ProfChatWin *chatwin); + void mock_ui_current_recipient(void); void ui_current_recipient_returns(char *jid); |