diff options
| author | Mistivia <i@mistivia.com> | 2024-03-24 09:36:51 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2024-03-24 09:36:51 +0800 |
| commit | 1208bdd0fccc5f1e380053d8e0a7f4df6fe8f805 (patch) | |
| tree | a4fddb7211a2782b3934cf02d80ef6d1734ec1c2 /tests/test_mmhash.c | |
git init
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; +} |
