Commit 8d2b31109d980462e1853bef3edf08ddecd094b2

Edward Thomson 2021-11-11T19:58:49

tests: include function declarations

diff --git a/tests/filter/custom_helpers.c b/tests/filter/custom_helpers.c
index f98f65c..95a9f97 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 166b4ee..339812b 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 943d0f5..70d5d36 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 22619a4..2ea41ee 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 80814ea..4cd92ca 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);