summaryrefslogtreecommitdiff
path: root/tests-clay
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clay')
-rw-r--r--tests-clay/clay_main.c104
-rw-r--r--tests-clay/core/dirent.c46
-rw-r--r--tests-clay/core/vector.c2
3 files changed, 76 insertions, 76 deletions
diff --git a/tests-clay/clay_main.c b/tests-clay/clay_main.c
index 90c33bd5d..b536b6a97 100644
--- a/tests-clay/clay_main.c
+++ b/tests-clay/clay_main.c
@@ -139,7 +139,7 @@ clay_run_test(
static void
clay_print_error(int num, const struct clay_error *error)
{
- clay_print(" %d) Failure:\n", num);
+ clay_print(" %d) Failure:\n", num);
clay_print("%s::%s (%s) [%s:%d] [-t%d]\n",
error->suite,
@@ -149,10 +149,10 @@ clay_print_error(int num, const struct clay_error *error)
error->line_number,
error->test_number);
- clay_print(" %s\n", error->error_msg);
+ clay_print(" %s\n", error->error_msg);
if (error->description != NULL)
- clay_print(" %s\n", error->description);
+ clay_print(" %s\n", error->description);
clay_print("\n");
}
@@ -204,8 +204,8 @@ clay_usage(const char *arg)
{
printf("Usage: %s [options]\n\n", arg);
printf("Options:\n");
- printf(" -tXX\t\tRun only the test number XX\n");
- printf(" -sXX\t\tRun only the suite number XX\n");
+ printf(" -tXX\t\tRun only the test number XX\n");
+ printf(" -sXX\t\tRun only the suite number XX\n");
exit(-1);
}
@@ -691,7 +691,7 @@ extern void test_status_worktree__whole_repository(void);
extern void test_status_worktree__empty_repository(void);
static const struct clay_func _all_callbacks[] = {
- {"dont_traverse_dot", &test_core_dirent__dont_traverse_dot, 0},
+ {"dont_traverse_dot", &test_core_dirent__dont_traverse_dot, 0},
{"traverse_subfolder", &test_core_dirent__traverse_subfolder, 0},
{"traverse_slash_terminated_folder", &test_core_dirent__traverse_slash_terminated_folder, 0},
{"dont_traverse_empty_folders", &test_core_dirent__dont_traverse_empty_folders, 0},
@@ -717,63 +717,63 @@ static const struct clay_func _all_callbacks[] = {
};
static const struct clay_suite _all_suites[] = {
- {
- "core::dirent",
- {NULL, NULL, 0},
- {NULL, NULL, 0},
- &_all_callbacks[0], 5
- },
{
- "core::filebuf",
- {NULL, NULL, 0},
- {NULL, NULL, 0},
- &_all_callbacks[5], 3
- },
+ "core::dirent",
+ {NULL, NULL, 0},
+ {NULL, NULL, 0},
+ &_all_callbacks[0], 5
+ },
{
- "core::path",
- {NULL, NULL, 0},
- {NULL, NULL, 0},
- &_all_callbacks[8], 5
- },
+ "core::filebuf",
+ {NULL, NULL, 0},
+ {NULL, NULL, 0},
+ &_all_callbacks[5], 3
+ },
{
- "core::rmdir",
- {"initialize", &test_core_rmdir__initialize, 3},
- {NULL, NULL, 0},
- &_all_callbacks[13], 2
- },
+ "core::path",
+ {NULL, NULL, 0},
+ {NULL, NULL, 0},
+ &_all_callbacks[8], 5
+ },
{
- "core::string",
- {NULL, NULL, 0},
- {NULL, NULL, 0},
- &_all_callbacks[15], 2
- },
+ "core::rmdir",
+ {"initialize", &test_core_rmdir__initialize, 3},
+ {NULL, NULL, 0},
+ &_all_callbacks[13], 2
+ },
{
- "core::vector",
- {NULL, NULL, 0},
- {NULL, NULL, 0},
- &_all_callbacks[17], 3
- },
+ "core::string",
+ {NULL, NULL, 0},
+ {NULL, NULL, 0},
+ &_all_callbacks[15], 2
+ },
{
- "status::single",
- {NULL, NULL, 0},
- {NULL, NULL, 0},
- &_all_callbacks[20], 1
- },
+ "core::vector",
+ {NULL, NULL, 0},
+ {NULL, NULL, 0},
+ &_all_callbacks[17], 3
+ },
{
- "status::worktree",
- {"initialize", &test_status_worktree__initialize, 7},
- {"cleanup", &test_status_worktree__cleanup, 7},
- &_all_callbacks[21], 2
- }
+ "status::single",
+ {NULL, NULL, 0},
+ {NULL, NULL, 0},
+ &_all_callbacks[20], 1
+ },
+ {
+ "status::worktree",
+ {"initialize", &test_status_worktree__initialize, 7},
+ {"cleanup", &test_status_worktree__cleanup, 7},
+ &_all_callbacks[21], 2
+ }
};
static const char _suites_str[] = "core::dirent, core::filebuf, core::path, core::rmdir, core::string, core::vector, status::single, status::worktree";
int _CC main(int argc, char *argv[])
{
- return clay_test(
- argc, argv, _suites_str,
- _all_callbacks, 23,
- _all_suites, 8
- );
+ return clay_test(
+ argc, argv, _suites_str,
+ _all_callbacks, 23,
+ _all_suites, 8
+ );
}
diff --git a/tests-clay/core/dirent.c b/tests-clay/core/dirent.c
index ed51890e6..73f571595 100644
--- a/tests-clay/core/dirent.c
+++ b/tests-clay/core/dirent.c
@@ -2,13 +2,13 @@
#include "fileops.h"
typedef struct name_data {
- int count; /* return count */
- char *name; /* filename */
+ int count; /* return count */
+ char *name; /* filename */
} name_data;
typedef struct walk_data {
- char *sub; /* sub-directory name */
- name_data *names; /* name state data */
+ char *sub; /* sub-directory name */
+ name_data *names; /* name state data */
} walk_data;
@@ -112,9 +112,9 @@ void test_core_dirent__dont_traverse_dot(void)
setup(&dot);
cl_git_pass(git_futils_direach(path_buffer,
- sizeof(path_buffer),
- one_entry,
- &dot));
+ sizeof(path_buffer),
+ one_entry,
+ &dot));
check_counts(&dot);
}
@@ -138,9 +138,9 @@ void test_core_dirent__traverse_subfolder(void)
setup(&sub);
cl_git_pass(git_futils_direach(path_buffer,
- sizeof(path_buffer),
- one_entry,
- &sub));
+ sizeof(path_buffer),
+ one_entry,
+ &sub));
check_counts(&sub);
}
@@ -158,9 +158,9 @@ void test_core_dirent__traverse_slash_terminated_folder(void)
setup(&sub_slash);
cl_git_pass(git_futils_direach(path_buffer,
- sizeof(path_buffer),
- one_entry,
- &sub_slash));
+ sizeof(path_buffer),
+ one_entry,
+ &sub_slash));
check_counts(&sub_slash);
}
@@ -181,17 +181,17 @@ void test_core_dirent__dont_traverse_empty_folders(void)
setup(&empty);
cl_git_pass(git_futils_direach(path_buffer,
- sizeof(path_buffer),
- one_entry,
- &empty));
+ sizeof(path_buffer),
+ one_entry,
+ &empty));
check_counts(&empty);
/* make sure callback not called */
cl_git_pass(git_futils_direach(path_buffer,
- sizeof(path_buffer),
- dont_call_me,
- &empty));
+ sizeof(path_buffer),
+ dont_call_me,
+ &empty));
}
static name_data odd_names[] = {
@@ -199,7 +199,7 @@ static name_data odd_names[] = {
{ 0, "odd/..c" },
/* the following don't work on cygwin/win32 */
/* { 0, "odd/.b." }, */
- /* { 0, "odd/..d.." }, */
+ /* { 0, "odd/..d.." }, */
{ 0, NULL }
};
static walk_data odd = {
@@ -214,9 +214,9 @@ void test_core_dirent__traverse_weird_filenames(void)
setup(&odd);
cl_git_pass(git_futils_direach(path_buffer,
- sizeof(path_buffer),
- one_entry,
- &odd));
+ sizeof(path_buffer),
+ one_entry,
+ &odd));
check_counts(&odd);
}
diff --git a/tests-clay/core/vector.c b/tests-clay/core/vector.c
index ba9d18857..44e6d873d 100644
--- a/tests-clay/core/vector.c
+++ b/tests-clay/core/vector.c
@@ -24,7 +24,7 @@ void test_core_vector__1(void)
git_vector_insert(&x, (void*) 0xdef);
git_vector_insert(&x, (void*) 0x123);
- git_vector_remove(&x, 0); // used to read past array bounds.
+ git_vector_remove(&x, 0); // used to read past array bounds.
git_vector_free(&x);
}