aboutsummaryrefslogtreecommitdiffstats
path: root/t/helper/test-hashmap.c
diff options
context:
space:
mode:
authorChristian Couder <christian.couder@gmail.com>2019-06-15 12:07:02 +0200
committerJunio C Hamano <gitster@pobox.com>2019-06-17 18:11:42 -0700
commita1100d2ceed75a9523981bfab607dedd2564ef8c (patch)
treed5a9a84ce7d5346219a8d4a9fbab3e835b5c7c12 /t/helper/test-hashmap.c
parent19cfa0e03316df26045c2f6d11ef860c2ca79a92 (diff)
downloadgit-a1100d2ceed75a9523981bfab607dedd2564ef8c.tar.gz
test-hashmap: remove 'hash' command
If hashes like strhash() are updated, for example to use a different hash algorithm, we should not have to be updating t0011 to change out the hashes. As long as hashmap can store and retrieve values, and that it performs well, we should not care what are the values of the hashes. Let's just focus on the externally visible behavior instead. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/helper/test-hashmap.c')
-rw-r--r--t/helper/test-hashmap.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/t/helper/test-hashmap.c b/t/helper/test-hashmap.c
index 23d2b172fe..aaf17b0ddf 100644
--- a/t/helper/test-hashmap.c
+++ b/t/helper/test-hashmap.c
@@ -173,14 +173,7 @@ int cmd__hashmap(int argc, const char **argv)
p2 = strtok(NULL, DELIM);
}
- if (!strcmp("hash", cmd) && p1) {
-
- /* print results of different hash functions */
- printf("%u %u %u %u\n",
- strhash(p1), memhash(p1, strlen(p1)),
- strihash(p1), memihash(p1, strlen(p1)));
-
- } else if (!strcmp("add", cmd) && p1 && p2) {
+ if (!strcmp("add", cmd) && p1 && p2) {
/* create entry with key = p1, value = p2 */
entry = alloc_test_entry(hash, p1, p2);