15 lines
389 B
C
15 lines
389 B
C
|
#include "haggis_private.h"
|
||
|
#include <assert.h>
|
||
|
#include <stdio.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main() {
|
||
|
haggis_file hf;
|
||
|
char *f = "check_header.c";
|
||
|
const u8 buf[16] = { 127, 161, 170, 134, 33, 218, 100, 29, 250, 255, 15, 125, 109, 5, 216, 9 };
|
||
|
|
||
|
assert(haggis_file_init(f, &hf, md5) == 0);
|
||
|
assert(hf.cksum.tag == md5);
|
||
|
assert(memcmp(buf, hf.cksum.sum.md5, 16) == 0);
|
||
|
}
|