#pragma once #include #include #include #include "test.hpp" extern "C" { #include "impls/dbuf_impl.h" #include "guf_alloc_libc.h" } struct DictSvToIntTest : public Test { DictSvToIntTest(const std::string& nm) : Test(nm) { allocator_ctx.zero_init = false; guf_alloc_tracker_init(&allocator_ctx.tracker, 3, "DictSvToIntTest_allocator", NULL, NULL); guf_libc_allocator_init(&allocator, &allocator_ctx); }; void run() override; private: guf_allocator allocator; guf_libc_alloc_ctx allocator_ctx; dbuf_char text_buf {}; std::vector text_vec {}; bool load_file(const char *fname); void free_file(); void insert_lookup(std::optional inital_dict_cap = {}); };