authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-01-29 16:57:10+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-01-29 16:57:10+02:00
log8d0c17f5e4adf83a2a1e20f2c2230a64dad78121
tree6b4cd2e9c487fc60f32a1b4f2651500fb9d97523
parent9f16d9ed07275209946b9e733c30be1bb0a1ae33

std: remove superfluous `.read = true` from deflate tests


2 files changed, 6 insertions(+), 6 deletions(-)

lib/std/compress/deflate/compressor_test.zig+1-1
......@@ -441,7 +441,7 @@ test "deflate/inflate string" {
441441 };
442442
443443 for (deflate_inflate_string_tests) |t| {
444 const golden_file = try testdata_dir.openFile(t.filename, .{ .read = true });
444 const golden_file = try testdata_dir.openFile(t.filename, .{});
445445 defer golden_file.close();
446446 var golden = try golden_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
447447 defer testing.allocator.free(golden);
lib/std/compress/deflate/huffman_bit_writer.zig+5-5
......@@ -892,9 +892,9 @@ fn testBlockHuff(in_name: []const u8, want_name: []const u8) !void {
892892
893893 const current_dir = try std.fs.openDirAbsolute(std.fs.path.dirname(@src().file).?, .{});
894894 const testdata_dir = try current_dir.openDir("testdata", .{});
895 const in_file = try testdata_dir.openFile(in_name, .{ .read = true });
895 const in_file = try testdata_dir.openFile(in_name, .{});
896896 defer in_file.close();
897 const want_file = try testdata_dir.openFile(want_name, .{ .read = true });
897 const want_file = try testdata_dir.openFile(want_name, .{});
898898 defer want_file.close();
899899
900900 var in = try in_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
......@@ -1630,11 +1630,11 @@ fn testBlock(comptime ht: HuffTest, ttype: TestType) !void {
16301630 defer testing.allocator.free(want_name);
16311631
16321632 if (!mem.eql(u8, ht.input, "")) {
1633 const in_file = try testdata_dir.openFile(ht.input, .{ .read = true });
1633 const in_file = try testdata_dir.openFile(ht.input, .{});
16341634 input = try in_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
16351635 defer testing.allocator.free(input);
16361636
1637 const want_file = try testdata_dir.openFile(want_name, .{ .read = true });
1637 const want_file = try testdata_dir.openFile(want_name, .{});
16381638 want = try want_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
16391639 defer testing.allocator.free(want);
16401640
......@@ -1663,7 +1663,7 @@ fn testBlock(comptime ht: HuffTest, ttype: TestType) !void {
16631663 want_name_no_input = try fmt.allocPrint(testing.allocator, ht.want_no_input, .{ttype.to_s()});
16641664 defer testing.allocator.free(want_name_no_input);
16651665
1666 const want_no_input_file = try testdata_dir.openFile(want_name_no_input, .{ .read = true });
1666 const want_no_input_file = try testdata_dir.openFile(want_name_no_input, .{});
16671667 want_ni = try want_no_input_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
16681668 defer testing.allocator.free(want_ni);
16691669