summaryrefslogtreecommitdiff
path: root/tests-clay/object
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-01-04 22:40:59 +0100
committerVicent Martí <tanoku@gmail.com>2012-01-04 22:43:11 +0100
commitf2114d0a35b95efef294f7527dfd64fbef61d993 (patch)
treeccb5ed2313c8d660cefb3730cd9ca279361ff927 /tests-clay/object
parentb0df89d90b4c2aee6e7083031a93667ff9c85ab3 (diff)
parente2580375dc76f46dce9963225449fcc872e86b0b (diff)
downloadlibgit2-f2114d0a35b95efef294f7527dfd64fbef61d993.tar.gz
Merge remote-tracking branch 'nulltoken/topix/path_fromurl' into development
Conflicts: tests-clay/clay.h tests-clay/clay_main.c
Diffstat (limited to 'tests-clay/object')
-rw-r--r--tests-clay/object/raw/chars.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/tests-clay/object/raw/chars.c b/tests-clay/object/raw/chars.c
index eba352b40..83bcbeb79 100644
--- a/tests-clay/object/raw/chars.c
+++ b/tests-clay/object/raw/chars.c
@@ -3,17 +3,6 @@
#include "odb.h"
-static int from_hex(unsigned int i)
-{
- if (i >= '0' && i <= '9')
- return i - '0';
- if (i >= 'a' && i <= 'f')
- return 10 + (i - 'a');
- if (i >= 'A' && i <= 'F')
- return 10 + (i - 'A');
- return -1;
-}
-
void test_object_raw_chars__find_invalid_chars_in_oid(void)
{
git_oid out;
@@ -28,8 +17,8 @@ void test_object_raw_chars__find_invalid_chars_in_oid(void)
for (i = 0; i < 256; i++) {
in[38] = (char)i;
- if (from_hex(i) >= 0) {
- exp[19] = (unsigned char)(from_hex(i) << 4);
+ if (git__fromhex(i) >= 0) {
+ exp[19] = (unsigned char)(git__fromhex(i) << 4);
cl_git_pass(git_oid_fromstr(&out, in));
cl_assert(memcmp(out.id, exp, sizeof(out.id)) == 0);
} else {