Remove ui_current_print_formatted_line

This commit is contained in:
James Booth
2016-10-16 22:13:49 +01:00
parent 769e71b17b
commit 333403d2e5
6 changed files with 34 additions and 57 deletions

View File

@@ -216,7 +216,7 @@ void cmd_otr_myfp_shows_message_when_no_key(void **state)
will_return(connection_get_status, JABBER_CONNECTED);
will_return(otr_key_loaded, FALSE);
expect_ui_current_print_formatted_line('!', 0, "You have not generated or loaded a private key, use '/otr gen'");
expect_win_println("You have not generated or loaded a private key, use '/otr gen'");
gboolean result = cmd_otr_myfp(NULL, CMD_OTR, args);
assert_true(result);
@@ -233,7 +233,7 @@ void cmd_otr_myfp_shows_my_fingerprint(void **state)
will_return(otr_key_loaded, TRUE);
will_return(otr_get_my_fingerprint, strdup(fingerprint));
expect_ui_current_print_formatted_line('!', 0, message->str);
expect_win_println(message->str);
gboolean result = cmd_otr_myfp(NULL, CMD_OTR, args);
assert_true(result);
@@ -286,7 +286,7 @@ void cmd_otr_theirfp_shows_message_when_non_otr_chat_window(void **state)
will_return(connection_get_status, JABBER_CONNECTED);
expect_ui_current_print_formatted_line('!', 0, "You are not currently in an OTR session.");
expect_win_println("You are not currently in an OTR session.");
gboolean result = cmd_otr_theirfp((ProfWin*)&chatwin, CMD_OTR, args);
@@ -316,7 +316,7 @@ void cmd_otr_theirfp_shows_fingerprint(void **state)
expect_string(otr_get_their_fingerprint, recipient, recipient);
will_return(otr_get_their_fingerprint, strdup(fingerprint));
expect_ui_current_print_formatted_line('!', 0, message->str);
expect_win_println(message->str);
gboolean result = cmd_otr_theirfp((ProfWin*)&chatwin, CMD_OTR, args);
assert_true(result);
@@ -370,7 +370,7 @@ void cmd_otr_start_shows_message_when_already_started(void **state)
chatwin.pgp_send = FALSE;
chatwin.is_otr = TRUE;
expect_ui_current_print_formatted_line('!', 0, "You are already in an OTR session.");
expect_win_println("You are already in an OTR session.");
gboolean result = cmd_otr_start((ProfWin*)&chatwin, CMD_OTR, args);
assert_true(result);
@@ -393,7 +393,7 @@ void cmd_otr_start_shows_message_when_no_key(void **state)
chatwin.pgp_send = FALSE;
chatwin.is_otr = FALSE;
expect_ui_current_print_formatted_line('!', 0, "You have not generated or loaded a private key, use '/otr gen'");
expect_win_println("You have not generated or loaded a private key, use '/otr gen'");
gboolean result = cmd_otr_start((ProfWin*)&chatwin, CMD_OTR, args);
assert_true(result);

View File

@@ -48,14 +48,6 @@ expect_win_println(char *message)
expect_string(win_println, output, message);
}
void
expect_ui_current_print_formatted_line(char show_char, int attrs, char *message)
{
expect_value(ui_current_print_formatted_line, show_char, show_char);
expect_value(ui_current_print_formatted_line, attrs, attrs);
expect_string(ui_current_print_formatted_line, output, message);
}
// stubs
void ui_init(void) {}

View File

@@ -2,5 +2,4 @@ void expect_cons_show(char *expected);
void expect_any_cons_show(void);
void expect_cons_show_error(char *expected);
void expect_any_cons_show_error(void);
void expect_ui_current_print_formatted_line(char show_char, int attrs, char *message);
void expect_win_println(char *message);