git/t/helper/test-hashmap.c

#include "test-tool.h"
#include "git-compat-util.h"
#include "hashmap.h"
#include "strbuf.h"
#include "string-list.h"

struct test_entry
{};

static int test_entry_cmp(const void *cmp_data,
			  const struct hashmap_entry *eptr,
			  const struct hashmap_entry *entry_or_key,
			  const void *keydata)
{}

static struct test_entry *alloc_test_entry(unsigned int hash,
					   const char *key,
					   const char *value)
{}

#define HASH_METHOD_FNV
#define HASH_METHOD_I
#define HASH_METHOD_IDIV10
#define HASH_METHOD_0
#define HASH_METHOD_X2
#define TEST_SPARSE
#define TEST_ADD
#define TEST_SIZE

static unsigned int hash(unsigned int method, unsigned int i, const char *key)
{}

/*
 * Test performance of hashmap.[ch]
 * Usage: time echo "perfhashmap method rounds" | test-tool hashmap
 */
static void perf_hashmap(unsigned int method, unsigned int rounds)
{}

#define DELIM

/*
 * Read stdin line by line and print result of commands to stdout:
 *
 * perfhashmap method rounds -> test hashmap.[ch] performance
 */
int cmd__hashmap(int argc UNUSED, const char **argv UNUSED)
{}