9#define HASHMAP_MAGIC MOS_FOURCC('H', 'M', 'a', 'p')
183 if (
strcmp((
void *) key,
"quux") == 0)
MOSAPI hash_t __pure hashmap_hash_string(uintn key)
MOSAPI int __pure hashmap_compare_string(uintn key1, uintn key2)
#define hashmap_common_type_init(map, cap, type)
MOSAPI void * hashmap_get(hashmap_t *map, uintn key)
MOSAPI void * hashmap_put(hashmap_t *map, uintn key, void *value)
MOSAPI void hashmap_deinit(hashmap_t *map)
Deinitialize a hashmap.
MOSAPI void * hashmap_remove(hashmap_t *map, uintn key)
MOSAPI void hashmap_foreach(hashmap_t *map, hashmap_foreach_func_t func, void *data)
MOSAPI s32 strcmp(const char *str1, const char *str2)
hashmap_key_compare_t key_compare_func
hashmap_entry_t ** entries
#define MOS_TEST_CHECK(actual, expected)
#define MOS_TEST_CHECK_STRING(actual, expected)
#define MOS_TEST_CASE(_TestName)
static size_t test_hashmap_foreach_count
bool test_foreach_stop_at_quux(uintn key, void *value, void *data)
static void hashmap_foreach_function(mos_test_result_t *, bool *, bool *)
bool test_foreach_function(uintn key, void *value, void *data)
static void hashmap_put_multiple(mos_test_result_t *, bool *, bool *)
static void hashmap_init_simple_macro(mos_test_result_t *, bool *, bool *)
static void hashmap_put_single(mos_test_result_t *, bool *, bool *)
static void hashmap_put_overflow(mos_test_result_t *, bool *, bool *)
static void hashmap_remove_function(mos_test_result_t *, bool *, bool *)
static void hashmap_get_function(mos_test_result_t *, bool *, bool *)