summaryrefslogtreecommitdiff
path: root/tests-clar/refs/reflog/drop.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clar/refs/reflog/drop.c')
-rw-r--r--tests-clar/refs/reflog/drop.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests-clar/refs/reflog/drop.c b/tests-clar/refs/reflog/drop.c
index d805d1ee0..21cc847bf 100644
--- a/tests-clar/refs/reflog/drop.c
+++ b/tests-clar/refs/reflog/drop.c
@@ -4,15 +4,15 @@
static git_repository *g_repo;
static git_reflog *g_reflog;
-static unsigned int entrycount;
+static size_t entrycount;
void test_refs_reflog_drop__initialize(void)
{
git_reference *ref;
-
+
g_repo = cl_git_sandbox_init("testrepo.git");
cl_git_pass(git_reference_lookup(&ref, g_repo, "HEAD"));
-
+
git_reflog_read(&g_reflog, ref);
entrycount = git_reflog_entrycount(g_reflog);
@@ -31,7 +31,7 @@ void test_refs_reflog_drop__dropping_a_non_exisiting_entry_from_the_log_returns_
{
cl_assert_equal_i(GIT_ENOTFOUND, git_reflog_drop(g_reflog, entrycount, 0));
- cl_assert_equal_i(entrycount, git_reflog_entrycount(g_reflog));
+ cl_assert_equal_sz(entrycount, git_reflog_entrycount(g_reflog));
}
void test_refs_reflog_drop__can_drop_an_entry(void)
@@ -39,7 +39,7 @@ void test_refs_reflog_drop__can_drop_an_entry(void)
cl_assert(entrycount > 4);
cl_git_pass(git_reflog_drop(g_reflog, 2, 0));
- cl_assert_equal_i(entrycount - 1, git_reflog_entrycount(g_reflog));
+ cl_assert_equal_sz(entrycount - 1, git_reflog_entrycount(g_reflog));
}
void test_refs_reflog_drop__can_drop_an_entry_and_rewrite_the_log_history(void)
@@ -57,7 +57,7 @@ void test_refs_reflog_drop__can_drop_an_entry_and_rewrite_the_log_history(void)
cl_git_pass(git_reflog_drop(g_reflog, 1, 1));
- cl_assert_equal_i(entrycount - 1, git_reflog_entrycount(g_reflog));
+ cl_assert_equal_sz(entrycount - 1, git_reflog_entrycount(g_reflog));
after_current = git_reflog_entry_byindex(g_reflog, 0);
@@ -72,7 +72,7 @@ void test_refs_reflog_drop__can_drop_the_oldest_entry(void)
cl_assert(entrycount > 2);
cl_git_pass(git_reflog_drop(g_reflog, entrycount - 1, 0));
- cl_assert_equal_i(entrycount - 1, git_reflog_entrycount(g_reflog));
+ cl_assert_equal_sz(entrycount - 1, git_reflog_entrycount(g_reflog));
entry = git_reflog_entry_byindex(g_reflog, entrycount - 2);
cl_assert(git_oid_streq(&entry->oid_old, GIT_OID_HEX_ZERO) != 0);
@@ -85,7 +85,7 @@ void test_refs_reflog_drop__can_drop_the_oldest_entry_and_rewrite_the_log_histor
cl_assert(entrycount > 2);
cl_git_pass(git_reflog_drop(g_reflog, entrycount - 1, 1));
- cl_assert_equal_i(entrycount - 1, git_reflog_entrycount(g_reflog));
+ cl_assert_equal_sz(entrycount - 1, git_reflog_entrycount(g_reflog));
entry = git_reflog_entry_byindex(g_reflog, entrycount - 2);
cl_assert(git_oid_streq(&entry->oid_old, GIT_OID_HEX_ZERO) == 0);
@@ -101,7 +101,7 @@ void test_refs_reflog_drop__can_drop_all_the_entries(void)
cl_git_pass(git_reflog_drop(g_reflog, 0, 1));
- cl_assert_equal_i(0, git_reflog_entrycount(g_reflog));
+ cl_assert_equal_i(0, (int)git_reflog_entrycount(g_reflog));
}
void test_refs_reflog_drop__can_persist_deletion_on_disk(void)
@@ -112,7 +112,7 @@ void test_refs_reflog_drop__can_persist_deletion_on_disk(void)
cl_git_pass(git_reference_lookup(&ref, g_repo, g_reflog->ref_name));
cl_git_pass(git_reflog_drop(g_reflog, 0, 1));
- cl_assert_equal_i(entrycount - 1, git_reflog_entrycount(g_reflog));
+ cl_assert_equal_sz(entrycount - 1, git_reflog_entrycount(g_reflog));
cl_git_pass(git_reflog_write(g_reflog));
git_reflog_free(g_reflog);
@@ -120,5 +120,5 @@ void test_refs_reflog_drop__can_persist_deletion_on_disk(void)
git_reflog_read(&g_reflog, ref);
git_reference_free(ref);
- cl_assert_equal_i(entrycount - 1, git_reflog_entrycount(g_reflog));
+ cl_assert_equal_sz(entrycount - 1, git_reflog_entrycount(g_reflog));
}