authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-06-03 15:30:25+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2022-06-03 20:21:20+03:00
log1a7b4ddeaedb81255cfa8907958c3cf09dd340ee
tree69b09bdcf3405c057983c8e9dece8d4b66edcc87
parent2b93546b39a85e9316c2bf12f336c357577114fa

std: disable tests that crash stage2


6 files changed, 12 insertions(+), 1 deletions(-)

lib/std/compress.zig+1
......@@ -5,6 +5,7 @@ pub const gzip = @import("compress/gzip.zig");
55pub const zlib = @import("compress/zlib.zig");
66
77test {
8 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest;
89 _ = deflate;
910 _ = gzip;
1011 _ = zlib;
lib/std/event/batch.zig+1
......@@ -109,6 +109,7 @@ pub fn Batch(
109109}
110110
111111test "std.event.Batch" {
112 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest;
112113 var count: usize = 0;
113114 var batch = Batch(void, 2, .auto_async).init();
114115 batch.add(&async sleepALittle(&count));
lib/std/fmt.zig+4
......@@ -2111,6 +2111,7 @@ test "slice" {
21112111}
21122112
21132113test "escape non-printable" {
2114 if (builtin.zig_backend != .stage1) return error.SkipZigTest;
21142115 try expectFmt("abc", "{s}", .{fmtSliceEscapeLower("abc")});
21152116 try expectFmt("ab\\xffc", "{s}", .{fmtSliceEscapeLower("ab\xffc")});
21162117 try expectFmt("ab\\xFFc", "{s}", .{fmtSliceEscapeUpper("ab\xffc")});
......@@ -2146,6 +2147,7 @@ test "cstr" {
21462147}
21472148
21482149test "filesize" {
2150 if (builtin.zig_backend != .stage1) return error.SkipZigTest;
21492151 try expectFmt("file size: 42B\n", "file size: {}\n", .{fmtIntSizeDec(42)});
21502152 try expectFmt("file size: 42B\n", "file size: {}\n", .{fmtIntSizeBin(42)});
21512153 try expectFmt("file size: 63MB\n", "file size: {}\n", .{fmtIntSizeDec(63 * 1000 * 1000)});
......@@ -2445,6 +2447,7 @@ test "struct.zero-size" {
24452447}
24462448
24472449test "bytes.hex" {
2450 if (builtin.zig_backend != .stage1) return error.SkipZigTest;
24482451 const some_bytes = "\xCA\xFE\xBA\xBE";
24492452 try expectFmt("lowercase: cafebabe\n", "lowercase: {x}\n", .{fmtSliceHexLower(some_bytes)});
24502453 try expectFmt("uppercase: CAFEBABE\n", "uppercase: {X}\n", .{fmtSliceHexUpper(some_bytes)});
......@@ -2476,6 +2479,7 @@ pub fn hexToBytes(out: []u8, input: []const u8) ![]u8 {
24762479}
24772480
24782481test "hexToBytes" {
2482 if (builtin.zig_backend != .stage1) return error.SkipZigTest;
24792483 var buf: [32]u8 = undefined;
24802484 try expectFmt("90" ** 32, "{s}", .{fmtSliceHexUpper(try hexToBytes(&buf, "90" ** 32))});
24812485 try expectFmt("ABCD", "{s}", .{fmtSliceHexUpper(try hexToBytes(&buf, "ABCD"))});
lib/std/segmented_list.zig+4-1
......@@ -391,7 +391,10 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type
391391}
392392
393393test "SegmentedList basic usage" {
394 try testSegmentedList(0);
394 if (@import("builtin").zig_backend == .stage1) {
395 // https://github.com/ziglang/zig/issues/11787
396 try testSegmentedList(0);
397 }
395398 try testSegmentedList(1);
396399 try testSegmentedList(2);
397400 try testSegmentedList(4);
lib/std/unicode.zig+1
......@@ -804,6 +804,7 @@ pub fn fmtUtf16le(utf16le: []const u16) std.fmt.Formatter(formatUtf16le) {
804804}
805805
806806test "fmtUtf16le" {
807 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest;
807808 const expectFmt = std.testing.expectFmt;
808809 try expectFmt("", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral(""))});
809810 try expectFmt("foo", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral("foo"))});
lib/std/x.zig+1
......@@ -13,6 +13,7 @@ pub const net = struct {
1313};
1414
1515test {
16 if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest;
1617 inline for (.{ os, net }) |module| {
1718 std.testing.refAllDecls(module);
1819 }