diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_cmd_join.c | 16 | ||||
-rw-r--r-- | tests/unittests/test_cmd_otr.c | 2 | ||||
-rw-r--r-- | tests/unittests/test_common.c | 4 | ||||
-rw-r--r-- | tests/unittests/xmpp/stub_xmpp.c | 4 |
4 files changed, 14 insertions, 12 deletions
diff --git a/tests/unittests/test_cmd_join.c b/tests/unittests/test_cmd_join.c index 77e3dc74..6a77dd4d 100644 --- a/tests/unittests/test_cmd_join.c +++ b/tests/unittests/test_cmd_join.c @@ -64,10 +64,10 @@ cmd_join_shows_error_message_when_invalid_room_jid(void** state) void cmd_join_uses_account_mucservice_when_no_service_specified(void** state) { - char* account_name = g_strdup("an_account"); + gchar* account_name = g_strdup("an_account"); char* room = "room"; char* nick = "bob"; - char* account_service = g_strdup("conference.server.org"); + gchar* account_service = g_strdup("conference.server.org"); char* expected_room = "room@conference.server.org"; gchar* args[] = { room, "nick", nick, NULL }; ProfAccount* account = account_new(account_name, g_strdup("user@server.org"), NULL, NULL, @@ -94,7 +94,7 @@ cmd_join_uses_account_mucservice_when_no_service_specified(void** state) void cmd_join_uses_supplied_nick(void** state) { - char* account_name = g_strdup("an_account"); + gchar* account_name = g_strdup("an_account"); char* room = "room@conf.server.org"; char* nick = "bob"; gchar* args[] = { room, "nick", nick, NULL }; @@ -122,9 +122,9 @@ cmd_join_uses_supplied_nick(void** state) void cmd_join_uses_account_nick_when_not_supplied(void** state) { - char* account_name = g_strdup("an_account"); + gchar* account_name = g_strdup("an_account"); char* room = "room2@conf.server.org"; - char* account_nick = g_strdup("a_nick"); + gchar* account_nick = g_strdup("a_nick"); gchar* args[] = { room, NULL }; ProfAccount* account = account_new(account_name, g_strdup("user@server.org"), NULL, NULL, TRUE, NULL, 0, g_strdup("laptop"), NULL, NULL, 0, 0, 0, 0, 0, NULL, account_nick, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0); @@ -150,11 +150,11 @@ cmd_join_uses_account_nick_when_not_supplied(void** state) void cmd_join_uses_password_when_supplied(void** state) { - char* account_name = g_strdup("an_account"); + gchar* account_name = g_strdup("an_account"); char* room = "room"; char* password = "a_password"; - char* account_nick = g_strdup("a_nick"); - char* account_service = g_strdup("a_service"); + gchar* account_nick = g_strdup("a_nick"); + gchar* account_service = g_strdup("a_service"); char* expected_room = "room@a_service"; gchar* args[] = { room, "password", password, NULL }; ProfAccount* account = account_new(account_name, g_strdup("user@server.org"), NULL, NULL, diff --git a/tests/unittests/test_cmd_otr.c b/tests/unittests/test_cmd_otr.c index d5136d97..89bf7e73 100644 --- a/tests/unittests/test_cmd_otr.c +++ b/tests/unittests/test_cmd_otr.c @@ -194,7 +194,7 @@ void cmd_otr_gen_generates_key_for_connected_account(void** state) { gchar* args[] = { "gen", NULL }; - char* account_name = g_strdup("myaccount"); + gchar* account_name = g_strdup("myaccount"); ProfAccount* account = account_new(account_name, 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, NULL, 0); diff --git a/tests/unittests/test_common.c b/tests/unittests/test_common.c index 3812cccb..b10f30bb 100644 --- a/tests/unittests/test_common.c +++ b/tests/unittests/test_common.c @@ -400,7 +400,7 @@ unique_filename_from_url_td(void** state) { enum table { num_tests = 15 }; - char* pwd = g_get_current_dir(); + auto_gchar gchar* pwd = g_get_current_dir(); unique_filename_from_url_t tests[num_tests] = { (unique_filename_from_url_t){ @@ -506,8 +506,6 @@ unique_filename_from_url_td(void** state) free(got_filename); free(exp_filename); } - - g_free(pwd); } gboolean diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c index a7dc9ebf..ffa7565d 100644 --- a/tests/unittests/xmpp/stub_xmpp.c +++ b/tests/unittests/xmpp/stub_xmpp.c @@ -54,6 +54,10 @@ void session_process_events(void) { } +void +connection_disconnect(void) +{ +} const char* connection_get_fulljid(void) { |