fix builder.findProgram test

master
Andrew Kelley 2020-02-26 21:29:31 -05:00
parent 2387f48d5c
commit 6226726571
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 4 additions and 3 deletions

View File

@ -1039,9 +1039,10 @@ pub const Builder = struct {
};
test "builder.findProgram compiles" {
var buf: [50000]u8 = undefined;
var fba = std.heap.FixedBufferAllocator.init(&buf);
const builder = try Builder.create(&fba.allocator, "zig", "zig-cache", "zig-cache");
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
defer arena.deinit();
const builder = try Builder.create(&arena.allocator, "zig", "zig-cache", "zig-cache");
defer builder.destroy();
_ = builder.findProgram(&[_][]const u8{}, &[_][]const u8{}) catch null;
}