diff options
Diffstat (limited to 'tests/ui')
-rw-r--r-- | tests/ui/mock_ui.c | 14 | ||||
-rw-r--r-- | tests/ui/mock_ui.h | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c index 5dc52a10..03960e58 100644 --- a/tests/ui/mock_ui.c +++ b/tests/ui/mock_ui.c @@ -184,13 +184,18 @@ gboolean _mock_ui_win_exists(int index) return (gboolean)mock(); } +static +void _mock_ui_switch_win(const int i) +{ + check_expected(i); +} + // bind mocks and stubs void mock_cons_show(void) { cons_show = _mock_cons_show; - } void @@ -458,3 +463,10 @@ ui_win_exists_expect_and_return(int given_index, gboolean result) expect_value(_mock_ui_win_exists, index, given_index); will_return(_mock_ui_win_exists, result); } + +void +ui_switch_win_expect(int given_i) +{ + ui_switch_win = _mock_ui_switch_win; + expect_value(_mock_ui_switch_win, i, given_i); +} diff --git a/tests/ui/mock_ui.h b/tests/ui/mock_ui.h index c939a002..197436b3 100644 --- a/tests/ui/mock_ui.h +++ b/tests/ui/mock_ui.h @@ -67,4 +67,6 @@ void cons_show_roster_expect(GSList *list); void mock_ui_win_exists(void); void ui_win_exists_expect_and_return(int given_index, gboolean result); +void ui_switch_win_expect(int given_i); + #endif |