summaryrefslogtreecommitdiff
path: root/tests/path
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-11 13:28:08 -0500
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-11 17:31:43 -0500
commitca14942e19788bd01334af64554c3095f3ff0d4a (patch)
tree9a05a7224d87e45b3ba2ac88501c66e4f0149ab9 /tests/path
parent3f024b6d5439eda83d8bebc197db062c4d6bdfeb (diff)
downloadlibgit2-ca14942e19788bd01334af64554c3095f3ff0d4a.tar.gz
tests: declare functions statically where appropriate
Diffstat (limited to 'tests/path')
-rw-r--r--tests/path/dotgit.c2
-rw-r--r--tests/path/win32.c16
2 files changed, 5 insertions, 13 deletions
diff --git a/tests/path/dotgit.c b/tests/path/dotgit.c
index 9ac68b0ff..855145f42 100644
--- a/tests/path/dotgit.c
+++ b/tests/path/dotgit.c
@@ -120,7 +120,7 @@ void test_path_dotgit__dotgit_modules_symlink(void)
cl_assert_equal_b(false, git_path_is_valid(NULL, ".gitmodules . .::$DATA", S_IFLNK, GIT_PATH_REJECT_DOT_GIT_NTFS));
}
-void test_core_path__git_fs_path_is_file(void)
+void test_path_dotgit__git_fs_path_is_file(void)
{
cl_git_fail(git_path_is_gitfile("blob", 4, -1, GIT_PATH_FS_HFS));
cl_git_pass(git_path_is_gitfile("blob", 4, GIT_PATH_GITFILE_GITIGNORE, GIT_PATH_FS_HFS));
diff --git a/tests/path/win32.c b/tests/path/win32.c
index 46b5c9f70..ff166395d 100644
--- a/tests/path/win32.c
+++ b/tests/path/win32.c
@@ -6,35 +6,27 @@
#include "win32/path_w32.h"
#endif
-void test_utf8_to_utf16(const char *utf8_in, const wchar_t *utf16_expected)
-{
#ifdef GIT_WIN32
+static void test_utf8_to_utf16(const char *utf8_in, const wchar_t *utf16_expected)
+{
git_win32_path path_utf16;
int path_utf16len;
cl_assert((path_utf16len = git_win32_path_from_utf8(path_utf16, utf8_in)) >= 0);
cl_assert_equal_wcs(utf16_expected, path_utf16);
cl_assert_equal_i(wcslen(utf16_expected), path_utf16len);
-#else
- GIT_UNUSED(utf8_in);
- GIT_UNUSED(utf16_expected);
-#endif
}
-void test_utf8_to_utf16_relative(const char* utf8_in, const wchar_t* utf16_expected)
+static void test_utf8_to_utf16_relative(const char* utf8_in, const wchar_t* utf16_expected)
{
-#ifdef GIT_WIN32
git_win32_path path_utf16;
int path_utf16len;
cl_assert((path_utf16len = git_win32_path_relative_from_utf8(path_utf16, utf8_in)) >= 0);
cl_assert_equal_wcs(utf16_expected, path_utf16);
cl_assert_equal_i(wcslen(utf16_expected), path_utf16len);
-#else
- GIT_UNUSED(utf8_in);
- GIT_UNUSED(utf16_expected);
-#endif
}
+#endif
void test_path_win32__utf8_to_utf16(void)
{