summaryrefslogtreecommitdiff
path: root/tests/test-ot-unix-utils.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2023-05-03 08:24:21 -0400
committerGitHub <noreply@github.com>2023-05-03 08:24:21 -0400
commit8a2993a9d01cc358e4c2d936ca132174aabdc714 (patch)
tree5402001ab710dadfd51ba3e9071b044016030e3e /tests/test-ot-unix-utils.c
parentdd70c9b78cc34ccc7e638eda4c2df1ddd8ee3add (diff)
parentc1044a02b28982ef6dd58af98b23a40482d26487 (diff)
downloadostree-8a2993a9d01cc358e4c2d936ca132174aabdc714.tar.gz
Merge pull request #2565 from cgwalters/clang-format
Add .clang-format file + tree-wide: Run `clang-format`
Diffstat (limited to 'tests/test-ot-unix-utils.c')
-rw-r--r--tests/test-ot-unix-utils.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/test-ot-unix-utils.c b/tests/test-ot-unix-utils.c
index 3f16b55d..853e877f 100644
--- a/tests/test-ot-unix-utils.c
+++ b/tests/test-ot-unix-utils.c
@@ -26,14 +26,14 @@
static void
test_ot_util_path_split_validate (void)
{
- const char *paths[] = {"foo/bar", "test", "foo/bar:", "a/b/c/d/e/f/g/h/i/l/m/n/o/p", NULL};
- int n_components[] = {2, 1, 2, 14, 0};
+ const char *paths[] = { "foo/bar", "test", "foo/bar:", "a/b/c/d/e/f/g/h/i/l/m/n/o/p", NULL };
+ int n_components[] = { 2, 1, 2, 14, 0 };
int i;
for (i = 0; paths[i]; i++)
{
GError *error = NULL;
- g_autoptr(GPtrArray) components = NULL;
- if (! ot_util_path_split_validate (paths[i], &components, &error))
+ g_autoptr (GPtrArray) components = NULL;
+ if (!ot_util_path_split_validate (paths[i], &components, &error))
{
int j;
g_assert_cmpint (components->len, ==, n_components[i]);
@@ -49,7 +49,7 @@ test_ot_util_path_split_validate (void)
static void
test_ot_util_filename_validate (void)
{
- g_autoptr(GError) error = NULL;
+ g_autoptr (GError) error = NULL;
/* Check for valid inputs. */
g_assert (ot_util_filename_validate ("valid", &error));
@@ -74,10 +74,11 @@ test_ot_util_filename_validate (void)
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_util_path_split_validate", test_ot_util_path_split_validate);
g_test_add_func ("/ot_util_filename_validate", test_ot_util_filename_validate);
- return g_test_run();
+ return g_test_run ();
}