mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 13:58:27 +00:00
std: remove superfluous .read = true from deflate tests
This commit is contained in:
parent
9f16d9ed07
commit
8d0c17f5e4
@ -441,7 +441,7 @@ test "deflate/inflate string" {
|
||||
};
|
||||
|
||||
for (deflate_inflate_string_tests) |t| {
|
||||
const golden_file = try testdata_dir.openFile(t.filename, .{ .read = true });
|
||||
const golden_file = try testdata_dir.openFile(t.filename, .{});
|
||||
defer golden_file.close();
|
||||
var golden = try golden_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
|
||||
defer testing.allocator.free(golden);
|
||||
|
||||
@ -892,9 +892,9 @@ fn testBlockHuff(in_name: []const u8, want_name: []const u8) !void {
|
||||
|
||||
const current_dir = try std.fs.openDirAbsolute(std.fs.path.dirname(@src().file).?, .{});
|
||||
const testdata_dir = try current_dir.openDir("testdata", .{});
|
||||
const in_file = try testdata_dir.openFile(in_name, .{ .read = true });
|
||||
const in_file = try testdata_dir.openFile(in_name, .{});
|
||||
defer in_file.close();
|
||||
const want_file = try testdata_dir.openFile(want_name, .{ .read = true });
|
||||
const want_file = try testdata_dir.openFile(want_name, .{});
|
||||
defer want_file.close();
|
||||
|
||||
var in = try in_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
|
||||
@ -1630,11 +1630,11 @@ fn testBlock(comptime ht: HuffTest, ttype: TestType) !void {
|
||||
defer testing.allocator.free(want_name);
|
||||
|
||||
if (!mem.eql(u8, ht.input, "")) {
|
||||
const in_file = try testdata_dir.openFile(ht.input, .{ .read = true });
|
||||
const in_file = try testdata_dir.openFile(ht.input, .{});
|
||||
input = try in_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
|
||||
defer testing.allocator.free(input);
|
||||
|
||||
const want_file = try testdata_dir.openFile(want_name, .{ .read = true });
|
||||
const want_file = try testdata_dir.openFile(want_name, .{});
|
||||
want = try want_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
|
||||
defer testing.allocator.free(want);
|
||||
|
||||
@ -1663,7 +1663,7 @@ fn testBlock(comptime ht: HuffTest, ttype: TestType) !void {
|
||||
want_name_no_input = try fmt.allocPrint(testing.allocator, ht.want_no_input, .{ttype.to_s()});
|
||||
defer testing.allocator.free(want_name_no_input);
|
||||
|
||||
const want_no_input_file = try testdata_dir.openFile(want_name_no_input, .{ .read = true });
|
||||
const want_no_input_file = try testdata_dir.openFile(want_name_no_input, .{});
|
||||
want_ni = try want_no_input_file.reader().readAllAlloc(testing.allocator, math.maxInt(usize));
|
||||
defer testing.allocator.free(want_ni);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user