mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 12:16:22 +00:00
Removed ui_win_switch_num
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <setjmp.h>
|
||||
#include <cmocka.h>
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include "ui/ui.h"
|
||||
#include "ui/stub_ui.h"
|
||||
|
||||
#include "command/commands.h"
|
||||
|
||||
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_num, i, 3);
|
||||
will_return(ui_switch_win_num, FALSE);
|
||||
|
||||
expect_cons_show("Window 3 does not exist.");
|
||||
|
||||
gboolean result = cmd_win(args, *help);
|
||||
assert_true(result);
|
||||
|
||||
free(help);
|
||||
}
|
||||
|
||||
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_num, i, 12);
|
||||
will_return(ui_switch_win_num, TRUE);
|
||||
|
||||
gboolean result = cmd_win(args, *help);
|
||||
assert_true(result);
|
||||
|
||||
free(help);
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
void cmd_win_shows_message_when_win_doesnt_exist(void **state);
|
||||
void cmd_win_switches_to_given_win_when_exists(void **state);
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "test_cmd_join.h"
|
||||
#include "test_muc.h"
|
||||
#include "test_cmd_roster.h"
|
||||
#include "test_cmd_win.h"
|
||||
#include "test_cmd_disconnect.h"
|
||||
#include "test_form.h"
|
||||
|
||||
@@ -586,9 +585,6 @@ int main(int argc, char* argv[]) {
|
||||
unit_test(cmd_roster_clearnick_shows_message_when_no_contact_exists),
|
||||
unit_test(cmd_roster_clearnick_sends_name_change_request_with_empty_nick),
|
||||
|
||||
unit_test(cmd_win_shows_message_when_win_doesnt_exist),
|
||||
unit_test(cmd_win_switches_to_given_win_when_exists),
|
||||
|
||||
unit_test(get_form_type_field_returns_null_no_fields),
|
||||
unit_test(get_form_type_field_returns_null_when_not_present),
|
||||
unit_test(get_form_type_field_returns_value_when_present),
|
||||
|
||||
@@ -64,17 +64,7 @@ GSList* ui_get_chat_recipients(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gboolean ui_switch_win(ProfWin *win)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean ui_switch_win_num(const int i)
|
||||
{
|
||||
check_expected(i);
|
||||
return (gboolean)mock();
|
||||
return FALSE;
|
||||
}
|
||||
void ui_switch_win(ProfWin *win) {}
|
||||
|
||||
void ui_next_win(void) {}
|
||||
void ui_previous_win(void) {}
|
||||
|
||||
Reference in New Issue
Block a user