aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper
diff options
context:
space:
mode:
authorLidong Yan <yldhome2d2@gmail.com>2025-07-12 17:35:13 +0800
committerJunio C Hamano <gitster@pobox.com>2025-07-14 10:03:02 -0700
commit4ca70179020b6a33bb5334302e7c79faf7eeaf52 (patch)
tree198f5b0b491055cf3595e3f49671f4e230d71d54 /t/helper
parentGit 2.50 (diff)
downloadgit-4ca70179020b6a33bb5334302e7c79faf7eeaf52.tar.gz
git-4ca70179020b6a33bb5334302e7c79faf7eeaf52.zip
bloom: add test helper to return murmur3 hash
In bloom.h, murmur3_seeded_v2() is exported for the use of test murmur3 hash. To clarify that murmur3_seeded_v2() is exported solely for testing purposes, a new helper function test_murmur3_seeded() was added instead of exporting murmur3_seeded_v2() directly. Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper')
-rw-r--r--t/helper/test-bloom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/helper/test-bloom.c b/t/helper/test-bloom.c
index 9aa2c5a592..6a24b6e0a6 100644
--- a/t/helper/test-bloom.c
+++ b/t/helper/test-bloom.c
@@ -61,13 +61,13 @@ int cmd__bloom(int argc, const char **argv)
uint32_t hashed;
if (argc < 3)
usage(bloom_usage);
- hashed = murmur3_seeded_v2(0, argv[2], strlen(argv[2]));
+ hashed = test_bloom_murmur3_seeded(0, argv[2], strlen(argv[2]), 2);
printf("Murmur3 Hash with seed=0:0x%08x\n", hashed);
}
if (!strcmp(argv[1], "get_murmur3_seven_highbit")) {
uint32_t hashed;
- hashed = murmur3_seeded_v2(0, "\x99\xaa\xbb\xcc\xdd\xee\xff", 7);
+ hashed = test_bloom_murmur3_seeded(0, "\x99\xaa\xbb\xcc\xdd\xee\xff", 7, 2);
printf("Murmur3 Hash with seed=0:0x%08x\n", hashed);
}