summaryrefslogtreecommitdiff
path: root/src/db.zig
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2024-07-29 22:07:29 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2024-07-29 22:07:29 +0200
commitcf908fa9cadcf4bc29d65bfa89f1ec1b5d7c2d4f (patch)
treed5d73273592266b5de5b1379a4bd89ae1ac6edf4 /src/db.zig
parenta392744cc995d7c26730d2f1626612ad4739ca9b (diff)
Add testing for Db
Diffstat (limited to 'src/db.zig')
-rw-r--r--src/db.zig7
1 files changed, 7 insertions, 0 deletions
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();
+}