diff options
Diffstat (limited to 'tests/test_mmhash.c')
| -rw-r--r-- | tests/test_mmhash.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_mmhash.c b/tests/test_mmhash.c new file mode 100644 index 0000000..3a9895c --- /dev/null +++ b/tests/test_mmhash.c @@ -0,0 +1,15 @@ +#include <assert.h> +#include <stdio.h> +#include <string.h> + +#include "mmhash.h" + +int main() { + printf("[TEST] hash\n"); + char buf[] = "hello, world\n"; + uint64_t hash0 = mmhash(buf, strlen(buf), 0); + uint64_t hash1 = mmhash(buf, 3, 0); + assert(hash0 != hash1); + printf("[PASS] hash\n"); + return 0; +} |
