#include #include #include "../binary_table.h" int main() { using namespace bt; const std::string filename = "debug_simple.bin"; if (std::filesystem::exists(filename)) { std::filesystem::remove(filename); } BinaryTable table(filename); table.initialize(); std::cout << "1. Storing key1..." << std::endl; table.set("key1", 100); std::cout << "2. Reading key1..." << std::endl; try { int32_t val = table.get("key1"); std::cout << " ✅ key1 = " << val << std::endl; } catch (const std::exception& e) { std::cout << " ❌ key1 failed: " << e.what() << std::endl; } std::cout << "3. Storing key2..." << std::endl; table.set("key2", 200); std::cout << "4. Reading key2..." << std::endl; try { int32_t val = table.get("key2"); std::cout << " ✅ key2 = " << val << std::endl; } catch (const std::exception& e) { std::cout << " ❌ key2 failed: " << e.what() << std::endl; } std::cout << "5. Re-reading key1..." << std::endl; try { int32_t val = table.get("key1"); std::cout << " ✅ key1 = " << val << std::endl; } catch (const std::exception& e) { std::cout << " ❌ key1 failed: " << e.what() << std::endl; } return 0; }