summaryrefslogtreecommitdiff
path: root/tests/t01-rawobj.c
diff options
context:
space:
mode:
authorLambert CLARA <lambert.clara@yahoo.fr>2011-08-04 22:49:39 +0200
committerLambert CLARA <lambert.clara@yahoo.fr>2011-08-04 22:49:39 +0200
commit9d76b934f196ee36d39c3ae40e77b618156bc16a (patch)
tree4d82261b496190bf9f7b0a71e9dc6d5c3d06118d /tests/t01-rawobj.c
parent31bf5f38575fdffb27326a2b2bae88d096bb0071 (diff)
downloadlibgit2-9d76b934f196ee36d39c3ae40e77b618156bc16a.tar.gz
Fix wrong test in t04-commit
Replace all must_pass(strcmp()) by must_be_true(strcmp()==0)
Diffstat (limited to 'tests/t01-rawobj.c')
-rw-r--r--tests/t01-rawobj.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/t01-rawobj.c b/tests/t01-rawobj.c
index d8cc63bfd..255208532 100644
--- a/tests/t01-rawobj.c
+++ b/tests/t01-rawobj.c
@@ -204,7 +204,7 @@ BEGIN_TEST(oid11, "compare formated oids")
/* Format produced the right result */
out[GIT_OID_HEXSZ] = '\0';
- must_pass(strcmp(exp, out));
+ must_be_true(strcmp(exp, out) == 0);
END_TEST
BEGIN_TEST(oid12, "compare oids (allocate + format)")
@@ -216,7 +216,7 @@ BEGIN_TEST(oid12, "compare oids (allocate + format)")
out = git_oid_allocfmt(&in);
must_be_true(out);
- must_pass(strcmp(exp, out));
+ must_be_true(strcmp(exp, out) == 0);
free(out);
END_TEST
@@ -235,7 +235,7 @@ BEGIN_TEST(oid13, "compare oids (path format)")
/* Format produced the right result */
out[GIT_OID_HEXSZ + 1] = '\0';
- must_pass(strcmp(exp2, out));
+ must_be_true(strcmp(exp2, out) == 0);
END_TEST
BEGIN_TEST(oid14, "convert raw oid to string")
@@ -279,7 +279,7 @@ BEGIN_TEST(oid14, "convert raw oid to string")
/* returns out as hex formatted c-string */
str = git_oid_to_string(out, sizeof(out), &in);
must_be_true(str && str == out && *(str+GIT_OID_HEXSZ) == '\0');
- must_pass(strcmp(exp, out));
+ must_be_true(strcmp(exp, out) == 0);
END_TEST
BEGIN_TEST(oid15, "convert raw oid to string (big)")
@@ -299,7 +299,7 @@ BEGIN_TEST(oid15, "convert raw oid to string (big)")
/* returns big as hex formatted c-string */
str = git_oid_to_string(big, sizeof(big), &in);
must_be_true(str && str == big && *(str+GIT_OID_HEXSZ) == '\0');
- must_pass(strcmp(exp, big));
+ must_be_true(strcmp(exp, big) == 0);
/* check tail material is untouched */
must_be_true(str && str == big && *(str+GIT_OID_HEXSZ+1) == 'X');