summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Meghan Denny2021-08-11 22:33:02 -0700
committerGravatar Meghan Denny2021-08-11 22:33:02 -0700
commitea6bdc66a18d97ef8e923c810d4e6d52accce5ca (patch)
tree0b0aa7145d200c662db9db987b98ef5947da8e4e
parentactions- add `fail-fast: false` to matrix steps (diff)
downloadzig-sqlite-ea6bdc66a18d97ef8e923c810d4e6d52accce5ca.tar.gz
zig-sqlite-ea6bdc66a18d97ef8e923c810d4e6d52accce5ca.tar.xz
zig-sqlite-ea6bdc66a18d97ef8e923c810d4e6d52accce5ca.zip
update tests for new use of `Db.init`
-rw-r--r--sqlite.zig8
1 files changed, 2 insertions, 6 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 2061739..65c293e 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -1884,8 +1884,7 @@ test "sqlite: blob open, reopen" {
1884test "sqlite: failing open" { 1884test "sqlite: failing open" {
1885 var diags: Diagnostics = undefined; 1885 var diags: Diagnostics = undefined;
1886 1886
1887 var db: Db = undefined; 1887 const res = Db.init(.{
1888 const res = db.init(.{
1889 .diags = &diags, 1888 .diags = &diags,
1890 .open_flags = .{}, 1889 .open_flags = .{},
1891 .mode = .{ .File = "/tmp/not_existing.db" }, 1890 .mode = .{ .File = "/tmp/not_existing.db" },
@@ -1979,16 +1978,13 @@ fn getTestDb() !Db {
1979 1978
1980 var mode = dbMode(&fba.allocator); 1979 var mode = dbMode(&fba.allocator);
1981 1980
1982 var db: Db = undefined; 1981 return try Db.init(.{
1983 try db.init(.{
1984 .open_flags = .{ 1982 .open_flags = .{
1985 .write = true, 1983 .write = true,
1986 .create = true, 1984 .create = true,
1987 }, 1985 },
1988 .mode = mode, 1986 .mode = mode,
1989 }); 1987 });
1990
1991 return db;
1992} 1988}
1993 1989
1994fn tmpDbPath(allocator: *mem.Allocator) ![:0]const u8 { 1990fn tmpDbPath(allocator: *mem.Allocator) ![:0]const u8 {