diff options
Diffstat (limited to 'tests-clar/index')
| -rw-r--r-- | tests-clar/index/conflicts.c | 4 | ||||
| -rw-r--r-- | tests-clar/index/reuc.c | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/tests-clar/index/conflicts.c b/tests-clar/index/conflicts.c index 4b8a0cffd..7eee496de 100644 --- a/tests-clar/index/conflicts.c +++ b/tests-clar/index/conflicts.c @@ -104,7 +104,7 @@ void test_index_conflicts__get(void) cl_git_pass(git_index_conflict_get(&conflict_entry[0], &conflict_entry[1], &conflict_entry[2], repo_index, "conflicts-one.txt")); - cl_assert(strcmp(conflict_entry[0]->path, "conflicts-one.txt") == 0); + cl_assert_equal_s("conflicts-one.txt", conflict_entry[0]->path); git_oid_fromstr(&oid, CONFLICTS_ONE_ANCESTOR_OID); cl_assert(git_oid_cmp(&conflict_entry[0]->oid, &oid) == 0); @@ -118,7 +118,7 @@ void test_index_conflicts__get(void) cl_git_pass(git_index_conflict_get(&conflict_entry[0], &conflict_entry[1], &conflict_entry[2], repo_index, "conflicts-two.txt")); - cl_assert(strcmp(conflict_entry[0]->path, "conflicts-two.txt") == 0); + cl_assert_equal_s("conflicts-two.txt", conflict_entry[0]->path); git_oid_fromstr(&oid, CONFLICTS_TWO_ANCESTOR_OID); cl_assert(git_oid_cmp(&conflict_entry[0]->oid, &oid) == 0); diff --git a/tests-clar/index/reuc.c b/tests-clar/index/reuc.c index 2062b51d3..80c295eaa 100644 --- a/tests-clar/index/reuc.c +++ b/tests-clar/index/reuc.c @@ -47,7 +47,7 @@ void test_index_reuc__add(void) cl_assert(reuc = git_index_reuc_get_bypath(repo_index, "newfile.txt")); - cl_assert(strcmp(reuc->path, "newfile.txt") == 0); + cl_assert_equal_s("newfile.txt", reuc->path); cl_assert(reuc->mode[0] == 0100644); cl_assert(reuc->mode[1] == 0100644); cl_assert(reuc->mode[2] == 0100644); @@ -72,7 +72,7 @@ void test_index_reuc__add_no_ancestor(void) cl_assert(reuc = git_index_reuc_get_bypath(repo_index, "newfile.txt")); - cl_assert(strcmp(reuc->path, "newfile.txt") == 0); + cl_assert_equal_s("newfile.txt", reuc->path); cl_assert(reuc->mode[0] == 0); cl_assert(reuc->mode[1] == 0100644); cl_assert(reuc->mode[2] == 0100644); @@ -90,7 +90,7 @@ void test_index_reuc__read_bypath(void) cl_assert(reuc = git_index_reuc_get_bypath(repo_index, "two.txt")); - cl_assert(strcmp(reuc->path, "two.txt") == 0); + cl_assert_equal_s("two.txt", reuc->path); cl_assert(reuc->mode[0] == 0100644); cl_assert(reuc->mode[1] == 0100644); cl_assert(reuc->mode[2] == 0100644); @@ -103,7 +103,7 @@ void test_index_reuc__read_bypath(void) cl_assert(reuc = git_index_reuc_get_bypath(repo_index, "one.txt")); - cl_assert(strcmp(reuc->path, "one.txt") == 0); + cl_assert_equal_s("one.txt", reuc->path); cl_assert(reuc->mode[0] == 0100644); cl_assert(reuc->mode[1] == 0100644); cl_assert(reuc->mode[2] == 0100644); @@ -135,7 +135,7 @@ void test_index_reuc__ignore_case(void) cl_assert(reuc = git_index_reuc_get_bypath(repo_index, "TWO.txt")); - cl_assert(strcmp(reuc->path, "two.txt") == 0); + cl_assert_equal_s("two.txt", reuc->path); cl_assert(reuc->mode[0] == 0100644); cl_assert(reuc->mode[1] == 0100644); cl_assert(reuc->mode[2] == 0100644); @@ -156,7 +156,7 @@ void test_index_reuc__read_byindex(void) cl_assert(reuc = git_index_reuc_get_byindex(repo_index, 0)); - cl_assert(strcmp(reuc->path, "one.txt") == 0); + cl_assert_equal_s("one.txt", reuc->path); cl_assert(reuc->mode[0] == 0100644); cl_assert(reuc->mode[1] == 0100644); cl_assert(reuc->mode[2] == 0100644); @@ -169,7 +169,7 @@ void test_index_reuc__read_byindex(void) cl_assert(reuc = git_index_reuc_get_byindex(repo_index, 1)); - cl_assert(strcmp(reuc->path, "two.txt") == 0); + cl_assert_equal_s("two.txt", reuc->path); cl_assert(reuc->mode[0] == 0100644); cl_assert(reuc->mode[1] == 0100644); cl_assert(reuc->mode[2] == 0100644); @@ -212,7 +212,7 @@ void test_index_reuc__updates_existing(void) cl_assert(reuc = git_index_reuc_get_byindex(repo_index, 0)); - cl_assert(strcmp(reuc->path, "TWO.txt") == 0); + cl_assert_equal_s("TWO.txt", reuc->path); git_oid_fromstr(&oid, TWO_OUR_OID); cl_assert(git_oid_cmp(&reuc->oid[0], &oid) == 0); git_oid_fromstr(&oid, TWO_THEIR_OID); @@ -235,7 +235,7 @@ void test_index_reuc__remove(void) cl_assert(reuc = git_index_reuc_get_byindex(repo_index, 0)); - cl_assert(strcmp(reuc->path, "two.txt") == 0); + cl_assert_equal_s("two.txt", reuc->path); cl_assert(reuc->mode[0] == 0100644); cl_assert(reuc->mode[1] == 0100644); cl_assert(reuc->mode[2] == 0100644); @@ -280,9 +280,9 @@ void test_index_reuc__write(void) /* ensure sort order was round-tripped correct */ cl_assert(reuc = git_index_reuc_get_byindex(repo_index, 0)); - cl_assert(strcmp(reuc->path, "one.txt") == 0); + cl_assert_equal_s("one.txt", reuc->path); cl_assert(reuc = git_index_reuc_get_byindex(repo_index, 1)); - cl_assert(strcmp(reuc->path, "two.txt") == 0); + cl_assert_equal_s("two.txt", reuc->path); } |
