Skip to content

Commit fde3a8f

Browse files
committed
fix builder.findProgram test
1 parent 34a0e16 commit fde3a8f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/std/build.zig

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,9 +1039,10 @@ pub const Builder = struct {
10391039
};
10401040

10411041
test "builder.findProgram compiles" {
1042-
var buf: [50000]u8 = undefined;
1043-
var fba = std.heap.FixedBufferAllocator.init(&buf);
1044-
const builder = try Builder.create(&fba.allocator, "zig", "zig-cache", "zig-cache");
1042+
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
1043+
defer arena.deinit();
1044+
1045+
const builder = try Builder.create(&arena.allocator, "zig", "zig-cache", "zig-cache");
10451046
defer builder.destroy();
10461047
_ = builder.findProgram(&[_][]const u8{}, &[_][]const u8{}) catch null;
10471048
}

0 commit comments

Comments
 (0)