diff options
author | Colin Walters <walters@verbum.org> | 2023-05-01 14:24:29 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2023-05-02 08:42:19 -0400 |
commit | 453aed97f688c606622562145fa1f7c10096ba14 (patch) | |
tree | 8059e3887665735f14b31a44402d5d578fcdd876 /tests/test-ot-tool-util.c | |
parent | a917813bb82b6ec7083da24064439b656971748d (diff) | |
download | ostree-453aed97f688c606622562145fa1f7c10096ba14.tar.gz |
tree-wide: Run clang-format
This is a one-time tree wide reformatting to ensure consistency
going forward.
Diffstat (limited to 'tests/test-ot-tool-util.c')
-rw-r--r-- | tests/test-ot-tool-util.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/tests/test-ot-tool-util.c b/tests/test-ot-tool-util.c index 6eb3520e..f189b3c6 100644 --- a/tests/test-ot-tool-util.c +++ b/tests/test-ot-tool-util.c @@ -20,11 +20,11 @@ #include "config.h" #include "libglnx.h" #include "ostree-mutable-tree.h" +#include "ot-tool-util.h" +#include <gio/gio.h> #include <glib.h> #include <stdlib.h> -#include <gio/gio.h> #include <string.h> -#include "ot-tool-util.h" /* @@ -42,7 +42,7 @@ ot_parse_keyvalue (const char *keyvalue, static void test_ot_parse_boolean (void) { - g_autoptr(GError) error = NULL; + g_autoptr (GError) error = NULL; gboolean out = FALSE; g_assert_true (ot_parse_boolean ("yes", &out, &error)); g_assert_true (out); @@ -79,20 +79,17 @@ test_ot_parse_boolean (void) static void test_ot_parse_keyvalue (void) { - g_autoptr(GError) error = NULL; - char *keyvalue[] = {"foo=bar", "a=", "b=1231231"}; - char *key[] = {"foo", "a", "b"}; - char *value[] = {"bar", "", "1231231"}; + g_autoptr (GError) error = NULL; + char *keyvalue[] = { "foo=bar", "a=", "b=1231231" }; + char *key[] = { "foo", "a", "b" }; + char *value[] = { "bar", "", "1231231" }; guint i; for (i = 0; i < G_N_ELEMENTS (keyvalue); i++) { g_autofree char *out_key = NULL; g_autofree char *out_value = NULL; - g_assert_true (ot_parse_keyvalue (keyvalue[i], - &out_key, - &out_value, - &error)); + g_assert_true (ot_parse_keyvalue (keyvalue[i], &out_key, &out_value, &error)); g_assert_cmpstr (out_key, ==, key[i]); g_assert_cmpstr (out_value, ==, value[i]); } @@ -100,19 +97,17 @@ test_ot_parse_keyvalue (void) { g_autofree char *out_key = NULL; g_autofree char *out_value = NULL; - g_assert_false (ot_parse_keyvalue ("blabla", - &out_key, - &out_value, - &error)); + g_assert_false (ot_parse_keyvalue ("blabla", &out_key, &out_value, &error)); g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED); g_clear_error (&error); } } -int main (int argc, char **argv) +int +main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); g_test_add_func ("/ot-tool-util/parse-boolean", test_ot_parse_boolean); g_test_add_func ("/ot-tool-util/parse-keyvalue", test_ot_parse_keyvalue); - return g_test_run(); + return g_test_run (); } |