diff options
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -89,6 +89,14 @@ run_tests(const char *name, enum libhashsum_algorithm algorithm, size_t hash_siz fprintf(stderr, "libhashsum_init_hasher returned unexpected value in .algorithm\n"); return 2; } + if (!hasher.algorithm_string) { + fprintf(stderr, "libhashsum_init_hasher returned NULL pointer in .algorithm_string\n"); + return 2; + } + if (strcmp(hasher.algorithm_string, name)) { + fprintf(stderr, "libhashsum_init_hasher returned unexpected value in .algorithm_string\n"); + return 2; + } if (hasher.hash_size != hash_size) { fprintf(stderr, "libhashsum_init_hasher returned unexpected value in .hash_size\n"); return 2; |