1 /* 2 * Copyright (c) 2022 Meta 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <zephyr/ztest.h> 8 #include <zephyr/sys/hash_map.h> 9 10 #include "_main.h" 11 ZTEST(hash_map,test_size)12ZTEST(hash_map, test_size) 13 { 14 zassert_equal(0, sys_hashmap_size(&map)); 15 16 zassume_equal(1, sys_hashmap_insert(&map, 1, 1, NULL)); 17 zassert_equal(1, sys_hashmap_size(&map)); 18 19 zassume_equal(1, sys_hashmap_insert(&map, 2, 2, NULL)); 20 zassert_equal(2, sys_hashmap_size(&map)); 21 } 22