]> git.proxmox.com Git - libgit2.git/blob - tests/delta/apply.c
New upstream version 1.4.3+dfsg.1
[libgit2.git] / tests / delta / apply.c
1 #include "clar_libgit2.h"
2
3 #include "delta.h"
4
5 void test_delta_apply__read_at_off(void)
6 {
7 unsigned char base[16] = { 0 }, delta[] = { 0x10, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x00, 0x00 };
8 void *out;
9 size_t outlen;
10
11 cl_git_fail(git_delta_apply(&out, &outlen, base, sizeof(base), delta, sizeof(delta)));
12 }
13
14 void test_delta_apply__read_after_limit(void)
15 {
16 unsigned char base[16] = { 0 }, delta[] = { 0x10, 0x70, 0xff };
17 void *out;
18 size_t outlen;
19
20 cl_git_fail(git_delta_apply(&out, &outlen, base, sizeof(base), delta, sizeof(delta)));
21 }