mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
std.compress.flate.Decompress: fix buffer size in test
This commit is contained in:
parent
1440519239
commit
91a81d3846
@ -1246,7 +1246,7 @@ test "zlib should not overshoot" {
|
|||||||
fn testFailure(container: Container, in: []const u8, expected_err: anyerror) !void {
|
fn testFailure(container: Container, in: []const u8, expected_err: anyerror) !void {
|
||||||
var reader: Reader = .fixed(in);
|
var reader: Reader = .fixed(in);
|
||||||
var aw: Writer.Allocating = .init(testing.allocator);
|
var aw: Writer.Allocating = .init(testing.allocator);
|
||||||
try aw.ensureUnusedCapacity(flate.history_len);
|
try aw.ensureUnusedCapacity(flate.max_window_len);
|
||||||
defer aw.deinit();
|
defer aw.deinit();
|
||||||
|
|
||||||
var decompress: Decompress = .init(&reader, container, &.{});
|
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 {
|
fn testDecompress(container: Container, compressed: []const u8, expected_plain: []const u8) !void {
|
||||||
var in: std.Io.Reader = .fixed(compressed);
|
var in: std.Io.Reader = .fixed(compressed);
|
||||||
var aw: std.Io.Writer.Allocating = .init(testing.allocator);
|
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();
|
defer aw.deinit();
|
||||||
|
|
||||||
var decompress: Decompress = .init(&in, container, &.{});
|
var decompress: Decompress = .init(&in, container, &.{});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user