summaryrefslogtreecommitdiff
path: root/tests/libgit2/object/raw/fromstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libgit2/object/raw/fromstr.c')
-rw-r--r--tests/libgit2/object/raw/fromstr.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/libgit2/object/raw/fromstr.c b/tests/libgit2/object/raw/fromstr.c
index 8c11c105f..302d362d7 100644
--- a/tests/libgit2/object/raw/fromstr.c
+++ b/tests/libgit2/object/raw/fromstr.c
@@ -6,9 +6,9 @@
void test_object_raw_fromstr__fail_on_invalid_oid_string(void)
{
git_oid out;
- cl_git_fail(git_oid_fromstr(&out, ""));
- cl_git_fail(git_oid_fromstr(&out, "moo"));
- cl_git_fail(git_oid_fromstr(&out, "16a67770b7d8d72317c4b775213c23a8bd74f5ez"));
+ cl_git_fail(git_oid__fromstr(&out, "", GIT_OID_SHA1));
+ cl_git_fail(git_oid__fromstr(&out, "moo", GIT_OID_SHA1));
+ cl_git_fail(git_oid__fromstr(&out, "16a67770b7d8d72317c4b775213c23a8bd74f5ez", GIT_OID_SHA1));
}
void test_object_raw_fromstr__succeed_on_valid_oid_string(void)
@@ -21,10 +21,9 @@ void test_object_raw_fromstr__succeed_on_valid_oid_string(void)
0xa8, 0xbd, 0x74, 0xf5, 0xe0,
};
- cl_git_pass(git_oid_fromstr(&out, "16a67770b7d8d72317c4b775213c23a8bd74f5e0"));
- cl_git_pass(memcmp(out.id, exp, sizeof(out.id)));
-
- cl_git_pass(git_oid_fromstr(&out, "16A67770B7D8D72317C4b775213C23A8BD74F5E0"));
- cl_git_pass(memcmp(out.id, exp, sizeof(out.id)));
+ cl_git_pass(git_oid__fromstr(&out, "16a67770b7d8d72317c4b775213c23a8bd74f5e0", GIT_OID_SHA1));
+ cl_git_pass(memcmp(out.id, exp, GIT_OID_SHA1_SIZE));
+ cl_git_pass(git_oid__fromstr(&out, "16A67770B7D8D72317C4b775213C23A8BD74F5E0", GIT_OID_SHA1));
+ cl_git_pass(memcmp(out.id, exp, GIT_OID_SHA1_SIZE));
}