std.compress.flate.Decompress: fix buffer size in test

This commit is contained in:
Andrew Kelley 2025-08-08 15:00:28 -07:00
parent 1440519239
commit 91a81d3846

View file

@ -1246,7 +1246,7 @@ test "zlib should not overshoot" {
fn testFailure(container: Container, in: []const u8, expected_err: anyerror) !void {
var reader: Reader = .fixed(in);
var aw: Writer.Allocating = .init(testing.allocator);
try aw.ensureUnusedCapacity(flate.history_len);
try aw.ensureUnusedCapacity(flate.max_window_len);
defer aw.deinit();
var decompress: Decompress = .init(&reader, container, &.{});
@ -1257,7 +1257,7 @@ fn testFailure(container: Container, in: []const u8, expected_err: anyerror) !vo
fn testDecompress(container: Container, compressed: []const u8, expected_plain: []const u8) !void {
var in: std.Io.Reader = .fixed(compressed);
var aw: std.Io.Writer.Allocating = .init(testing.allocator);
try aw.ensureUnusedCapacity(flate.history_len);
try aw.ensureUnusedCapacity(flate.max_window_len);
defer aw.deinit();
var decompress: Decompress = .init(&in, container, &.{});