summaryrefslogtreecommitdiff
path: root/tests-clar/core/oid.c
blob: c89713955fc5a7c3dc8d6f3fea4d66ad9b96a557 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "clar_libgit2.h"

static git_oid id;
const char *str_oid = "ae90f12eea699729ed24555e40b9fd669da12a12";

void test_core_oid__initialize(void)
{
	cl_git_pass(git_oid_fromstr(&id, str_oid));
}

void test_core_oid__streq(void)
{
	cl_assert(git_oid_streq(&id, str_oid) == 0);
	cl_assert(git_oid_streq(&id, "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef") == -1);

	cl_assert(git_oid_streq(&id, "deadbeef") == -1);
	cl_assert(git_oid_streq(&id, "I'm not an oid.... :)") == -1);
}