mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-22 23:16:22 +00:00
WIP - /statuses command options
This commit is contained in:
@@ -44,6 +44,14 @@ void _stub_cons_show(const char * const msg, ...)
|
||||
{
|
||||
}
|
||||
|
||||
static
|
||||
void _mock_cons_show_contact_online(PContact contact, Resource *resource, GDateTime *last_activity)
|
||||
{
|
||||
check_expected(contact);
|
||||
check_expected(resource);
|
||||
check_expected(last_activity);
|
||||
}
|
||||
|
||||
static
|
||||
void _mock_cons_show_error(const char * const msg, ...)
|
||||
{
|
||||
@@ -78,6 +86,11 @@ char * _stub_ui_ask_password(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static
|
||||
void _stub_ui_chat_win_contact_online(PContact contact, Resource *resource, GDateTime *last_activity)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
mock_cons_show(void)
|
||||
{
|
||||
@@ -85,6 +98,18 @@ mock_cons_show(void)
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
mock_cons_show_contact_online(void)
|
||||
{
|
||||
cons_show_contact_online = _mock_cons_show_contact_online;
|
||||
}
|
||||
|
||||
void
|
||||
stub_ui_chat_win_contact_online(void)
|
||||
{
|
||||
ui_chat_win_contact_online = _stub_ui_chat_win_contact_online;
|
||||
}
|
||||
|
||||
void
|
||||
mock_cons_show_error(void)
|
||||
{
|
||||
@@ -152,6 +177,18 @@ expect_cons_show_account_list(gchar **accounts)
|
||||
expect_memory(_mock_cons_show_account_list, accounts, accounts, sizeof(accounts));
|
||||
}
|
||||
|
||||
void
|
||||
expect_cons_show_contact_online(PContact contact, Resource *resource, GDateTime *last_activity)
|
||||
{
|
||||
expect_memory(_mock_cons_show_contact_online, contact, contact, sizeof(contact));
|
||||
expect_memory(_mock_cons_show_contact_online, resource, resource, sizeof(Resource));
|
||||
if (last_activity == NULL) {
|
||||
expect_any(_mock_cons_show_contact_online, last_activity);
|
||||
} else {
|
||||
expect_memory(_mock_cons_show_contact_online, last_activity, last_activity, sizeof(last_activity));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
mock_ui_ask_password_returns(char *password)
|
||||
{
|
||||
|
||||
@@ -11,6 +11,10 @@ void mock_cons_show(void);
|
||||
void expect_cons_show(char *output);
|
||||
void expect_cons_show_calls(int n);
|
||||
|
||||
void mock_cons_show_contact_online(void);
|
||||
void expect_cons_show_contact_online(PContact contact, Resource *resource, GDateTime *last_activity);
|
||||
void stub_ui_chat_win_contact_online(void);
|
||||
|
||||
void mock_cons_show_error(void);
|
||||
void expect_cons_show_error(char *output);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user