Added more tests
Run tests / Run tests (push) Failing after 6s

This commit is contained in:
2026-05-03 20:21:33 +03:00
parent 96131f8188
commit 81a5b4a3c8
7 changed files with 105 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
tests = [
'seed_high_bits',
]
foreach t : tests
exec = executable(t, t+'.c', include_directories: headers_include, c_args: evh_c_args)
test(t, exec, suite: 'hash')
endforeach
+22
View File
@@ -0,0 +1,22 @@
#define EV_HASH_IMPLEMENTATION
#include "ev_macros.h"
#include "ev_hash.h"
#include <assert.h>
#include <string.h>
int main(void)
{
const char *data = "same input";
u64 low_seed = 1;
u64 high_seed = (1ull << 32) | 1ull;
u64 low_hash = ev_hash_murmur3(data, (u32)strlen(data), low_seed);
u64 high_hash = ev_hash_murmur3(data, (u32)strlen(data), high_seed);
assert(low_seed != high_seed);
assert(low_hash != high_hash);
return 0;
}