From a2726b6a7d16f5f846a882fbbe9127e4604bb8bb Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Tue, 7 Jul 2020 14:18:57 +0200 Subject: Apply coding style --- tests/unittests/test_callbacks.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'tests/unittests/test_callbacks.c') diff --git a/tests/unittests/test_callbacks.c b/tests/unittests/test_callbacks.c index ec411863..3c5267fe 100644 --- a/tests/unittests/test_callbacks.c +++ b/tests/unittests/test_callbacks.c @@ -9,10 +9,11 @@ #include "plugins/callbacks.h" #include "plugins/plugins.h" -void returns_no_commands(void **state) +void +returns_no_commands(void** state) { callbacks_init(); - GList *commands = plugins_get_command_names(); + GList* commands = plugins_get_command_names(); assert_true(commands == NULL); @@ -20,29 +21,30 @@ void returns_no_commands(void **state) g_list_free(commands); } -void returns_commands(void **state) +void +returns_commands(void** state) { callbacks_init(); - PluginCommand *command1 = malloc(sizeof(PluginCommand)); + PluginCommand* command1 = malloc(sizeof(PluginCommand)); command1->command_name = strdup("command1"); callbacks_add_command("plugin1", command1); - PluginCommand *command2 = malloc(sizeof(PluginCommand)); + PluginCommand* command2 = malloc(sizeof(PluginCommand)); command2->command_name = strdup("command2"); callbacks_add_command("plugin1", command2); - PluginCommand *command3 = malloc(sizeof(PluginCommand)); + PluginCommand* command3 = malloc(sizeof(PluginCommand)); command3->command_name = strdup("command3"); callbacks_add_command("plugin2", command3); - GList *names = plugins_get_command_names(); + GList* names = plugins_get_command_names(); assert_true(g_list_length(names) == 3); gboolean foundCommand1 = FALSE; gboolean foundCommand2 = FALSE; gboolean foundCommand3 = FALSE; - GList *curr = names; + GList* curr = names; while (curr) { if (g_strcmp0(curr->data, "command1") == 0) { foundCommand1 = TRUE; -- cgit 1.4.1-2-gfad0