| author | |
| committer | |
| log | 1a7b4ddeaedb81255cfa8907958c3cf09dd340ee |
| tree | 69b09bdcf3405c057983c8e9dece8d4b66edcc87 |
| parent | 2b93546b39a85e9316c2bf12f336c357577114fa |
6 files changed, 12 insertions(+), 1 deletions(-)
lib/std/compress.zig+1| ... | ... | @@ -5,6 +5,7 @@ pub const gzip = @import("compress/gzip.zig"); |
| 5 | 5 | pub const zlib = @import("compress/zlib.zig"); |
| 6 | 6 | |
| 7 | 7 | test { |
| 8 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; | |
| 8 | 9 | _ = deflate; |
| 9 | 10 | _ = gzip; |
| 10 | 11 | _ = zlib; |
lib/std/event/batch.zig+1| ... | ... | @@ -109,6 +109,7 @@ pub fn Batch( |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | test "std.event.Batch" { |
| 112 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; | |
| 112 | 113 | var count: usize = 0; |
| 113 | 114 | var batch = Batch(void, 2, .auto_async).init(); |
| 114 | 115 | batch.add(&async sleepALittle(&count)); |
lib/std/fmt.zig+4| ... | ... | @@ -2111,6 +2111,7 @@ test "slice" { |
| 2111 | 2111 | } |
| 2112 | 2112 | |
| 2113 | 2113 | test "escape non-printable" { |
| 2114 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 2114 | 2115 | try expectFmt("abc", "{s}", .{fmtSliceEscapeLower("abc")}); |
| 2115 | 2116 | try expectFmt("ab\\xffc", "{s}", .{fmtSliceEscapeLower("ab\xffc")}); |
| 2116 | 2117 | try expectFmt("ab\\xFFc", "{s}", .{fmtSliceEscapeUpper("ab\xffc")}); |
| ... | ... | @@ -2146,6 +2147,7 @@ test "cstr" { |
| 2146 | 2147 | } |
| 2147 | 2148 | |
| 2148 | 2149 | test "filesize" { |
| 2150 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 2149 | 2151 | try expectFmt("file size: 42B\n", "file size: {}\n", .{fmtIntSizeDec(42)}); |
| 2150 | 2152 | try expectFmt("file size: 42B\n", "file size: {}\n", .{fmtIntSizeBin(42)}); |
| 2151 | 2153 | try expectFmt("file size: 63MB\n", "file size: {}\n", .{fmtIntSizeDec(63 * 1000 * 1000)}); |
| ... | ... | @@ -2445,6 +2447,7 @@ test "struct.zero-size" { |
| 2445 | 2447 | } |
| 2446 | 2448 | |
| 2447 | 2449 | test "bytes.hex" { |
| 2450 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 2448 | 2451 | const some_bytes = "\xCA\xFE\xBA\xBE"; |
| 2449 | 2452 | try expectFmt("lowercase: cafebabe\n", "lowercase: {x}\n", .{fmtSliceHexLower(some_bytes)}); |
| 2450 | 2453 | try expectFmt("uppercase: CAFEBABE\n", "uppercase: {X}\n", .{fmtSliceHexUpper(some_bytes)}); |
| ... | ... | @@ -2476,6 +2479,7 @@ pub fn hexToBytes(out: []u8, input: []const u8) ![]u8 { |
| 2476 | 2479 | } |
| 2477 | 2480 | |
| 2478 | 2481 | test "hexToBytes" { |
| 2482 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; | |
| 2479 | 2483 | var buf: [32]u8 = undefined; |
| 2480 | 2484 | try expectFmt("90" ** 32, "{s}", .{fmtSliceHexUpper(try hexToBytes(&buf, "90" ** 32))}); |
| 2481 | 2485 | 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 |
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 | test "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 | } | |
| 395 | 398 | try testSegmentedList(1); |
| 396 | 399 | try testSegmentedList(2); |
| 397 | 400 | try testSegmentedList(4); |
lib/std/unicode.zig+1| ... | ... | @@ -804,6 +804,7 @@ pub fn fmtUtf16le(utf16le: []const u16) std.fmt.Formatter(formatUtf16le) { |
| 804 | 804 | } |
| 805 | 805 | |
| 806 | 806 | test "fmtUtf16le" { |
| 807 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; | |
| 807 | 808 | const expectFmt = std.testing.expectFmt; |
| 808 | 809 | try expectFmt("", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral(""))}); |
| 809 | 810 | try expectFmt("foo", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral("foo"))}); |
lib/std/x.zig+1| ... | ... | @@ -13,6 +13,7 @@ pub const net = struct { |
| 13 | 13 | }; |
| 14 | 14 | |
| 15 | 15 | test { |
| 16 | if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; | |
| 16 | 17 | inline for (.{ os, net }) |module| { |
| 17 | 18 | std.testing.refAllDecls(module); |
| 18 | 19 | } |