From cf908fa9cadcf4bc29d65bfa89f1ec1b5d7c2d4f Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Mon, 29 Jul 2024 22:07:29 +0200 Subject: Add testing for Db --- src/db.zig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/db.zig') diff --git a/src/db.zig b/src/db.zig index 425629d..751a50d 100644 --- a/src/db.zig +++ b/src/db.zig @@ -38,3 +38,10 @@ pub fn deinit(self: *Self) void{ pub fn connect(self: Self) !Connection { return Connection.init(self); } + +test "Open and connect" { + var database = try Self.init(":memory:"); + defer database.deinit(); + var connection = try database.connect(); + defer connection.deinit(); +} -- cgit v1.2.3