simple hashmap implementation

This commit is contained in:
2026-07-16 23:14:42 +02:00
parent c541496db5
commit 709d977436
5 changed files with 197 additions and 11 deletions
+13
View File
@@ -0,0 +1,13 @@
import "@std/mem"
import "@std/testing"
handles_put_and_get test {
map StringHashMap(u32) = init(mem.c_allocator)
defer deinit(&map)
try put(&map, "key", 42)
value :: get(&map, "key")
try testing.expect_type(?u32, value)
try testing.expect_equal(42, value?)
}