mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-29 17:46:21 +00:00
let account_new() take ownership of passed values
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
@@ -33,7 +33,7 @@ cmd_account_shows_usage_when_not_connected_and_no_args(void** state)
|
||||
void
|
||||
cmd_account_shows_account_when_connected_and_no_args(void** state)
|
||||
{
|
||||
ProfAccount* account = account_new("jabber_org", "me@jabber.org", NULL, NULL,
|
||||
ProfAccount* account = account_new(g_strdup("jabber_org"), g_strdup("me@jabber.org"), NULL, NULL,
|
||||
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
gchar* args[] = { NULL };
|
||||
|
||||
@@ -97,7 +97,7 @@ void
|
||||
cmd_account_show_shows_account_when_exists(void** state)
|
||||
{
|
||||
gchar* args[] = { "show", "account_name", NULL };
|
||||
ProfAccount* account = account_new("jabber_org", "me@jabber.org", NULL, NULL,
|
||||
ProfAccount* account = account_new(g_strdup("jabber_org"), g_strdup("me@jabber.org"), NULL, NULL,
|
||||
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
expect_any(accounts_get_account, name);
|
||||
@@ -436,7 +436,7 @@ void
|
||||
cmd_account_set_password_sets_password(void** state)
|
||||
{
|
||||
gchar* args[] = { "set", "a_account", "password", "a_password", NULL };
|
||||
ProfAccount* account = account_new("a_account", NULL, NULL, NULL,
|
||||
ProfAccount* account = account_new(g_strdup("a_account"), NULL, NULL, NULL,
|
||||
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
expect_any(accounts_account_exists, account_name);
|
||||
@@ -459,7 +459,7 @@ void
|
||||
cmd_account_set_eval_password_sets_eval_password(void** state)
|
||||
{
|
||||
gchar* args[] = { "set", "a_account", "eval_password", "a_password", NULL };
|
||||
ProfAccount* account = account_new("a_account", NULL, NULL, NULL,
|
||||
ProfAccount* account = account_new(g_strdup("a_account"), NULL, NULL, NULL,
|
||||
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
expect_any(accounts_account_exists, account_name);
|
||||
@@ -482,7 +482,7 @@ void
|
||||
cmd_account_set_password_when_eval_password_set(void** state)
|
||||
{
|
||||
gchar* args[] = { "set", "a_account", "password", "a_password", NULL };
|
||||
ProfAccount* account = account_new("a_account", NULL, NULL, "a_password",
|
||||
ProfAccount* account = account_new(g_strdup("a_account"), NULL, NULL, g_strdup("a_password"),
|
||||
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
expect_any(accounts_account_exists, account_name);
|
||||
@@ -501,7 +501,7 @@ void
|
||||
cmd_account_set_eval_password_when_password_set(void** state)
|
||||
{
|
||||
gchar* args[] = { "set", "a_account", "eval_password", "a_password", NULL };
|
||||
ProfAccount* account = account_new("a_account", NULL, "a_password", NULL,
|
||||
ProfAccount* account = account_new(g_strdup("a_account"), NULL, g_strdup("a_password"), NULL,
|
||||
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
expect_any(accounts_account_exists, account_name);
|
||||
@@ -852,7 +852,7 @@ cmd_account_set_priority_updates_presence_when_account_connected_with_presence(v
|
||||
will_return(session_get_account_name, "a_account");
|
||||
|
||||
#ifdef HAVE_LIBGPGME
|
||||
ProfAccount* account = account_new("a_account", "a_jid", NULL, NULL, TRUE, NULL, 5222, "a_resource",
|
||||
ProfAccount* account = account_new(g_strdup("a_account"), g_strdup("a_jid"), NULL, NULL, TRUE, NULL, 5222, g_strdup("a_resource"),
|
||||
NULL, NULL, 10, 10, 10, 10, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
will_return(session_get_account_name, "a_account");
|
||||
|
||||
Reference in New Issue
Block a user