c-multihash/tests/c/test_error_string.c
Jakub Sztandera f91684f3c8 rework build structure for static link
make .gitignore exclude default
move tests into tests/c/
2016-07-26 10:57:05 +01:00

22 lines
402 B
C

#include <string.h>
#include "minunit.h"
#include "errors.h"
char error_buf[256];
static char *test_error_messages_exist(void) {
int i = -1;
for (; i > MH_E_LAST; i--) {
sprintf(error_buf, "error: code %d has no message", i);
mu_assert(error_buf, strlen(mh_error_string((mh_error) i)));
}
return 0;
}
static char *mu_all_tests(void) {
mu_run_test(test_error_messages_exist);
return 0;
}