ldaphotos/sources/test/test.c

39 lines
575 B
C
Raw Normal View History

#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <criterion/criterion.h>
#include "main.h"
#include "manipulations.h"
#include "hasher.h"
#include "log.h"
#ifdef USE_LIBNOTIFY
#include <libnotify/notify.h>
#endif
Test(misc, passing){
cr_assert(1, "ya boi");
}
Test(misc, hashsomething){
if(!init_hasher()){
log(LOG_INFO, "Error encountered while initializing hasher");
}
begin_digest();
unsigned int len;
unsigned int aalen;
unsigned char * a = get_digest(&len);
char *aa = atohex(a, len, &aalen);
free(aa);
}