Skip to content

Commit

Permalink
add suffix to fuzz test files
Browse files Browse the repository at this point in the history
So that they can be excluded in ziglang/zig build by suffix.
  • Loading branch information
ianic committed Feb 13, 2024
1 parent fcd2b00 commit acd7359
Show file tree
Hide file tree
Showing 47 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/deflate.zig
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,11 @@ test "flate deflate file tokenization" {
.tokens_count = .{ 235, 234, 234, 234, 234, 234 },
},
.{
.data = @embedFile("testdata/fuzz/roundtrip1"),
.data = @embedFile("testdata/fuzz/roundtrip1.input"),
.tokens_count = .{ 333, 331, 331, 331, 331, 331 },
},
.{
.data = @embedFile("testdata/fuzz/roundtrip2"),
.data = @embedFile("testdata/fuzz/roundtrip2.input"),
.tokens_count = .{ 334, 334, 334, 334, 334, 334 },
},
};
Expand Down
6 changes: 3 additions & 3 deletions src/flate.zig
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,19 @@ test "flate compress/decompress" {
.store_size = 36967,
},
.{
.data = @embedFile("testdata/fuzz/roundtrip1"),
.data = @embedFile("testdata/fuzz/roundtrip1.input"),
.gzip_sizes = [_]usize{ 373, 370, 370, 370, 370, 370 },
.huffman_only_size = 393,
.store_size = 393,
},
.{
.data = @embedFile("testdata/fuzz/roundtrip2"),
.data = @embedFile("testdata/fuzz/roundtrip2.input"),
.gzip_sizes = [_]usize{ 373, 373, 373, 373, 373, 373 },
.huffman_only_size = 394,
.store_size = 394,
},
.{
.data = @embedFile("testdata/fuzz/deflate-stream-out"),
.data = @embedFile("testdata/fuzz/deflate-stream.expect"),
.gzip_sizes = [_]usize{ 351, 347, 347, 347, 347, 347 },
.huffman_only_size = 498,
.store_size = 747,
Expand Down
4 changes: 2 additions & 2 deletions src/inflate.zig
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ test "flate.Inflate fuzzing tests" {
out: []const u8 = "",
err: ?anyerror = null,
}{
.{ .input = "deflate-stream", .out = @embedFile("testdata/fuzz/deflate-stream-out") }, // 0
.{ .input = "deflate-stream", .out = @embedFile("testdata/fuzz/deflate-stream.expect") }, // 0
.{ .input = "empty-distance-alphabet01" },
.{ .input = "empty-distance-alphabet02" },
.{ .input = "end-of-stream", .err = error.EndOfStream },
Expand Down Expand Up @@ -531,7 +531,7 @@ test "flate.Inflate fuzzing tests" {
};

inline for (cases, 0..) |c, case_no| {
var in = std.io.fixedBufferStream(@embedFile("testdata/fuzz/" ++ c.input));
var in = std.io.fixedBufferStream(@embedFile("testdata/fuzz/" ++ c.input ++ ".input"));
var out = std.ArrayList(u8).init(testing.allocator);
defer out.deinit();
errdefer std.debug.print("test case failed {}\n", .{case_no});
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit acd7359

Please sign in to comment.