summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-11-11 19:58:49 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2021-11-11 17:31:43 -0500
commit8d2b31109d980462e1853bef3edf08ddecd094b2 (patch)
treea80e6e79eb5ef936d82c577335dde3b8a5d6fd44
parentbfdc09714f07d4007c94dee6a9567cee6be9f290 (diff)
downloadlibgit2-8d2b31109d980462e1853bef3edf08ddecd094b2.tar.gz
tests: include function declarations
-rw-r--r--tests/filter/custom_helpers.c1
-rw-r--r--tests/merge/merge_helpers.h4
-rw-r--r--tests/refs/ref_helpers.c1
-rw-r--r--tests/refs/reflog/reflog_helpers.c3
-rw-r--r--tests/refs/reflog/reflog_helpers.h8
5 files changed, 13 insertions, 4 deletions
diff --git a/tests/filter/custom_helpers.c b/tests/filter/custom_helpers.c
index f98f65c22..95a9f978e 100644
--- a/tests/filter/custom_helpers.c
+++ b/tests/filter/custom_helpers.c
@@ -2,6 +2,7 @@
#include "posix.h"
#include "filter.h"
#include "git2/sys/filter.h"
+#include "custom_helpers.h"
#define VERY_SECURE_ENCRYPTION(b) ((b) ^ 0xff)
diff --git a/tests/merge/merge_helpers.h b/tests/merge/merge_helpers.h
index 166b4eefd..339812ba5 100644
--- a/tests/merge/merge_helpers.h
+++ b/tests/merge/merge_helpers.h
@@ -65,4 +65,8 @@ int merge_test_reuc(git_index *index, const struct merge_reuc_entry expected[],
int merge_test_workdir(git_repository *repo, const struct merge_index_entry expected[], size_t expected_len);
+void merge__dump_names(git_index *index);
+void merge__dump_index_entries(git_vector *index_entries);
+void merge__dump_reuc(git_index *index);
+
#endif
diff --git a/tests/refs/ref_helpers.c b/tests/refs/ref_helpers.c
index 943d0f551..70d5d36d5 100644
--- a/tests/refs/ref_helpers.c
+++ b/tests/refs/ref_helpers.c
@@ -3,6 +3,7 @@
#include "common.h"
#include "util.h"
#include "path.h"
+#include "ref_helpers.h"
int reference_is_packed(git_reference *ref)
{
diff --git a/tests/refs/reflog/reflog_helpers.c b/tests/refs/reflog/reflog_helpers.c
index 22619a4e3..2ea41ee06 100644
--- a/tests/refs/reflog/reflog_helpers.c
+++ b/tests/refs/reflog/reflog_helpers.c
@@ -2,8 +2,9 @@
#include "repository.h"
#include "reflog.h"
+#include "reflog_helpers.h"
-static int reflog_entry_tostr(git_str *out, const git_reflog_entry *entry)
+int reflog_entry_tostr(git_str *out, const git_reflog_entry *entry)
{
char old_oid[GIT_OID_HEXSZ], new_oid[GIT_OID_HEXSZ];
diff --git a/tests/refs/reflog/reflog_helpers.h b/tests/refs/reflog/reflog_helpers.h
index 80814ea28..4cd92cadc 100644
--- a/tests/refs/reflog/reflog_helpers.h
+++ b/tests/refs/reflog/reflog_helpers.h
@@ -1,10 +1,12 @@
size_t reflog_entrycount(git_repository *repo, const char *name);
#define cl_reflog_check_entry(repo, reflog, idx, old_spec, new_spec, email, message) \
- cl_reflog_check_entry_(repo, reflog, idx, old_spec, new_spec, email, message, __FILE__, __LINE__)
+ cl_reflog_check_entry_(repo, reflog, idx, old_spec, new_spec, email, message, __FILE__, __FUNCTION__, __LINE__)
void cl_reflog_check_entry_(git_repository *repo, const char *reflog, size_t idx,
- const char *old_spec, const char *new_spec,
- const char *email, const char *message, const char *file, int line);
+ const char *old_spec, const char *new_spec,
+ const char *email, const char *message,
+ const char *file, const char *func, int line);
void reflog_print(git_repository *repo, const char *reflog_name);
+int reflog_entry_tostr(git_str *out, const git_reflog_entry *entry);