| author | |
| committer | |
| log | 6f0198cadbe29294f2bf3153a27beebd64377566 |
| tree | 99e6a8657282d9ffe09944a52c78b7e5b6949071 |
| parent | 9f0359d78f9facc38418e32b0e8c1bf6f99f0d26 |
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing
changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727.
This caused a CI failure when it landed in master branch due to a
128-bit `@byteSwap` in std.mem.150 files changed, 180 insertions(+), 1691 deletions(-)
lib/compiler_rt/addf3_test.zig-8| ... | @@ -4,7 +4,6 @@ | ... | @@ -4,7 +4,6 @@ |
| 4 | // https://github.com/llvm/llvm-project/blob/02d85149a05cb1f6dc49f0ba7a2ceca53718ae17/compiler-rt/test/builtins/Unit/subtf3_test.c | 4 | // https://github.com/llvm/llvm-project/blob/02d85149a05cb1f6dc49f0ba7a2ceca53718ae17/compiler-rt/test/builtins/Unit/subtf3_test.c |
| 5 | 5 | ||
| 6 | const std = @import("std"); | 6 | const std = @import("std"); |
| 7 | const builtin = @import("builtin"); | ||
| 8 | const math = std.math; | 7 | const math = std.math; |
| 9 | const qnan128: f128 = @bitCast(@as(u128, 0x7fff800000000000) << 64); | 8 | const qnan128: f128 = @bitCast(@as(u128, 0x7fff800000000000) << 64); |
| 10 | 9 | ||
| ... | @@ -35,8 +34,6 @@ fn test__addtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) !void { | ... | @@ -35,8 +34,6 @@ fn test__addtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) !void { |
| 35 | } | 34 | } |
| 36 | 35 | ||
| 37 | test "addtf3" { | 36 | test "addtf3" { |
| 38 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 39 | |||
| 40 | try test__addtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0); | 37 | try test__addtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0); |
| 41 | 38 | ||
| 42 | // NaN + any = NaN | 39 | // NaN + any = NaN |
| ... | @@ -76,9 +73,6 @@ fn test__subtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) !void { | ... | @@ -76,9 +73,6 @@ fn test__subtf3(a: f128, b: f128, expected_hi: u64, expected_lo: u64) !void { |
| 76 | } | 73 | } |
| 77 | 74 | ||
| 78 | test "subtf3" { | 75 | test "subtf3" { |
| 79 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 80 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 81 | |||
| 82 | // qNaN - any = qNaN | 76 | // qNaN - any = qNaN |
| 83 | try test__subtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0); | 77 | try test__subtf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0); |
| 84 | 78 | ||
| ... | @@ -109,8 +103,6 @@ fn test__addxf3(a: f80, b: f80, expected: u80) !void { | ... | @@ -109,8 +103,6 @@ fn test__addxf3(a: f80, b: f80, expected: u80) !void { |
| 109 | } | 103 | } |
| 110 | 104 | ||
| 111 | test "addxf3" { | 105 | test "addxf3" { |
| 112 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 113 | |||
| 114 | // NaN + any = NaN | 106 | // NaN + any = NaN |
| 115 | try test__addxf3(qnan80, 0x1.23456789abcdefp+5, @as(u80, @bitCast(qnan80))); | 107 | try test__addxf3(qnan80, 0x1.23456789abcdefp+5, @as(u80, @bitCast(qnan80))); |
| 116 | try test__addxf3(@as(f80, @bitCast(@as(u80, 0x7fff_8000_8000_3000_0000))), 0x1.23456789abcdefp+5, @as(u80, @bitCast(qnan80))); | 108 | try test__addxf3(@as(f80, @bitCast(@as(u80, 0x7fff_8000_8000_3000_0000))), 0x1.23456789abcdefp+5, @as(u80, @bitCast(qnan80))); |
lib/compiler_rt/addoti4_test.zig-2| ... | @@ -23,8 +23,6 @@ fn simple_addoti4(a: i128, b: i128, overflow: *c_int) i128 { | ... | @@ -23,8 +23,6 @@ fn simple_addoti4(a: i128, b: i128, overflow: *c_int) i128 { |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | test "addoti4" { | 25 | test "addoti4" { |
| 26 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 27 | |||
| 28 | const min: i128 = math.minInt(i128); | 26 | const min: i128 = math.minInt(i128); |
| 29 | const max: i128 = math.maxInt(i128); | 27 | const max: i128 = math.maxInt(i128); |
| 30 | var i: i128 = 1; | 28 | var i: i128 = 1; |
lib/compiler_rt/comparef.zig-2| ... | @@ -98,8 +98,6 @@ pub inline fn cmp_f80(comptime RT: type, a: f80, b: f80) RT { | ... | @@ -98,8 +98,6 @@ pub inline fn cmp_f80(comptime RT: type, a: f80, b: f80) RT { |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | test "cmp_f80" { | 100 | test "cmp_f80" { |
| 101 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 102 | |||
| 103 | inline for (.{ LE, GE }) |RT| { | 101 | inline for (.{ LE, GE }) |RT| { |
| 104 | try std.testing.expect(cmp_f80(RT, 1.0, 1.0) == RT.Equal); | 102 | try std.testing.expect(cmp_f80(RT, 1.0, 1.0) == RT.Equal); |
| 105 | try std.testing.expect(cmp_f80(RT, 0.0, -0.0) == RT.Equal); | 103 | try std.testing.expect(cmp_f80(RT, 0.0, -0.0) == RT.Equal); |
lib/compiler_rt/cos.zig+2-2| ... | @@ -1,4 +1,6 @@ | ... | @@ -1,4 +1,6 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const arch = builtin.cpu.arch; | ||
| 2 | const math = std.math; | 4 | const math = std.math; |
| 3 | const expect = std.testing.expect; | 5 | const expect = std.testing.expect; |
| 4 | const common = @import("common.zig"); | 6 | const common = @import("common.zig"); |
| ... | @@ -134,8 +136,6 @@ pub fn cosl(x: c_longdouble) callconv(.C) c_longdouble { | ... | @@ -134,8 +136,6 @@ pub fn cosl(x: c_longdouble) callconv(.C) c_longdouble { |
| 134 | } | 136 | } |
| 135 | 137 | ||
| 136 | test "cos32" { | 138 | test "cos32" { |
| 137 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 138 | |||
| 139 | const epsilon = 0.00001; | 139 | const epsilon = 0.00001; |
| 140 | 140 | ||
| 141 | try expect(math.approxEqAbs(f32, cosf(0.0), 1.0, epsilon)); | 141 | try expect(math.approxEqAbs(f32, cosf(0.0), 1.0, epsilon)); |
lib/compiler_rt/divtf3_test.zig-4| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const math = std.math; | 2 | const math = std.math; |
| 4 | const testing = std.testing; | 3 | const testing = std.testing; |
| 5 | 4 | ||
| ... | @@ -31,9 +30,6 @@ fn test__divtf3(a: f128, b: f128, expectedHi: u64, expectedLo: u64) !void { | ... | @@ -31,9 +30,6 @@ fn test__divtf3(a: f128, b: f128, expectedHi: u64, expectedLo: u64) !void { |
| 31 | } | 30 | } |
| 32 | 31 | ||
| 33 | test "divtf3" { | 32 | test "divtf3" { |
| 34 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 35 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 36 | |||
| 37 | // NaN / any = NaN | 33 | // NaN / any = NaN |
| 38 | try test__divtf3(math.nan(f128), 0x1.23456789abcdefp+5, 0x7fff800000000000, 0); | 34 | try test__divtf3(math.nan(f128), 0x1.23456789abcdefp+5, 0x7fff800000000000, 0); |
| 39 | // inf / any(except inf and nan) = inf | 35 | // inf / any(except inf and nan) = inf |
lib/compiler_rt/divxf3_test.zig-2| ... | @@ -39,8 +39,6 @@ fn test__divxf3(a: f80, b: f80) !void { | ... | @@ -39,8 +39,6 @@ fn test__divxf3(a: f80, b: f80) !void { |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | test "divxf3" { | 41 | test "divxf3" { |
| 42 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 43 | |||
| 44 | // NaN / any = NaN | 42 | // NaN / any = NaN |
| 45 | try expect__divxf3_result(math.nan(f80), 0x1.23456789abcdefp+5, 0x7fffC000000000000000); | 43 | try expect__divxf3_result(math.nan(f80), 0x1.23456789abcdefp+5, 0x7fffC000000000000000); |
| 46 | // inf / any(except inf and nan) = inf | 44 | // inf / any(except inf and nan) = inf |
lib/compiler_rt/float_from_int_test.zig-22| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const testing = std.testing; | 2 | const testing = std.testing; |
| 4 | const math = std.math; | 3 | const math = std.math; |
| 5 | 4 | ||
| ... | @@ -126,9 +125,6 @@ fn test__floatuntisf(a: u128, expected: f32) !void { | ... | @@ -126,9 +125,6 @@ fn test__floatuntisf(a: u128, expected: f32) !void { |
| 126 | } | 125 | } |
| 127 | 126 | ||
| 128 | test "floattisf" { | 127 | test "floattisf" { |
| 129 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 130 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 131 | |||
| 132 | try test__floattisf(0, 0.0); | 128 | try test__floattisf(0, 0.0); |
| 133 | 129 | ||
| 134 | try test__floattisf(1, 1.0); | 130 | try test__floattisf(1, 1.0); |
| ... | @@ -175,9 +171,6 @@ test "floattisf" { | ... | @@ -175,9 +171,6 @@ test "floattisf" { |
| 175 | } | 171 | } |
| 176 | 172 | ||
| 177 | test "floatuntisf" { | 173 | test "floatuntisf" { |
| 178 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 179 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 180 | |||
| 181 | try test__floatuntisf(0, 0.0); | 174 | try test__floatuntisf(0, 0.0); |
| 182 | 175 | ||
| 183 | try test__floatuntisf(1, 1.0); | 176 | try test__floatuntisf(1, 1.0); |
| ... | @@ -374,9 +367,6 @@ fn test__floatuntidf(a: u128, expected: f64) !void { | ... | @@ -374,9 +367,6 @@ fn test__floatuntidf(a: u128, expected: f64) !void { |
| 374 | } | 367 | } |
| 375 | 368 | ||
| 376 | test "floattidf" { | 369 | test "floattidf" { |
| 377 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 378 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 379 | |||
| 380 | try test__floattidf(0, 0.0); | 370 | try test__floattidf(0, 0.0); |
| 381 | 371 | ||
| 382 | try test__floattidf(1, 1.0); | 372 | try test__floattidf(1, 1.0); |
| ... | @@ -447,9 +437,6 @@ test "floattidf" { | ... | @@ -447,9 +437,6 @@ test "floattidf" { |
| 447 | } | 437 | } |
| 448 | 438 | ||
| 449 | test "floatuntidf" { | 439 | test "floatuntidf" { |
| 450 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 451 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 452 | |||
| 453 | try test__floatuntidf(0, 0.0); | 440 | try test__floatuntidf(0, 0.0); |
| 454 | 441 | ||
| 455 | try test__floatuntidf(1, 1.0); | 442 | try test__floatuntidf(1, 1.0); |
| ... | @@ -595,9 +582,6 @@ test "floatditf" { | ... | @@ -595,9 +582,6 @@ test "floatditf" { |
| 595 | } | 582 | } |
| 596 | 583 | ||
| 597 | test "floatunditf" { | 584 | test "floatunditf" { |
| 598 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 599 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 600 | |||
| 601 | try test__floatunditf(0xffffffffffffffff, 0x403effffffffffff, 0xfffe000000000000); | 585 | try test__floatunditf(0xffffffffffffffff, 0x403effffffffffff, 0xfffe000000000000); |
| 602 | try test__floatunditf(0xfffffffffffffffe, 0x403effffffffffff, 0xfffc000000000000); | 586 | try test__floatunditf(0xfffffffffffffffe, 0x403effffffffffff, 0xfffc000000000000); |
| 603 | try test__floatunditf(0x8000000000000000, 0x403e000000000000, 0x0); | 587 | try test__floatunditf(0x8000000000000000, 0x403e000000000000, 0x0); |
| ... | @@ -619,9 +603,6 @@ fn test__floatuntitf(a: u128, expected: f128) !void { | ... | @@ -619,9 +603,6 @@ fn test__floatuntitf(a: u128, expected: f128) !void { |
| 619 | } | 603 | } |
| 620 | 604 | ||
| 621 | test "floattitf" { | 605 | test "floattitf" { |
| 622 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 623 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 624 | |||
| 625 | try test__floattitf(0, 0.0); | 606 | try test__floattitf(0, 0.0); |
| 626 | 607 | ||
| 627 | try test__floattitf(1, 1.0); | 608 | try test__floattitf(1, 1.0); |
| ... | @@ -704,9 +685,6 @@ test "floattitf" { | ... | @@ -704,9 +685,6 @@ test "floattitf" { |
| 704 | } | 685 | } |
| 705 | 686 | ||
| 706 | test "floatuntitf" { | 687 | test "floatuntitf" { |
| 707 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 708 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 709 | |||
| 710 | try test__floatuntitf(0, 0.0); | 688 | try test__floatuntitf(0, 0.0); |
| 711 | 689 | ||
| 712 | try test__floatuntitf(1, 1.0); | 690 | try test__floatuntitf(1, 1.0); |
lib/compiler_rt/fma.zig-3| ... | @@ -343,9 +343,6 @@ test "64" { | ... | @@ -343,9 +343,6 @@ test "64" { |
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | test "128" { | 345 | test "128" { |
| 346 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 347 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 348 | |||
| 349 | const epsilon = 0.000001; | 346 | const epsilon = 0.000001; |
| 350 | 347 | ||
| 351 | try expect(math.approxEqAbs(f128, fmaq(0.0, 5.0, 9.124), 9.124, epsilon)); | 348 | try expect(math.approxEqAbs(f128, fmaq(0.0, 5.0, 9.124), 9.124, epsilon)); |
lib/compiler_rt/fmodx_test.zig-4| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const fmod = @import("fmod.zig"); | 2 | const fmod = @import("fmod.zig"); |
| 4 | const testing = std.testing; | 3 | const testing = std.testing; |
| 5 | 4 | ||
| ... | @@ -23,9 +22,6 @@ fn test_fmodx_infs() !void { | ... | @@ -23,9 +22,6 @@ fn test_fmodx_infs() !void { |
| 23 | } | 22 | } |
| 24 | 23 | ||
| 25 | test "fmodx" { | 24 | test "fmodx" { |
| 26 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 27 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 28 | |||
| 29 | try test_fmodx(6.4, 4.0, 2.4); | 25 | try test_fmodx(6.4, 4.0, 2.4); |
| 30 | try test_fmodx(6.4, -4.0, 2.4); | 26 | try test_fmodx(6.4, -4.0, 2.4); |
| 31 | try test_fmodx(-6.4, 4.0, -2.4); | 27 | try test_fmodx(-6.4, 4.0, -2.4); |
lib/compiler_rt/int.zig-2| ... | @@ -42,8 +42,6 @@ pub fn __divmodti4(a: i128, b: i128, rem: *i128) callconv(.C) i128 { | ... | @@ -42,8 +42,6 @@ pub fn __divmodti4(a: i128, b: i128, rem: *i128) callconv(.C) i128 { |
| 42 | } | 42 | } |
| 43 | 43 | ||
| 44 | test "test_divmodti4" { | 44 | test "test_divmodti4" { |
| 45 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 46 | |||
| 47 | const cases = [_][4]i128{ | 45 | const cases = [_][4]i128{ |
| 48 | [_]i128{ 0, 1, 0, 0 }, | 46 | [_]i128{ 0, 1, 0, 0 }, |
| 49 | [_]i128{ 0, -1, 0, 0 }, | 47 | [_]i128{ 0, -1, 0, 0 }, |
lib/compiler_rt/int_from_float_test.zig-37| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const testing = std.testing; | 2 | const testing = std.testing; |
| 4 | const math = std.math; | 3 | const math = std.math; |
| 5 | 4 | ||
| ... | @@ -41,8 +40,6 @@ fn test__fixunssfsi(a: f32, expected: u32) !void { | ... | @@ -41,8 +40,6 @@ fn test__fixunssfsi(a: f32, expected: u32) !void { |
| 41 | } | 40 | } |
| 42 | 41 | ||
| 43 | test "fixsfsi" { | 42 | test "fixsfsi" { |
| 44 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 45 | |||
| 46 | try test__fixsfsi(-math.floatMax(f32), math.minInt(i32)); | 43 | try test__fixsfsi(-math.floatMax(f32), math.minInt(i32)); |
| 47 | 44 | ||
| 48 | try test__fixsfsi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i32)); | 45 | try test__fixsfsi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i32)); |
| ... | @@ -106,8 +103,6 @@ test "fixsfsi" { | ... | @@ -106,8 +103,6 @@ test "fixsfsi" { |
| 106 | } | 103 | } |
| 107 | 104 | ||
| 108 | test "fixunssfsi" { | 105 | test "fixunssfsi" { |
| 109 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 110 | |||
| 111 | try test__fixunssfsi(0.0, 0); | 106 | try test__fixunssfsi(0.0, 0); |
| 112 | 107 | ||
| 113 | try test__fixunssfsi(0.5, 0); | 108 | try test__fixunssfsi(0.5, 0); |
| ... | @@ -147,8 +142,6 @@ fn test__fixunssfdi(a: f32, expected: u64) !void { | ... | @@ -147,8 +142,6 @@ fn test__fixunssfdi(a: f32, expected: u64) !void { |
| 147 | } | 142 | } |
| 148 | 143 | ||
| 149 | test "fixsfdi" { | 144 | test "fixsfdi" { |
| 150 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 151 | |||
| 152 | try test__fixsfdi(-math.floatMax(f32), math.minInt(i64)); | 145 | try test__fixsfdi(-math.floatMax(f32), math.minInt(i64)); |
| 153 | 146 | ||
| 154 | try test__fixsfdi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i64)); | 147 | try test__fixsfdi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i64)); |
| ... | @@ -204,8 +197,6 @@ test "fixsfdi" { | ... | @@ -204,8 +197,6 @@ test "fixsfdi" { |
| 204 | } | 197 | } |
| 205 | 198 | ||
| 206 | test "fixunssfdi" { | 199 | test "fixunssfdi" { |
| 207 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 208 | |||
| 209 | try test__fixunssfdi(0.0, 0); | 200 | try test__fixunssfdi(0.0, 0); |
| 210 | 201 | ||
| 211 | try test__fixunssfdi(0.5, 0); | 202 | try test__fixunssfdi(0.5, 0); |
| ... | @@ -244,8 +235,6 @@ fn test__fixunssfti(a: f32, expected: u128) !void { | ... | @@ -244,8 +235,6 @@ fn test__fixunssfti(a: f32, expected: u128) !void { |
| 244 | } | 235 | } |
| 245 | 236 | ||
| 246 | test "fixsfti" { | 237 | test "fixsfti" { |
| 247 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 248 | |||
| 249 | try test__fixsfti(-math.floatMax(f32), math.minInt(i128)); | 238 | try test__fixsfti(-math.floatMax(f32), math.minInt(i128)); |
| 250 | 239 | ||
| 251 | try test__fixsfti(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i128)); | 240 | try test__fixsfti(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i128)); |
| ... | @@ -317,8 +306,6 @@ test "fixsfti" { | ... | @@ -317,8 +306,6 @@ test "fixsfti" { |
| 317 | } | 306 | } |
| 318 | 307 | ||
| 319 | test "fixunssfti" { | 308 | test "fixunssfti" { |
| 320 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 321 | |||
| 322 | try test__fixunssfti(0.0, 0); | 309 | try test__fixunssfti(0.0, 0); |
| 323 | 310 | ||
| 324 | try test__fixunssfti(0.5, 0); | 311 | try test__fixunssfti(0.5, 0); |
| ... | @@ -365,8 +352,6 @@ fn test__fixunsdfsi(a: f64, expected: u32) !void { | ... | @@ -365,8 +352,6 @@ fn test__fixunsdfsi(a: f64, expected: u32) !void { |
| 365 | } | 352 | } |
| 366 | 353 | ||
| 367 | test "fixdfsi" { | 354 | test "fixdfsi" { |
| 368 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 369 | |||
| 370 | try test__fixdfsi(-math.floatMax(f64), math.minInt(i32)); | 355 | try test__fixdfsi(-math.floatMax(f64), math.minInt(i32)); |
| 371 | 356 | ||
| 372 | try test__fixdfsi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i32)); | 357 | try test__fixdfsi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i32)); |
| ... | @@ -428,8 +413,6 @@ test "fixdfsi" { | ... | @@ -428,8 +413,6 @@ test "fixdfsi" { |
| 428 | } | 413 | } |
| 429 | 414 | ||
| 430 | test "fixunsdfsi" { | 415 | test "fixunsdfsi" { |
| 431 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 432 | |||
| 433 | try test__fixunsdfsi(0.0, 0); | 416 | try test__fixunsdfsi(0.0, 0); |
| 434 | 417 | ||
| 435 | try test__fixunsdfsi(0.5, 0); | 418 | try test__fixunsdfsi(0.5, 0); |
| ... | @@ -472,8 +455,6 @@ fn test__fixunsdfdi(a: f64, expected: u64) !void { | ... | @@ -472,8 +455,6 @@ fn test__fixunsdfdi(a: f64, expected: u64) !void { |
| 472 | } | 455 | } |
| 473 | 456 | ||
| 474 | test "fixdfdi" { | 457 | test "fixdfdi" { |
| 475 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 476 | |||
| 477 | try test__fixdfdi(-math.floatMax(f64), math.minInt(i64)); | 458 | try test__fixdfdi(-math.floatMax(f64), math.minInt(i64)); |
| 478 | 459 | ||
| 479 | try test__fixdfdi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i64)); | 460 | try test__fixdfdi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i64)); |
| ... | @@ -527,8 +508,6 @@ test "fixdfdi" { | ... | @@ -527,8 +508,6 @@ test "fixdfdi" { |
| 527 | } | 508 | } |
| 528 | 509 | ||
| 529 | test "fixunsdfdi" { | 510 | test "fixunsdfdi" { |
| 530 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 531 | |||
| 532 | try test__fixunsdfdi(0.0, 0); | 511 | try test__fixunsdfdi(0.0, 0); |
| 533 | try test__fixunsdfdi(0.5, 0); | 512 | try test__fixunsdfdi(0.5, 0); |
| 534 | try test__fixunsdfdi(0.99, 0); | 513 | try test__fixunsdfdi(0.99, 0); |
| ... | @@ -571,8 +550,6 @@ fn test__fixunsdfti(a: f64, expected: u128) !void { | ... | @@ -571,8 +550,6 @@ fn test__fixunsdfti(a: f64, expected: u128) !void { |
| 571 | } | 550 | } |
| 572 | 551 | ||
| 573 | test "fixdfti" { | 552 | test "fixdfti" { |
| 574 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 575 | |||
| 576 | try test__fixdfti(-math.floatMax(f64), math.minInt(i128)); | 553 | try test__fixdfti(-math.floatMax(f64), math.minInt(i128)); |
| 577 | 554 | ||
| 578 | try test__fixdfti(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i128)); | 555 | try test__fixdfti(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i128)); |
| ... | @@ -626,8 +603,6 @@ test "fixdfti" { | ... | @@ -626,8 +603,6 @@ test "fixdfti" { |
| 626 | } | 603 | } |
| 627 | 604 | ||
| 628 | test "fixunsdfti" { | 605 | test "fixunsdfti" { |
| 629 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 630 | |||
| 631 | try test__fixunsdfti(0.0, 0); | 606 | try test__fixunsdfti(0.0, 0); |
| 632 | 607 | ||
| 633 | try test__fixunsdfti(0.5, 0); | 608 | try test__fixunsdfti(0.5, 0); |
| ... | @@ -677,8 +652,6 @@ fn test__fixunstfsi(a: f128, expected: u32) !void { | ... | @@ -677,8 +652,6 @@ fn test__fixunstfsi(a: f128, expected: u32) !void { |
| 677 | } | 652 | } |
| 678 | 653 | ||
| 679 | test "fixtfsi" { | 654 | test "fixtfsi" { |
| 680 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 681 | |||
| 682 | try test__fixtfsi(-math.floatMax(f128), math.minInt(i32)); | 655 | try test__fixtfsi(-math.floatMax(f128), math.minInt(i32)); |
| 683 | 656 | ||
| 684 | try test__fixtfsi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i32)); | 657 | try test__fixtfsi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i32)); |
| ... | @@ -742,8 +715,6 @@ test "fixtfsi" { | ... | @@ -742,8 +715,6 @@ test "fixtfsi" { |
| 742 | } | 715 | } |
| 743 | 716 | ||
| 744 | test "fixunstfsi" { | 717 | test "fixunstfsi" { |
| 745 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 746 | |||
| 747 | try test__fixunstfsi(math.inf(f128), 0xffffffff); | 718 | try test__fixunstfsi(math.inf(f128), 0xffffffff); |
| 748 | try test__fixunstfsi(0, 0x0); | 719 | try test__fixunstfsi(0, 0x0); |
| 749 | try test__fixunstfsi(0x1.23456789abcdefp+5, 0x24); | 720 | try test__fixunstfsi(0x1.23456789abcdefp+5, 0x24); |
| ... | @@ -767,8 +738,6 @@ fn test__fixunstfdi(a: f128, expected: u64) !void { | ... | @@ -767,8 +738,6 @@ fn test__fixunstfdi(a: f128, expected: u64) !void { |
| 767 | } | 738 | } |
| 768 | 739 | ||
| 769 | test "fixtfdi" { | 740 | test "fixtfdi" { |
| 770 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 771 | |||
| 772 | try test__fixtfdi(-math.floatMax(f128), math.minInt(i64)); | 741 | try test__fixtfdi(-math.floatMax(f128), math.minInt(i64)); |
| 773 | 742 | ||
| 774 | try test__fixtfdi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i64)); | 743 | try test__fixtfdi(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i64)); |
| ... | @@ -832,8 +801,6 @@ test "fixtfdi" { | ... | @@ -832,8 +801,6 @@ test "fixtfdi" { |
| 832 | } | 801 | } |
| 833 | 802 | ||
| 834 | test "fixunstfdi" { | 803 | test "fixunstfdi" { |
| 835 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 836 | |||
| 837 | try test__fixunstfdi(0.0, 0); | 804 | try test__fixunstfdi(0.0, 0); |
| 838 | 805 | ||
| 839 | try test__fixunstfdi(0.5, 0); | 806 | try test__fixunstfdi(0.5, 0); |
| ... | @@ -886,8 +853,6 @@ fn test__fixunstfti(a: f128, expected: u128) !void { | ... | @@ -886,8 +853,6 @@ fn test__fixunstfti(a: f128, expected: u128) !void { |
| 886 | } | 853 | } |
| 887 | 854 | ||
| 888 | test "fixtfti" { | 855 | test "fixtfti" { |
| 889 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 890 | |||
| 891 | try test__fixtfti(-math.floatMax(f128), math.minInt(i128)); | 856 | try test__fixtfti(-math.floatMax(f128), math.minInt(i128)); |
| 892 | 857 | ||
| 893 | try test__fixtfti(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i128)); | 858 | try test__fixtfti(-0x1.FFFFFFFFFFFFFp+1023, math.minInt(i128)); |
| ... | @@ -969,8 +934,6 @@ fn test__fixunshfti(a: f16, expected: u128) !void { | ... | @@ -969,8 +934,6 @@ fn test__fixunshfti(a: f16, expected: u128) !void { |
| 969 | } | 934 | } |
| 970 | 935 | ||
| 971 | test "fixunshfti for f16" { | 936 | test "fixunshfti for f16" { |
| 972 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 973 | |||
| 974 | try test__fixunshfti(math.inf(f16), math.maxInt(u128)); | 937 | try test__fixunshfti(math.inf(f16), math.maxInt(u128)); |
| 975 | try test__fixunshfti(math.floatMax(f16), 65504); | 938 | try test__fixunshfti(math.floatMax(f16), 65504); |
| 976 | } | 939 | } |
lib/compiler_rt/mulf3_test.zig-4| ... | @@ -3,7 +3,6 @@ | ... | @@ -3,7 +3,6 @@ |
| 3 | // https://github.com/llvm/llvm-project/blob/2ffb1b0413efa9a24eb3c49e710e36f92e2cb50b/compiler-rt/test/builtins/Unit/multf3_test.c | 3 | // https://github.com/llvm/llvm-project/blob/2ffb1b0413efa9a24eb3c49e710e36f92e2cb50b/compiler-rt/test/builtins/Unit/multf3_test.c |
| 4 | 4 | ||
| 5 | const std = @import("std"); | 5 | const std = @import("std"); |
| 6 | const builtin = @import("builtin"); | ||
| 7 | const math = std.math; | 6 | const math = std.math; |
| 8 | const qnan128: f128 = @bitCast(@as(u128, 0x7fff800000000000) << 64); | 7 | const qnan128: f128 = @bitCast(@as(u128, 0x7fff800000000000) << 64); |
| 9 | const inf128: f128 = @bitCast(@as(u128, 0x7fff000000000000) << 64); | 8 | const inf128: f128 = @bitCast(@as(u128, 0x7fff000000000000) << 64); |
| ... | @@ -49,9 +48,6 @@ fn makeNaN128(rand: u64) f128 { | ... | @@ -49,9 +48,6 @@ fn makeNaN128(rand: u64) f128 { |
| 49 | return @bitCast(int_result); | 48 | return @bitCast(int_result); |
| 50 | } | 49 | } |
| 51 | test "multf3" { | 50 | test "multf3" { |
| 52 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 53 | !comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .bmi, .lzcnt })) return error.SkipZigTest; | ||
| 54 | |||
| 55 | // qNaN * any = qNaN | 51 | // qNaN * any = qNaN |
| 56 | try test__multf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0); | 52 | try test__multf3(qnan128, 0x1.23456789abcdefp+5, 0x7fff800000000000, 0x0); |
| 57 | 53 |
lib/compiler_rt/negti2_test.zig+1-3| ... | @@ -6,9 +6,7 @@ fn test__negti2(a: i128, expected: i128) !void { | ... | @@ -6,9 +6,7 @@ fn test__negti2(a: i128, expected: i128) !void { |
| 6 | try testing.expectEqual(expected, result); | 6 | try testing.expectEqual(expected, result); |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | test "negti2" { | 9 | test "negdi2" { |
| 10 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 11 | |||
| 12 | // TODO ensuring that math.minInt(i128); returns error | 10 | // TODO ensuring that math.minInt(i128); returns error |
| 13 | 11 | ||
| 14 | try test__negti2(-3, 3); | 12 | try test__negti2(-3, 3); |
lib/compiler_rt/powiXf2_test.zig+2-11| ... | @@ -3,10 +3,8 @@ | ... | @@ -3,10 +3,8 @@ |
| 3 | // powihf2 adapted from powisf2 tests | 3 | // powihf2 adapted from powisf2 tests |
| 4 | 4 | ||
| 5 | const powiXf2 = @import("powiXf2.zig"); | 5 | const powiXf2 = @import("powiXf2.zig"); |
| 6 | const std = @import("std"); | 6 | const testing = @import("std").testing; |
| 7 | const builtin = @import("builtin"); | 7 | const math = @import("std").math; |
| 8 | const testing = std.testing; | ||
| 9 | const math = std.math; | ||
| 10 | 8 | ||
| 11 | fn test__powihf2(a: f16, b: i32, expected: f16) !void { | 9 | fn test__powihf2(a: f16, b: i32, expected: f16) !void { |
| 12 | var result = powiXf2.__powihf2(a, b); | 10 | var result = powiXf2.__powihf2(a, b); |
| ... | @@ -34,9 +32,6 @@ fn test__powixf2(a: f80, b: i32, expected: f80) !void { | ... | @@ -34,9 +32,6 @@ fn test__powixf2(a: f80, b: i32, expected: f80) !void { |
| 34 | } | 32 | } |
| 35 | 33 | ||
| 36 | test "powihf2" { | 34 | test "powihf2" { |
| 37 | if (builtin.zig_backend == .stage2_x86_64 and | ||
| 38 | !comptime std.Target.x86.featureSetHas(builtin.cpu.features, .f16c)) return error.SkipZigTest; | ||
| 39 | |||
| 40 | const inf_f16 = math.inf(f16); | 35 | const inf_f16 = math.inf(f16); |
| 41 | try test__powisf2(0, 0, 1); | 36 | try test__powisf2(0, 0, 1); |
| 42 | try test__powihf2(1, 0, 1); | 37 | try test__powihf2(1, 0, 1); |
| ... | @@ -356,8 +351,6 @@ test "powidf2" { | ... | @@ -356,8 +351,6 @@ test "powidf2" { |
| 356 | } | 351 | } |
| 357 | 352 | ||
| 358 | test "powitf2" { | 353 | test "powitf2" { |
| 359 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 360 | |||
| 361 | const inf_f128 = math.inf(f128); | 354 | const inf_f128 = math.inf(f128); |
| 362 | try test__powitf2(0, 0, 1); | 355 | try test__powitf2(0, 0, 1); |
| 363 | try test__powitf2(1, 0, 1); | 356 | try test__powitf2(1, 0, 1); |
| ... | @@ -463,8 +456,6 @@ test "powitf2" { | ... | @@ -463,8 +456,6 @@ test "powitf2" { |
| 463 | } | 456 | } |
| 464 | 457 | ||
| 465 | test "powixf2" { | 458 | test "powixf2" { |
| 466 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 467 | |||
| 468 | const inf_f80 = math.inf(f80); | 459 | const inf_f80 = math.inf(f80); |
| 469 | try test__powixf2(0, 0, 1); | 460 | try test__powixf2(0, 0, 1); |
| 470 | try test__powixf2(1, 0, 1); | 461 | try test__powixf2(1, 0, 1); |
lib/compiler_rt/sin.zig-2| ... | @@ -140,8 +140,6 @@ pub fn sinl(x: c_longdouble) callconv(.C) c_longdouble { | ... | @@ -140,8 +140,6 @@ pub fn sinl(x: c_longdouble) callconv(.C) c_longdouble { |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | test "sin32" { | 142 | test "sin32" { |
| 143 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 144 | |||
| 145 | const epsilon = 0.00001; | 143 | const epsilon = 0.00001; |
| 146 | 144 | ||
| 147 | try expect(math.approxEqAbs(f32, sinf(0.0), 0.0, epsilon)); | 145 | try expect(math.approxEqAbs(f32, sinf(0.0), 0.0, epsilon)); |
lib/compiler_rt/suboti4_test.zig-2| ... | @@ -27,8 +27,6 @@ pub fn simple_suboti4(a: i128, b: i128, overflow: *c_int) i128 { | ... | @@ -27,8 +27,6 @@ pub fn simple_suboti4(a: i128, b: i128, overflow: *c_int) i128 { |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | test "suboti3" { | 29 | test "suboti3" { |
| 30 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 31 | |||
| 32 | const min: i128 = math.minInt(i128); | 30 | const min: i128 = math.minInt(i128); |
| 33 | const max: i128 = math.maxInt(i128); | 31 | const max: i128 = math.maxInt(i128); |
| 34 | var i: i128 = 1; | 32 | var i: i128 = 1; |
lib/compiler_rt/tan.zig-4| ... | @@ -131,8 +131,6 @@ test "tan" { | ... | @@ -131,8 +131,6 @@ test "tan" { |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | test "tan32" { | 133 | test "tan32" { |
| 134 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 135 | |||
| 136 | const epsilon = 0.00001; | 134 | const epsilon = 0.00001; |
| 137 | 135 | ||
| 138 | try expect(math.approxEqAbs(f32, tanf(0.0), 0.0, epsilon)); | 136 | try expect(math.approxEqAbs(f32, tanf(0.0), 0.0, epsilon)); |
| ... | @@ -144,8 +142,6 @@ test "tan32" { | ... | @@ -144,8 +142,6 @@ test "tan32" { |
| 144 | } | 142 | } |
| 145 | 143 | ||
| 146 | test "tan64" { | 144 | test "tan64" { |
| 147 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 148 | |||
| 149 | const epsilon = 0.000001; | 145 | const epsilon = 0.000001; |
| 150 | 146 | ||
| 151 | try expect(math.approxEqAbs(f64, tan(0.0), 0.0, epsilon)); | 147 | try expect(math.approxEqAbs(f64, tan(0.0), 0.0, epsilon)); |
lib/compiler_rt/udivmodei4.zig+1-4| ... | @@ -129,10 +129,7 @@ pub fn __umodei4(r_p: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) | ... | @@ -129,10 +129,7 @@ pub fn __umodei4(r_p: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | test "__udivei4/__umodei4" { | 131 | test "__udivei4/__umodei4" { |
| 132 | switch (builtin.zig_backend) { | 132 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 133 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 134 | else => {}, | ||
| 135 | } | ||
| 136 | 133 | ||
| 137 | const RndGen = std.rand.DefaultPrng; | 134 | const RndGen = std.rand.DefaultPrng; |
| 138 | var rnd = RndGen.init(42); | 135 | var rnd = RndGen.init(42); |
lib/std/Build/Cache.zig-10| ... | @@ -1007,8 +1007,6 @@ test "cache file and then recall it" { | ... | @@ -1007,8 +1007,6 @@ test "cache file and then recall it" { |
| 1007 | return error.SkipZigTest; | 1007 | return error.SkipZigTest; |
| 1008 | } | 1008 | } |
| 1009 | 1009 | ||
| 1010 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1011 | |||
| 1012 | var tmp = testing.tmpDir(.{}); | 1010 | var tmp = testing.tmpDir(.{}); |
| 1013 | defer tmp.cleanup(); | 1011 | defer tmp.cleanup(); |
| 1014 | 1012 | ||
| ... | @@ -1074,9 +1072,6 @@ test "check that changing a file makes cache fail" { | ... | @@ -1074,9 +1072,6 @@ test "check that changing a file makes cache fail" { |
| 1074 | // https://github.com/ziglang/zig/issues/5437 | 1072 | // https://github.com/ziglang/zig/issues/5437 |
| 1075 | return error.SkipZigTest; | 1073 | return error.SkipZigTest; |
| 1076 | } | 1074 | } |
| 1077 | |||
| 1078 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1079 | |||
| 1080 | var tmp = testing.tmpDir(.{}); | 1075 | var tmp = testing.tmpDir(.{}); |
| 1081 | defer tmp.cleanup(); | 1076 | defer tmp.cleanup(); |
| 1082 | 1077 | ||
| ... | @@ -1151,8 +1146,6 @@ test "no file inputs" { | ... | @@ -1151,8 +1146,6 @@ test "no file inputs" { |
| 1151 | return error.SkipZigTest; | 1146 | return error.SkipZigTest; |
| 1152 | } | 1147 | } |
| 1153 | 1148 | ||
| 1154 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1155 | |||
| 1156 | var tmp = testing.tmpDir(.{}); | 1149 | var tmp = testing.tmpDir(.{}); |
| 1157 | defer tmp.cleanup(); | 1150 | defer tmp.cleanup(); |
| 1158 | 1151 | ||
| ... | @@ -1200,9 +1193,6 @@ test "Manifest with files added after initial hash work" { | ... | @@ -1200,9 +1193,6 @@ test "Manifest with files added after initial hash work" { |
| 1200 | // https://github.com/ziglang/zig/issues/5437 | 1193 | // https://github.com/ziglang/zig/issues/5437 |
| 1201 | return error.SkipZigTest; | 1194 | return error.SkipZigTest; |
| 1202 | } | 1195 | } |
| 1203 | |||
| 1204 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1205 | |||
| 1206 | var tmp = testing.tmpDir(.{}); | 1196 | var tmp = testing.tmpDir(.{}); |
| 1207 | defer tmp.cleanup(); | 1197 | defer tmp.cleanup(); |
| 1208 | 1198 |
lib/std/Build/Step/Options.zig-2| ... | @@ -296,8 +296,6 @@ const Arg = struct { | ... | @@ -296,8 +296,6 @@ const Arg = struct { |
| 296 | test Options { | 296 | test Options { |
| 297 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 297 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 298 | 298 | ||
| 299 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 300 | |||
| 301 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); | 299 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); |
| 302 | defer arena.deinit(); | 300 | defer arena.deinit(); |
| 303 | 301 |
lib/std/Thread/Condition.zig-6| ... | @@ -369,8 +369,6 @@ test "Condition - signal" { | ... | @@ -369,8 +369,6 @@ test "Condition - signal" { |
| 369 | return error.SkipZigTest; | 369 | return error.SkipZigTest; |
| 370 | } | 370 | } |
| 371 | 371 | ||
| 372 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 373 | |||
| 374 | const num_threads = 4; | 372 | const num_threads = 4; |
| 375 | 373 | ||
| 376 | const SignalTest = struct { | 374 | const SignalTest = struct { |
| ... | @@ -500,8 +498,6 @@ test "Condition - broadcasting" { | ... | @@ -500,8 +498,6 @@ test "Condition - broadcasting" { |
| 500 | return error.SkipZigTest; | 498 | return error.SkipZigTest; |
| 501 | } | 499 | } |
| 502 | 500 | ||
| 503 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 504 | |||
| 505 | const num_threads = 10; | 501 | const num_threads = 10; |
| 506 | 502 | ||
| 507 | const BroadcastTest = struct { | 503 | const BroadcastTest = struct { |
| ... | @@ -569,8 +565,6 @@ test "Condition - broadcasting - wake all threads" { | ... | @@ -569,8 +565,6 @@ test "Condition - broadcasting - wake all threads" { |
| 569 | return error.SkipZigTest; | 565 | return error.SkipZigTest; |
| 570 | } | 566 | } |
| 571 | 567 | ||
| 572 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 573 | |||
| 574 | var num_runs: usize = 1; | 568 | var num_runs: usize = 1; |
| 575 | const num_threads = 10; | 569 | const num_threads = 10; |
| 576 | 570 |
lib/std/Thread/Mutex.zig-2| ... | @@ -289,8 +289,6 @@ test "Mutex - many contended" { | ... | @@ -289,8 +289,6 @@ test "Mutex - many contended" { |
| 289 | return error.SkipZigTest; | 289 | return error.SkipZigTest; |
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 293 | |||
| 294 | const num_threads = 4; | 292 | const num_threads = 4; |
| 295 | const num_increments = 1000; | 293 | const num_increments = 1000; |
| 296 | 294 |
lib/std/Thread/RwLock.zig-2| ... | @@ -297,8 +297,6 @@ test "RwLock - concurrent access" { | ... | @@ -297,8 +297,6 @@ test "RwLock - concurrent access" { |
| 297 | if (builtin.single_threaded) | 297 | if (builtin.single_threaded) |
| 298 | return; | 298 | return; |
| 299 | 299 | ||
| 300 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 301 | |||
| 302 | const num_writers: usize = 2; | 300 | const num_writers: usize = 2; |
| 303 | const num_readers: usize = 4; | 301 | const num_readers: usize = 4; |
| 304 | const num_writes: usize = 10000; | 302 | const num_writes: usize = 10000; |
lib/std/Uri.zig-2| ... | @@ -685,8 +685,6 @@ test "Special test" { | ... | @@ -685,8 +685,6 @@ test "Special test" { |
| 685 | } | 685 | } |
| 686 | 686 | ||
| 687 | test "URI escaping" { | 687 | test "URI escaping" { |
| 688 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 689 | |||
| 690 | const input = "\\ö/ äöß ~~.adas-https://canvas:123/#ads&&sad"; | 688 | const input = "\\ö/ äöß ~~.adas-https://canvas:123/#ads&&sad"; |
| 691 | const expected = "%5C%C3%B6%2F%20%C3%A4%C3%B6%C3%9F%20~~.adas-https%3A%2F%2Fcanvas%3A123%2F%23ads%26%26sad"; | 689 | const expected = "%5C%C3%B6%2F%20%C3%A4%C3%B6%C3%9F%20~~.adas-https%3A%2F%2Fcanvas%3A123%2F%23ads%26%26sad"; |
| 692 | 690 |
lib/std/array_hash_map.zig-15| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std.zig"); | 1 | const std = @import("std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const debug = std.debug; | 2 | const debug = std.debug; |
| 4 | const assert = debug.assert; | 3 | const assert = debug.assert; |
| 5 | const testing = std.testing; | 4 | const testing = std.testing; |
| ... | @@ -2138,8 +2137,6 @@ test "ensure capacity leak" { | ... | @@ -2138,8 +2137,6 @@ test "ensure capacity leak" { |
| 2138 | } | 2137 | } |
| 2139 | 2138 | ||
| 2140 | test "big map" { | 2139 | test "big map" { |
| 2141 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2142 | |||
| 2143 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2140 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2144 | defer map.deinit(); | 2141 | defer map.deinit(); |
| 2145 | 2142 | ||
| ... | @@ -2193,8 +2190,6 @@ test "big map" { | ... | @@ -2193,8 +2190,6 @@ test "big map" { |
| 2193 | } | 2190 | } |
| 2194 | 2191 | ||
| 2195 | test "clone" { | 2192 | test "clone" { |
| 2196 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2197 | |||
| 2198 | var original = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2193 | var original = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2199 | defer original.deinit(); | 2194 | defer original.deinit(); |
| 2200 | 2195 | ||
| ... | @@ -2221,8 +2216,6 @@ test "clone" { | ... | @@ -2221,8 +2216,6 @@ test "clone" { |
| 2221 | } | 2216 | } |
| 2222 | 2217 | ||
| 2223 | test "shrink" { | 2218 | test "shrink" { |
| 2224 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2225 | |||
| 2226 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2219 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2227 | defer map.deinit(); | 2220 | defer map.deinit(); |
| 2228 | 2221 | ||
| ... | @@ -2263,8 +2256,6 @@ test "shrink" { | ... | @@ -2263,8 +2256,6 @@ test "shrink" { |
| 2263 | } | 2256 | } |
| 2264 | 2257 | ||
| 2265 | test "pop" { | 2258 | test "pop" { |
| 2266 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2267 | |||
| 2268 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2259 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2269 | defer map.deinit(); | 2260 | defer map.deinit(); |
| 2270 | 2261 | ||
| ... | @@ -2283,8 +2274,6 @@ test "pop" { | ... | @@ -2283,8 +2274,6 @@ test "pop" { |
| 2283 | } | 2274 | } |
| 2284 | 2275 | ||
| 2285 | test "popOrNull" { | 2276 | test "popOrNull" { |
| 2286 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2287 | |||
| 2288 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2277 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2289 | defer map.deinit(); | 2278 | defer map.deinit(); |
| 2290 | 2279 | ||
| ... | @@ -2305,8 +2294,6 @@ test "popOrNull" { | ... | @@ -2305,8 +2294,6 @@ test "popOrNull" { |
| 2305 | } | 2294 | } |
| 2306 | 2295 | ||
| 2307 | test "reIndex" { | 2296 | test "reIndex" { |
| 2308 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2309 | |||
| 2310 | var map = ArrayHashMap(i32, i32, AutoContext(i32), true).init(std.testing.allocator); | 2297 | var map = ArrayHashMap(i32, i32, AutoContext(i32), true).init(std.testing.allocator); |
| 2311 | defer map.deinit(); | 2298 | defer map.deinit(); |
| 2312 | 2299 | ||
| ... | @@ -2351,8 +2338,6 @@ test "auto store_hash" { | ... | @@ -2351,8 +2338,6 @@ test "auto store_hash" { |
| 2351 | } | 2338 | } |
| 2352 | 2339 | ||
| 2353 | test "sort" { | 2340 | test "sort" { |
| 2354 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2355 | |||
| 2356 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); | 2341 | var map = AutoArrayHashMap(i32, i32).init(std.testing.allocator); |
| 2357 | defer map.deinit(); | 2342 | defer map.deinit(); |
| 2358 | 2343 |
lib/std/array_list.zig-11| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std.zig"); | 1 | const std = @import("std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const debug = std.debug; | 2 | const debug = std.debug; |
| 4 | const assert = debug.assert; | 3 | const assert = debug.assert; |
| 5 | const testing = std.testing; | 4 | const testing = std.testing; |
| ... | @@ -1184,8 +1183,6 @@ test "std.ArrayList/ArrayListUnmanaged.initCapacity" { | ... | @@ -1184,8 +1183,6 @@ test "std.ArrayList/ArrayListUnmanaged.initCapacity" { |
| 1184 | } | 1183 | } |
| 1185 | 1184 | ||
| 1186 | test "std.ArrayList/ArrayListUnmanaged.clone" { | 1185 | test "std.ArrayList/ArrayListUnmanaged.clone" { |
| 1187 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1188 | |||
| 1189 | const a = testing.allocator; | 1186 | const a = testing.allocator; |
| 1190 | { | 1187 | { |
| 1191 | var array = ArrayList(i32).init(a); | 1188 | var array = ArrayList(i32).init(a); |
| ... | @@ -1227,8 +1224,6 @@ test "std.ArrayList/ArrayListUnmanaged.clone" { | ... | @@ -1227,8 +1224,6 @@ test "std.ArrayList/ArrayListUnmanaged.clone" { |
| 1227 | } | 1224 | } |
| 1228 | 1225 | ||
| 1229 | test "std.ArrayList/ArrayListUnmanaged.basic" { | 1226 | test "std.ArrayList/ArrayListUnmanaged.basic" { |
| 1230 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1231 | |||
| 1232 | const a = testing.allocator; | 1227 | const a = testing.allocator; |
| 1233 | { | 1228 | { |
| 1234 | var list = ArrayList(i32).init(a); | 1229 | var list = ArrayList(i32).init(a); |
| ... | @@ -1513,8 +1508,6 @@ test "std.ArrayList/ArrayListUnmanaged.insert" { | ... | @@ -1513,8 +1508,6 @@ test "std.ArrayList/ArrayListUnmanaged.insert" { |
| 1513 | } | 1508 | } |
| 1514 | 1509 | ||
| 1515 | test "std.ArrayList/ArrayListUnmanaged.insertSlice" { | 1510 | test "std.ArrayList/ArrayListUnmanaged.insertSlice" { |
| 1516 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1517 | |||
| 1518 | const a = testing.allocator; | 1511 | const a = testing.allocator; |
| 1519 | { | 1512 | { |
| 1520 | var list = ArrayList(i32).init(a); | 1513 | var list = ArrayList(i32).init(a); |
| ... | @@ -1561,8 +1554,6 @@ test "std.ArrayList/ArrayListUnmanaged.insertSlice" { | ... | @@ -1561,8 +1554,6 @@ test "std.ArrayList/ArrayListUnmanaged.insertSlice" { |
| 1561 | } | 1554 | } |
| 1562 | 1555 | ||
| 1563 | test "std.ArrayList/ArrayListUnmanaged.replaceRange" { | 1556 | test "std.ArrayList/ArrayListUnmanaged.replaceRange" { |
| 1564 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1565 | |||
| 1566 | var arena = std.heap.ArenaAllocator.init(testing.allocator); | 1557 | var arena = std.heap.ArenaAllocator.init(testing.allocator); |
| 1567 | defer arena.deinit(); | 1558 | defer arena.deinit(); |
| 1568 | const a = arena.allocator(); | 1559 | const a = arena.allocator(); |
| ... | @@ -1734,8 +1725,6 @@ test "shrink still sets length when resizing is disabled" { | ... | @@ -1734,8 +1725,6 @@ test "shrink still sets length when resizing is disabled" { |
| 1734 | } | 1725 | } |
| 1735 | 1726 | ||
| 1736 | test "shrinkAndFree with a copy" { | 1727 | test "shrinkAndFree with a copy" { |
| 1737 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1738 | |||
| 1739 | var failing_allocator = testing.FailingAllocator.init(testing.allocator, .{ .resize_fail_index = 0 }); | 1728 | var failing_allocator = testing.FailingAllocator.init(testing.allocator, .{ .resize_fail_index = 0 }); |
| 1740 | const a = failing_allocator.allocator(); | 1729 | const a = failing_allocator.allocator(); |
| 1741 | 1730 |
lib/std/atomic/Atomic.zig-4| ... | @@ -374,8 +374,6 @@ const atomic_rmw_orderings = [_]Ordering{ | ... | @@ -374,8 +374,6 @@ const atomic_rmw_orderings = [_]Ordering{ |
| 374 | }; | 374 | }; |
| 375 | 375 | ||
| 376 | test "Atomic.swap" { | 376 | test "Atomic.swap" { |
| 377 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 378 | |||
| 379 | inline for (atomic_rmw_orderings) |ordering| { | 377 | inline for (atomic_rmw_orderings) |ordering| { |
| 380 | var x = Atomic(usize).init(5); | 378 | var x = Atomic(usize).init(5); |
| 381 | try testing.expectEqual(x.swap(10, ordering), 5); | 379 | try testing.expectEqual(x.swap(10, ordering), 5); |
| ... | @@ -469,8 +467,6 @@ test "Atomic.fetchSub" { | ... | @@ -469,8 +467,6 @@ test "Atomic.fetchSub" { |
| 469 | } | 467 | } |
| 470 | 468 | ||
| 471 | test "Atomic.fetchMin" { | 469 | test "Atomic.fetchMin" { |
| 472 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 473 | |||
| 474 | inline for (atomicIntTypes()) |Int| { | 470 | inline for (atomicIntTypes()) |Int| { |
| 475 | inline for (atomic_rmw_orderings) |ordering| { | 471 | inline for (atomic_rmw_orderings) |ordering| { |
| 476 | var x = Atomic(Int).init(5); | 472 | var x = Atomic(Int).init(5); |
lib/std/atomic/queue.zig-2| ... | @@ -175,8 +175,6 @@ const puts_per_thread = 500; | ... | @@ -175,8 +175,6 @@ const puts_per_thread = 500; |
| 175 | const put_thread_count = 3; | 175 | const put_thread_count = 3; |
| 176 | 176 | ||
| 177 | test "std.atomic.Queue" { | 177 | test "std.atomic.Queue" { |
| 178 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 179 | |||
| 180 | var plenty_of_memory = try std.heap.page_allocator.alloc(u8, 300 * 1024); | 178 | var plenty_of_memory = try std.heap.page_allocator.alloc(u8, 300 * 1024); |
| 181 | defer std.heap.page_allocator.free(plenty_of_memory); | 179 | defer std.heap.page_allocator.free(plenty_of_memory); |
| 182 | 180 |
lib/std/base64.zig-7| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | const std = @import("std.zig"); | 1 | const std = @import("std.zig"); |
| 2 | const assert = std.debug.assert; | 2 | const assert = std.debug.assert; |
| 3 | const builtin = @import("builtin"); | ||
| 4 | const testing = std.testing; | 3 | const testing = std.testing; |
| 5 | const mem = std.mem; | 4 | const mem = std.mem; |
| 6 | 5 | ||
| ... | @@ -355,16 +354,12 @@ pub const Base64DecoderWithIgnore = struct { | ... | @@ -355,16 +354,12 @@ pub const Base64DecoderWithIgnore = struct { |
| 355 | }; | 354 | }; |
| 356 | 355 | ||
| 357 | test "base64" { | 356 | test "base64" { |
| 358 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 359 | |||
| 360 | @setEvalBranchQuota(8000); | 357 | @setEvalBranchQuota(8000); |
| 361 | try testBase64(); | 358 | try testBase64(); |
| 362 | try comptime testAllApis(standard, "comptime", "Y29tcHRpbWU="); | 359 | try comptime testAllApis(standard, "comptime", "Y29tcHRpbWU="); |
| 363 | } | 360 | } |
| 364 | 361 | ||
| 365 | test "base64 padding dest overflow" { | 362 | test "base64 padding dest overflow" { |
| 366 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 367 | |||
| 368 | const input = "foo"; | 363 | const input = "foo"; |
| 369 | 364 | ||
| 370 | var expect: [128]u8 = undefined; | 365 | var expect: [128]u8 = undefined; |
| ... | @@ -379,8 +374,6 @@ test "base64 padding dest overflow" { | ... | @@ -379,8 +374,6 @@ test "base64 padding dest overflow" { |
| 379 | } | 374 | } |
| 380 | 375 | ||
| 381 | test "base64 url_safe_no_pad" { | 376 | test "base64 url_safe_no_pad" { |
| 382 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 383 | |||
| 384 | @setEvalBranchQuota(8000); | 377 | @setEvalBranchQuota(8000); |
| 385 | try testBase64UrlSafeNoPad(); | 378 | try testBase64UrlSafeNoPad(); |
| 386 | try comptime testAllApis(url_safe_no_pad, "comptime", "Y29tcHRpbWU"); | 379 | try comptime testAllApis(url_safe_no_pad, "comptime", "Y29tcHRpbWU"); |
lib/std/bit_set.zig+1-14| ... | @@ -33,7 +33,6 @@ | ... | @@ -33,7 +33,6 @@ |
| 33 | const std = @import("std.zig"); | 33 | const std = @import("std.zig"); |
| 34 | const assert = std.debug.assert; | 34 | const assert = std.debug.assert; |
| 35 | const Allocator = std.mem.Allocator; | 35 | const Allocator = std.mem.Allocator; |
| 36 | const builtin = @import("builtin"); | ||
| 37 | 36 | ||
| 38 | /// Returns the optimal static bit set type for the specified number | 37 | /// Returns the optimal static bit set type for the specified number |
| 39 | /// of elements: either `IntegerBitSet` or `ArrayBitSet`, | 38 | /// of elements: either `IntegerBitSet` or `ArrayBitSet`, |
| ... | @@ -1637,10 +1636,7 @@ fn testStaticBitSet(comptime Set: type) !void { | ... | @@ -1637,10 +1636,7 @@ fn testStaticBitSet(comptime Set: type) !void { |
| 1637 | } | 1636 | } |
| 1638 | 1637 | ||
| 1639 | test "IntegerBitSet" { | 1638 | test "IntegerBitSet" { |
| 1640 | switch (builtin.zig_backend) { | 1639 | if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest; |
| 1641 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1642 | else => {}, | ||
| 1643 | } | ||
| 1644 | 1640 | ||
| 1645 | try testStaticBitSet(IntegerBitSet(0)); | 1641 | try testStaticBitSet(IntegerBitSet(0)); |
| 1646 | try testStaticBitSet(IntegerBitSet(1)); | 1642 | try testStaticBitSet(IntegerBitSet(1)); |
| ... | @@ -1653,11 +1649,6 @@ test "IntegerBitSet" { | ... | @@ -1653,11 +1649,6 @@ test "IntegerBitSet" { |
| 1653 | } | 1649 | } |
| 1654 | 1650 | ||
| 1655 | test "ArrayBitSet" { | 1651 | test "ArrayBitSet" { |
| 1656 | switch (builtin.zig_backend) { | ||
| 1657 | .stage2_x86_64 => return error.SkipZigTest, | ||
| 1658 | else => {}, | ||
| 1659 | } | ||
| 1660 | |||
| 1661 | inline for (.{ 0, 1, 2, 31, 32, 33, 63, 64, 65, 254, 500, 3000 }) |size| { | 1652 | inline for (.{ 0, 1, 2, 31, 32, 33, 63, 64, 65, 254, 500, 3000 }) |size| { |
| 1662 | try testStaticBitSet(ArrayBitSet(u8, size)); | 1653 | try testStaticBitSet(ArrayBitSet(u8, size)); |
| 1663 | try testStaticBitSet(ArrayBitSet(u16, size)); | 1654 | try testStaticBitSet(ArrayBitSet(u16, size)); |
| ... | @@ -1668,8 +1659,6 @@ test "ArrayBitSet" { | ... | @@ -1668,8 +1659,6 @@ test "ArrayBitSet" { |
| 1668 | } | 1659 | } |
| 1669 | 1660 | ||
| 1670 | test "DynamicBitSetUnmanaged" { | 1661 | test "DynamicBitSetUnmanaged" { |
| 1671 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1672 | |||
| 1673 | const allocator = std.testing.allocator; | 1662 | const allocator = std.testing.allocator; |
| 1674 | var a = try DynamicBitSetUnmanaged.initEmpty(allocator, 300); | 1663 | var a = try DynamicBitSetUnmanaged.initEmpty(allocator, 300); |
| 1675 | try testing.expectEqual(@as(usize, 0), a.count()); | 1664 | try testing.expectEqual(@as(usize, 0), a.count()); |
| ... | @@ -1723,8 +1712,6 @@ test "DynamicBitSetUnmanaged" { | ... | @@ -1723,8 +1712,6 @@ test "DynamicBitSetUnmanaged" { |
| 1723 | } | 1712 | } |
| 1724 | 1713 | ||
| 1725 | test "DynamicBitSet" { | 1714 | test "DynamicBitSet" { |
| 1726 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1727 | |||
| 1728 | const allocator = std.testing.allocator; | 1715 | const allocator = std.testing.allocator; |
| 1729 | var a = try DynamicBitSet.initEmpty(allocator, 300); | 1716 | var a = try DynamicBitSet.initEmpty(allocator, 300); |
| 1730 | try testing.expectEqual(@as(usize, 0), a.count()); | 1717 | try testing.expectEqual(@as(usize, 0), a.count()); |
lib/std/compress/deflate/compressor.zig-2| ... | @@ -1069,8 +1069,6 @@ var deflate_tests = [_]DeflateTest{ | ... | @@ -1069,8 +1069,6 @@ var deflate_tests = [_]DeflateTest{ |
| 1069 | }; | 1069 | }; |
| 1070 | 1070 | ||
| 1071 | test "deflate" { | 1071 | test "deflate" { |
| 1072 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1073 | |||
| 1074 | for (deflate_tests) |dt| { | 1072 | for (deflate_tests) |dt| { |
| 1075 | var output = ArrayList(u8).init(testing.allocator); | 1073 | var output = ArrayList(u8).init(testing.allocator); |
| 1076 | defer output.deinit(); | 1074 | defer output.deinit(); |
lib/std/compress/deflate/compressor_test.zig-18| ... | @@ -154,8 +154,6 @@ fn testToFromWithLimit(input: []const u8, limit: [11]u32) !void { | ... | @@ -154,8 +154,6 @@ fn testToFromWithLimit(input: []const u8, limit: [11]u32) !void { |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | test "deflate/inflate" { | 156 | test "deflate/inflate" { |
| 157 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 158 | |||
| 159 | var limits = [_]u32{0} ** 11; | 157 | var limits = [_]u32{0} ** 11; |
| 160 | 158 | ||
| 161 | var test0 = [_]u8{}; | 159 | var test0 = [_]u8{}; |
| ... | @@ -180,8 +178,6 @@ test "deflate/inflate" { | ... | @@ -180,8 +178,6 @@ test "deflate/inflate" { |
| 180 | } | 178 | } |
| 181 | 179 | ||
| 182 | test "very long sparse chunk" { | 180 | test "very long sparse chunk" { |
| 183 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 184 | |||
| 185 | // A SparseReader returns a stream consisting of 0s ending with 65,536 (1<<16) 1s. | 181 | // A SparseReader returns a stream consisting of 0s ending with 65,536 (1<<16) 1s. |
| 186 | // This tests missing hash references in a very large input. | 182 | // This tests missing hash references in a very large input. |
| 187 | const SparseReader = struct { | 183 | const SparseReader = struct { |
| ... | @@ -243,8 +239,6 @@ test "very long sparse chunk" { | ... | @@ -243,8 +239,6 @@ test "very long sparse chunk" { |
| 243 | } | 239 | } |
| 244 | 240 | ||
| 245 | test "compressor reset" { | 241 | test "compressor reset" { |
| 246 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 247 | |||
| 248 | for (std.enums.values(deflate.Compression)) |c| { | 242 | for (std.enums.values(deflate.Compression)) |c| { |
| 249 | try testWriterReset(c, null); | 243 | try testWriterReset(c, null); |
| 250 | try testWriterReset(c, "dict"); | 244 | try testWriterReset(c, "dict"); |
| ... | @@ -295,8 +289,6 @@ fn testWriterReset(level: deflate.Compression, dict: ?[]const u8) !void { | ... | @@ -295,8 +289,6 @@ fn testWriterReset(level: deflate.Compression, dict: ?[]const u8) !void { |
| 295 | } | 289 | } |
| 296 | 290 | ||
| 297 | test "decompressor dictionary" { | 291 | test "decompressor dictionary" { |
| 298 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 299 | |||
| 300 | const dict = "hello world"; // dictionary | 292 | const dict = "hello world"; // dictionary |
| 301 | const text = "hello again world"; | 293 | const text = "hello again world"; |
| 302 | 294 | ||
| ... | @@ -337,8 +329,6 @@ test "decompressor dictionary" { | ... | @@ -337,8 +329,6 @@ test "decompressor dictionary" { |
| 337 | } | 329 | } |
| 338 | 330 | ||
| 339 | test "compressor dictionary" { | 331 | test "compressor dictionary" { |
| 340 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 341 | |||
| 342 | const dict = "hello world"; | 332 | const dict = "hello world"; |
| 343 | const text = "hello again world"; | 333 | const text = "hello again world"; |
| 344 | 334 | ||
| ... | @@ -385,8 +375,6 @@ test "compressor dictionary" { | ... | @@ -385,8 +375,6 @@ test "compressor dictionary" { |
| 385 | // Update the hash for best_speed only if d.index < d.maxInsertIndex | 375 | // Update the hash for best_speed only if d.index < d.maxInsertIndex |
| 386 | // See https://golang.org/issue/2508 | 376 | // See https://golang.org/issue/2508 |
| 387 | test "Go non-regression test for 2508" { | 377 | test "Go non-regression test for 2508" { |
| 388 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 389 | |||
| 390 | var comp = try compressor( | 378 | var comp = try compressor( |
| 391 | testing.allocator, | 379 | testing.allocator, |
| 392 | io.null_writer, | 380 | io.null_writer, |
| ... | @@ -404,8 +392,6 @@ test "Go non-regression test for 2508" { | ... | @@ -404,8 +392,6 @@ test "Go non-regression test for 2508" { |
| 404 | } | 392 | } |
| 405 | 393 | ||
| 406 | test "deflate/inflate string" { | 394 | test "deflate/inflate string" { |
| 407 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 408 | |||
| 409 | const StringTest = struct { | 395 | const StringTest = struct { |
| 410 | filename: []const u8, | 396 | filename: []const u8, |
| 411 | limit: [11]u32, | 397 | limit: [11]u32, |
| ... | @@ -453,8 +439,6 @@ test "deflate/inflate string" { | ... | @@ -453,8 +439,6 @@ test "deflate/inflate string" { |
| 453 | } | 439 | } |
| 454 | 440 | ||
| 455 | test "inflate reset" { | 441 | test "inflate reset" { |
| 456 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 457 | |||
| 458 | const strings = [_][]const u8{ | 442 | const strings = [_][]const u8{ |
| 459 | "lorem ipsum izzle fo rizzle", | 443 | "lorem ipsum izzle fo rizzle", |
| 460 | "the quick brown fox jumped over", | 444 | "the quick brown fox jumped over", |
| ... | @@ -501,8 +485,6 @@ test "inflate reset" { | ... | @@ -501,8 +485,6 @@ test "inflate reset" { |
| 501 | } | 485 | } |
| 502 | 486 | ||
| 503 | test "inflate reset dictionary" { | 487 | test "inflate reset dictionary" { |
| 504 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 505 | |||
| 506 | const dict = "the lorem fox"; | 488 | const dict = "the lorem fox"; |
| 507 | const strings = [_][]const u8{ | 489 | const strings = [_][]const u8{ |
| 508 | "lorem ipsum izzle fo rizzle", | 490 | "lorem ipsum izzle fo rizzle", |
lib/std/compress/deflate/deflate_fast.zig-2| ... | @@ -649,8 +649,6 @@ test "best speed shift offsets" { | ... | @@ -649,8 +649,6 @@ test "best speed shift offsets" { |
| 649 | } | 649 | } |
| 650 | 650 | ||
| 651 | test "best speed reset" { | 651 | test "best speed reset" { |
| 652 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 653 | |||
| 654 | // test that encoding is consistent across a warparound of the table offset. | 652 | // test that encoding is consistent across a warparound of the table offset. |
| 655 | // See https://github.com/golang/go/issues/34121 | 653 | // See https://github.com/golang/go/issues/34121 |
| 656 | const fmt = std.fmt; | 654 | const fmt = std.fmt; |
lib/std/compress/deflate/deflate_fast_test.zig-5| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const expect = std.testing.expect; | 2 | const expect = std.testing.expect; |
| 4 | const io = std.io; | 3 | const io = std.io; |
| 5 | const mem = std.mem; | 4 | const mem = std.mem; |
| ... | @@ -12,8 +11,6 @@ const inflate = @import("decompressor.zig"); | ... | @@ -12,8 +11,6 @@ const inflate = @import("decompressor.zig"); |
| 12 | const deflate_const = @import("deflate_const.zig"); | 11 | const deflate_const = @import("deflate_const.zig"); |
| 13 | 12 | ||
| 14 | test "best speed" { | 13 | test "best speed" { |
| 15 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 16 | |||
| 17 | // Tests that round-tripping through deflate and then inflate recovers the original input. | 14 | // Tests that round-tripping through deflate and then inflate recovers the original input. |
| 18 | // The Write sizes are near the thresholds in the compressor.encSpeed method (0, 16, 128), as well | 15 | // The Write sizes are near the thresholds in the compressor.encSpeed method (0, 16, 128), as well |
| 19 | // as near `deflate_const.max_store_block_size` (65535). | 16 | // as near `deflate_const.max_store_block_size` (65535). |
| ... | @@ -96,8 +93,6 @@ test "best speed" { | ... | @@ -96,8 +93,6 @@ test "best speed" { |
| 96 | } | 93 | } |
| 97 | 94 | ||
| 98 | test "best speed max match offset" { | 95 | test "best speed max match offset" { |
| 99 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 100 | |||
| 101 | const abc = "abcdefgh"; | 96 | const abc = "abcdefgh"; |
| 102 | const xyz = "stuvwxyz"; | 97 | const xyz = "stuvwxyz"; |
| 103 | const input_margin = 16 - 1; | 98 | const input_margin = 16 - 1; |
lib/std/compress/deflate/huffman_bit_writer.zig-6| ... | @@ -845,8 +845,6 @@ const testing = std.testing; | ... | @@ -845,8 +845,6 @@ const testing = std.testing; |
| 845 | const ArrayList = std.ArrayList; | 845 | const ArrayList = std.ArrayList; |
| 846 | 846 | ||
| 847 | test "writeBlockHuff" { | 847 | test "writeBlockHuff" { |
| 848 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 849 | |||
| 850 | // Tests huffman encoding against reference files to detect possible regressions. | 848 | // Tests huffman encoding against reference files to detect possible regressions. |
| 851 | // If encoding/bit allocation changes you can regenerate these files | 849 | // If encoding/bit allocation changes you can regenerate these files |
| 852 | 850 | ||
| ... | @@ -1571,8 +1569,6 @@ const TestType = enum { | ... | @@ -1571,8 +1569,6 @@ const TestType = enum { |
| 1571 | }; | 1569 | }; |
| 1572 | 1570 | ||
| 1573 | test "writeBlock" { | 1571 | test "writeBlock" { |
| 1574 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1575 | |||
| 1576 | // tests if the writeBlock encoding has changed. | 1572 | // tests if the writeBlock encoding has changed. |
| 1577 | 1573 | ||
| 1578 | const ttype: TestType = .write_block; | 1574 | const ttype: TestType = .write_block; |
| ... | @@ -1588,8 +1584,6 @@ test "writeBlock" { | ... | @@ -1588,8 +1584,6 @@ test "writeBlock" { |
| 1588 | } | 1584 | } |
| 1589 | 1585 | ||
| 1590 | test "writeBlockDynamic" { | 1586 | test "writeBlockDynamic" { |
| 1591 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1592 | |||
| 1593 | // tests if the writeBlockDynamic encoding has changed. | 1587 | // tests if the writeBlockDynamic encoding has changed. |
| 1594 | 1588 | ||
| 1595 | const ttype: TestType = .write_dyn_block; | 1589 | const ttype: TestType = .write_dyn_block; |
lib/std/compress/deflate/huffman_code.zig-2| ... | @@ -360,8 +360,6 @@ fn byFreq(context: void, a: LiteralNode, b: LiteralNode) bool { | ... | @@ -360,8 +360,6 @@ fn byFreq(context: void, a: LiteralNode, b: LiteralNode) bool { |
| 360 | } | 360 | } |
| 361 | 361 | ||
| 362 | test "generate a Huffman code from an array of frequencies" { | 362 | test "generate a Huffman code from an array of frequencies" { |
| 363 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 364 | |||
| 365 | var freqs: [19]u16 = [_]u16{ | 363 | var freqs: [19]u16 = [_]u16{ |
| 366 | 8, // 0 | 364 | 8, // 0 |
| 367 | 1, // 1 | 365 | 1, // 1 |
lib/std/compress/gzip.zig-2| ... | @@ -174,8 +174,6 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { | ... | @@ -174,8 +174,6 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { |
| 174 | // https://tools.ietf.org/rfc/rfc1952.txt length=25037 bytes | 174 | // https://tools.ietf.org/rfc/rfc1952.txt length=25037 bytes |
| 175 | // SHA256=164ef0897b4cbec63abf1b57f069f3599bd0fb7c72c2a4dee21bd7e03ec9af67 | 175 | // SHA256=164ef0897b4cbec63abf1b57f069f3599bd0fb7c72c2a4dee21bd7e03ec9af67 |
| 176 | test "compressed data" { | 176 | test "compressed data" { |
| 177 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 178 | |||
| 179 | try testReader( | 177 | try testReader( |
| 180 | @embedFile("testdata/rfc1952.txt.gz"), | 178 | @embedFile("testdata/rfc1952.txt.gz"), |
| 181 | @embedFile("testdata/rfc1952.txt"), | 179 | @embedFile("testdata/rfc1952.txt"), |
lib/std/compress/lzma/test.zig-17| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("../../std.zig"); | 1 | const std = @import("../../std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const lzma = @import("../lzma.zig"); | 2 | const lzma = @import("../lzma.zig"); |
| 4 | 3 | ||
| 5 | fn testDecompress(compressed: []const u8) ![]u8 { | 4 | fn testDecompress(compressed: []const u8) ![]u8 { |
| ... | @@ -23,8 +22,6 @@ fn testDecompressError(expected: anyerror, compressed: []const u8) !void { | ... | @@ -23,8 +22,6 @@ fn testDecompressError(expected: anyerror, compressed: []const u8) !void { |
| 23 | } | 22 | } |
| 24 | 23 | ||
| 25 | test "LZMA: decompress empty world" { | 24 | test "LZMA: decompress empty world" { |
| 26 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 27 | |||
| 28 | try testDecompressEqual( | 25 | try testDecompressEqual( |
| 29 | "", | 26 | "", |
| 30 | &[_]u8{ | 27 | &[_]u8{ |
| ... | @@ -35,8 +32,6 @@ test "LZMA: decompress empty world" { | ... | @@ -35,8 +32,6 @@ test "LZMA: decompress empty world" { |
| 35 | } | 32 | } |
| 36 | 33 | ||
| 37 | test "LZMA: decompress hello world" { | 34 | test "LZMA: decompress hello world" { |
| 38 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 39 | |||
| 40 | try testDecompressEqual( | 35 | try testDecompressEqual( |
| 41 | "Hello world\n", | 36 | "Hello world\n", |
| 42 | &[_]u8{ | 37 | &[_]u8{ |
| ... | @@ -48,8 +43,6 @@ test "LZMA: decompress hello world" { | ... | @@ -48,8 +43,6 @@ test "LZMA: decompress hello world" { |
| 48 | } | 43 | } |
| 49 | 44 | ||
| 50 | test "LZMA: decompress huge dict" { | 45 | test "LZMA: decompress huge dict" { |
| 51 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 52 | |||
| 53 | try testDecompressEqual( | 46 | try testDecompressEqual( |
| 54 | "Hello world\n", | 47 | "Hello world\n", |
| 55 | &[_]u8{ | 48 | &[_]u8{ |
| ... | @@ -61,8 +54,6 @@ test "LZMA: decompress huge dict" { | ... | @@ -61,8 +54,6 @@ test "LZMA: decompress huge dict" { |
| 61 | } | 54 | } |
| 62 | 55 | ||
| 63 | test "LZMA: unknown size with end of payload marker" { | 56 | test "LZMA: unknown size with end of payload marker" { |
| 64 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 65 | |||
| 66 | try testDecompressEqual( | 57 | try testDecompressEqual( |
| 67 | "Hello\nWorld!\n", | 58 | "Hello\nWorld!\n", |
| 68 | @embedFile("testdata/good-unknown_size-with_eopm.lzma"), | 59 | @embedFile("testdata/good-unknown_size-with_eopm.lzma"), |
| ... | @@ -70,8 +61,6 @@ test "LZMA: unknown size with end of payload marker" { | ... | @@ -70,8 +61,6 @@ test "LZMA: unknown size with end of payload marker" { |
| 70 | } | 61 | } |
| 71 | 62 | ||
| 72 | test "LZMA: known size without end of payload marker" { | 63 | test "LZMA: known size without end of payload marker" { |
| 73 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 74 | |||
| 75 | try testDecompressEqual( | 64 | try testDecompressEqual( |
| 76 | "Hello\nWorld!\n", | 65 | "Hello\nWorld!\n", |
| 77 | @embedFile("testdata/good-known_size-without_eopm.lzma"), | 66 | @embedFile("testdata/good-known_size-without_eopm.lzma"), |
| ... | @@ -79,8 +68,6 @@ test "LZMA: known size without end of payload marker" { | ... | @@ -79,8 +68,6 @@ test "LZMA: known size without end of payload marker" { |
| 79 | } | 68 | } |
| 80 | 69 | ||
| 81 | test "LZMA: known size with end of payload marker" { | 70 | test "LZMA: known size with end of payload marker" { |
| 82 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 83 | |||
| 84 | try testDecompressEqual( | 71 | try testDecompressEqual( |
| 85 | "Hello\nWorld!\n", | 72 | "Hello\nWorld!\n", |
| 86 | @embedFile("testdata/good-known_size-with_eopm.lzma"), | 73 | @embedFile("testdata/good-known_size-with_eopm.lzma"), |
| ... | @@ -88,8 +75,6 @@ test "LZMA: known size with end of payload marker" { | ... | @@ -88,8 +75,6 @@ test "LZMA: known size with end of payload marker" { |
| 88 | } | 75 | } |
| 89 | 76 | ||
| 90 | test "LZMA: too big uncompressed size in header" { | 77 | test "LZMA: too big uncompressed size in header" { |
| 91 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 92 | |||
| 93 | try testDecompressError( | 78 | try testDecompressError( |
| 94 | error.CorruptInput, | 79 | error.CorruptInput, |
| 95 | @embedFile("testdata/bad-too_big_size-with_eopm.lzma"), | 80 | @embedFile("testdata/bad-too_big_size-with_eopm.lzma"), |
| ... | @@ -97,8 +82,6 @@ test "LZMA: too big uncompressed size in header" { | ... | @@ -97,8 +82,6 @@ test "LZMA: too big uncompressed size in header" { |
| 97 | } | 82 | } |
| 98 | 83 | ||
| 99 | test "LZMA: too small uncompressed size in header" { | 84 | test "LZMA: too small uncompressed size in header" { |
| 100 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 101 | |||
| 102 | try testDecompressError( | 85 | try testDecompressError( |
| 103 | error.CorruptInput, | 86 | error.CorruptInput, |
| 104 | @embedFile("testdata/bad-too_small_size-without_eopm-3.lzma"), | 87 | @embedFile("testdata/bad-too_small_size-without_eopm-3.lzma"), |
lib/std/compress/lzma/vec2d.zig-2| ... | @@ -50,8 +50,6 @@ const expectEqualSlices = std.testing.expectEqualSlices; | ... | @@ -50,8 +50,6 @@ const expectEqualSlices = std.testing.expectEqualSlices; |
| 50 | const expectError = std.testing.expectError; | 50 | const expectError = std.testing.expectError; |
| 51 | 51 | ||
| 52 | test "Vec2D.init" { | 52 | test "Vec2D.init" { |
| 53 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 54 | |||
| 55 | const allocator = testing.allocator; | 53 | const allocator = testing.allocator; |
| 56 | var vec2d = try Vec2D(i32).init(allocator, 1, .{ 2, 3 }); | 54 | var vec2d = try Vec2D(i32).init(allocator, 1, .{ 2, 3 }); |
| 57 | defer vec2d.deinit(allocator); | 55 | defer vec2d.deinit(allocator); |
lib/std/compress/xz/test.zig-2| ... | @@ -19,8 +19,6 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { | ... | @@ -19,8 +19,6 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | test "compressed data" { | 21 | test "compressed data" { |
| 22 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 23 | |||
| 24 | try testReader(@embedFile("testdata/good-0-empty.xz"), ""); | 22 | try testReader(@embedFile("testdata/good-0-empty.xz"), ""); |
| 25 | 23 | ||
| 26 | inline for ([_][]const u8{ | 24 | inline for ([_][]const u8{ |
lib/std/compress/zlib.zig-4| ... | @@ -199,8 +199,6 @@ fn testDecompress(data: []const u8, expected: []const u8) !void { | ... | @@ -199,8 +199,6 @@ fn testDecompress(data: []const u8, expected: []const u8) !void { |
| 199 | // https://tools.ietf.org/rfc/rfc1951.txt length=36944 bytes | 199 | // https://tools.ietf.org/rfc/rfc1951.txt length=36944 bytes |
| 200 | // SHA256=5ebf4b5b7fe1c3a0c0ab9aa3ac8c0f3853a7dc484905e76e03b0b0f301350009 | 200 | // SHA256=5ebf4b5b7fe1c3a0c0ab9aa3ac8c0f3853a7dc484905e76e03b0b0f301350009 |
| 201 | test "compressed data" { | 201 | test "compressed data" { |
| 202 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 203 | |||
| 204 | const rfc1951_txt = @embedFile("testdata/rfc1951.txt"); | 202 | const rfc1951_txt = @embedFile("testdata/rfc1951.txt"); |
| 205 | 203 | ||
| 206 | // Compressed with compression level = 0 | 204 | // Compressed with compression level = 0 |
| ... | @@ -266,8 +264,6 @@ test "sanity checks" { | ... | @@ -266,8 +264,6 @@ test "sanity checks" { |
| 266 | } | 264 | } |
| 267 | 265 | ||
| 268 | test "compress data" { | 266 | test "compress data" { |
| 269 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 270 | |||
| 271 | const allocator = testing.allocator; | 267 | const allocator = testing.allocator; |
| 272 | const rfc1951_txt = @embedFile("testdata/rfc1951.txt"); | 268 | const rfc1951_txt = @embedFile("testdata/rfc1951.txt"); |
| 273 | 269 |
lib/std/compress/zstandard.zig-2| ... | @@ -264,8 +264,6 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { | ... | @@ -264,8 +264,6 @@ fn testReader(data: []const u8, comptime expected: []const u8) !void { |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | test "zstandard decompression" { | 266 | test "zstandard decompression" { |
| 267 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 268 | |||
| 269 | const uncompressed = @embedFile("testdata/rfc8478.txt"); | 267 | const uncompressed = @embedFile("testdata/rfc8478.txt"); |
| 270 | const compressed3 = @embedFile("testdata/rfc8478.txt.zst.3"); | 268 | const compressed3 = @embedFile("testdata/rfc8478.txt.zst.3"); |
| 271 | const compressed19 = @embedFile("testdata/rfc8478.txt.zst.19"); | 269 | const compressed19 = @embedFile("testdata/rfc8478.txt.zst.19"); |
lib/std/crypto.zig-2| ... | @@ -314,8 +314,6 @@ test "CSPRNG" { | ... | @@ -314,8 +314,6 @@ test "CSPRNG" { |
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | test "issue #4532: no index out of bounds" { | 316 | test "issue #4532: no index out of bounds" { |
| 317 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 318 | |||
| 319 | const types = [_]type{ | 317 | const types = [_]type{ |
| 320 | hash.Md5, | 318 | hash.Md5, |
| 321 | hash.Sha1, | 319 | hash.Sha1, |
lib/std/crypto/25519/curve25519.zig-5| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const crypto = std.crypto; | 2 | const crypto = std.crypto; |
| 4 | 3 | ||
| 5 | const IdentityElementError = crypto.errors.IdentityElementError; | 4 | const IdentityElementError = crypto.errors.IdentityElementError; |
| ... | @@ -112,8 +111,6 @@ pub const Curve25519 = struct { | ... | @@ -112,8 +111,6 @@ pub const Curve25519 = struct { |
| 112 | }; | 111 | }; |
| 113 | 112 | ||
| 114 | test "curve25519" { | 113 | test "curve25519" { |
| 115 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 116 | |||
| 117 | var s = [32]u8{ 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8 }; | 114 | var s = [32]u8{ 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8 }; |
| 118 | const p = try Curve25519.basePoint.clampedMul(s); | 115 | const p = try Curve25519.basePoint.clampedMul(s); |
| 119 | try p.rejectIdentity(); | 116 | try p.rejectIdentity(); |
| ... | @@ -128,8 +125,6 @@ test "curve25519" { | ... | @@ -128,8 +125,6 @@ test "curve25519" { |
| 128 | } | 125 | } |
| 129 | 126 | ||
| 130 | test "curve25519 small order check" { | 127 | test "curve25519 small order check" { |
| 131 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 132 | |||
| 133 | var s: [32]u8 = [_]u8{1} ++ [_]u8{0} ** 31; | 128 | var s: [32]u8 = [_]u8{1} ++ [_]u8{0} ** 31; |
| 134 | const small_order_ss: [7][32]u8 = .{ | 129 | const small_order_ss: [7][32]u8 = .{ |
| 135 | .{ | 130 | .{ |
lib/std/crypto/25519/ed25519.zig+1-15| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | const std = @import("std"); | ||
| 2 | const builtin = @import("builtin"); | 1 | const builtin = @import("builtin"); |
| 2 | const std = @import("std"); | ||
| 3 | const crypto = std.crypto; | 3 | const crypto = std.crypto; |
| 4 | const debug = std.debug; | 4 | const debug = std.debug; |
| 5 | const fmt = std.fmt; | 5 | const fmt = std.fmt; |
| ... | @@ -484,8 +484,6 @@ pub const Ed25519 = struct { | ... | @@ -484,8 +484,6 @@ pub const Ed25519 = struct { |
| 484 | }; | 484 | }; |
| 485 | 485 | ||
| 486 | test "ed25519 key pair creation" { | 486 | test "ed25519 key pair creation" { |
| 487 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 488 | |||
| 489 | var seed: [32]u8 = undefined; | 487 | var seed: [32]u8 = undefined; |
| 490 | _ = try fmt.hexToBytes(seed[0..], "8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166"); | 488 | _ = try fmt.hexToBytes(seed[0..], "8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166"); |
| 491 | const key_pair = try Ed25519.KeyPair.create(seed); | 489 | const key_pair = try Ed25519.KeyPair.create(seed); |
| ... | @@ -495,8 +493,6 @@ test "ed25519 key pair creation" { | ... | @@ -495,8 +493,6 @@ test "ed25519 key pair creation" { |
| 495 | } | 493 | } |
| 496 | 494 | ||
| 497 | test "ed25519 signature" { | 495 | test "ed25519 signature" { |
| 498 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 499 | |||
| 500 | var seed: [32]u8 = undefined; | 496 | var seed: [32]u8 = undefined; |
| 501 | _ = try fmt.hexToBytes(seed[0..], "8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166"); | 497 | _ = try fmt.hexToBytes(seed[0..], "8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166"); |
| 502 | const key_pair = try Ed25519.KeyPair.create(seed); | 498 | const key_pair = try Ed25519.KeyPair.create(seed); |
| ... | @@ -509,8 +505,6 @@ test "ed25519 signature" { | ... | @@ -509,8 +505,6 @@ test "ed25519 signature" { |
| 509 | } | 505 | } |
| 510 | 506 | ||
| 511 | test "ed25519 batch verification" { | 507 | test "ed25519 batch verification" { |
| 512 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 513 | |||
| 514 | var i: usize = 0; | 508 | var i: usize = 0; |
| 515 | while (i < 100) : (i += 1) { | 509 | while (i < 100) : (i += 1) { |
| 516 | const key_pair = try Ed25519.KeyPair.create(null); | 510 | const key_pair = try Ed25519.KeyPair.create(null); |
| ... | @@ -540,8 +534,6 @@ test "ed25519 batch verification" { | ... | @@ -540,8 +534,6 @@ test "ed25519 batch verification" { |
| 540 | } | 534 | } |
| 541 | 535 | ||
| 542 | test "ed25519 test vectors" { | 536 | test "ed25519 test vectors" { |
| 543 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 544 | |||
| 545 | const Vec = struct { | 537 | const Vec = struct { |
| 546 | msg_hex: *const [64:0]u8, | 538 | msg_hex: *const [64:0]u8, |
| 547 | public_key_hex: *const [64:0]u8, | 539 | public_key_hex: *const [64:0]u8, |
| ... | @@ -644,8 +636,6 @@ test "ed25519 test vectors" { | ... | @@ -644,8 +636,6 @@ test "ed25519 test vectors" { |
| 644 | } | 636 | } |
| 645 | 637 | ||
| 646 | test "ed25519 with blind keys" { | 638 | test "ed25519 with blind keys" { |
| 647 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 648 | |||
| 649 | const BlindKeyPair = Ed25519.key_blinding.BlindKeyPair; | 639 | const BlindKeyPair = Ed25519.key_blinding.BlindKeyPair; |
| 650 | 640 | ||
| 651 | // Create a standard Ed25519 key pair | 641 | // Create a standard Ed25519 key pair |
| ... | @@ -669,8 +659,6 @@ test "ed25519 with blind keys" { | ... | @@ -669,8 +659,6 @@ test "ed25519 with blind keys" { |
| 669 | } | 659 | } |
| 670 | 660 | ||
| 671 | test "ed25519 signatures with streaming" { | 661 | test "ed25519 signatures with streaming" { |
| 672 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 673 | |||
| 674 | const kp = try Ed25519.KeyPair.create(null); | 662 | const kp = try Ed25519.KeyPair.create(null); |
| 675 | 663 | ||
| 676 | var signer = try kp.signer(null); | 664 | var signer = try kp.signer(null); |
| ... | @@ -687,8 +675,6 @@ test "ed25519 signatures with streaming" { | ... | @@ -687,8 +675,6 @@ test "ed25519 signatures with streaming" { |
| 687 | } | 675 | } |
| 688 | 676 | ||
| 689 | test "ed25519 key pair from secret key" { | 677 | test "ed25519 key pair from secret key" { |
| 690 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 691 | |||
| 692 | const kp = try Ed25519.KeyPair.create(null); | 678 | const kp = try Ed25519.KeyPair.create(null); |
| 693 | const kp2 = try Ed25519.KeyPair.fromSecretKey(kp.secret_key); | 679 | const kp2 = try Ed25519.KeyPair.fromSecretKey(kp.secret_key); |
| 694 | try std.testing.expectEqualSlices(u8, &kp.secret_key.toBytes(), &kp2.secret_key.toBytes()); | 680 | try std.testing.expectEqualSlices(u8, &kp.secret_key.toBytes(), &kp2.secret_key.toBytes()); |
lib/std/crypto/25519/edwards25519.zig-11| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const crypto = std.crypto; | 2 | const crypto = std.crypto; |
| 4 | const debug = std.debug; | 3 | const debug = std.debug; |
| 5 | const fmt = std.fmt; | 4 | const fmt = std.fmt; |
| ... | @@ -495,8 +494,6 @@ pub const Edwards25519 = struct { | ... | @@ -495,8 +494,6 @@ pub const Edwards25519 = struct { |
| 495 | const htest = @import("../test.zig"); | 494 | const htest = @import("../test.zig"); |
| 496 | 495 | ||
| 497 | test "edwards25519 packing/unpacking" { | 496 | test "edwards25519 packing/unpacking" { |
| 498 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 499 | |||
| 500 | const s = [_]u8{170} ++ [_]u8{0} ** 31; | 497 | const s = [_]u8{170} ++ [_]u8{0} ** 31; |
| 501 | var b = Edwards25519.basePoint; | 498 | var b = Edwards25519.basePoint; |
| 502 | const pk = try b.mul(s); | 499 | const pk = try b.mul(s); |
| ... | @@ -533,8 +530,6 @@ test "edwards25519 packing/unpacking" { | ... | @@ -533,8 +530,6 @@ test "edwards25519 packing/unpacking" { |
| 533 | } | 530 | } |
| 534 | 531 | ||
| 535 | test "edwards25519 point addition/subtraction" { | 532 | test "edwards25519 point addition/subtraction" { |
| 536 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 537 | |||
| 538 | var s1: [32]u8 = undefined; | 533 | var s1: [32]u8 = undefined; |
| 539 | var s2: [32]u8 = undefined; | 534 | var s2: [32]u8 = undefined; |
| 540 | crypto.random.bytes(&s1); | 535 | crypto.random.bytes(&s1); |
| ... | @@ -549,8 +544,6 @@ test "edwards25519 point addition/subtraction" { | ... | @@ -549,8 +544,6 @@ test "edwards25519 point addition/subtraction" { |
| 549 | } | 544 | } |
| 550 | 545 | ||
| 551 | test "edwards25519 uniform-to-point" { | 546 | test "edwards25519 uniform-to-point" { |
| 552 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 553 | |||
| 554 | var r = [32]u8{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; | 547 | var r = [32]u8{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; |
| 555 | var p = Edwards25519.fromUniform(r); | 548 | var p = Edwards25519.fromUniform(r); |
| 556 | try htest.assertEqual("0691eee3cf70a0056df6bfa03120635636581b5c4ea571dfc680f78c7e0b4137", p.toBytes()[0..]); | 549 | try htest.assertEqual("0691eee3cf70a0056df6bfa03120635636581b5c4ea571dfc680f78c7e0b4137", p.toBytes()[0..]); |
| ... | @@ -562,8 +555,6 @@ test "edwards25519 uniform-to-point" { | ... | @@ -562,8 +555,6 @@ test "edwards25519 uniform-to-point" { |
| 562 | 555 | ||
| 563 | // Test vectors from draft-irtf-cfrg-hash-to-curve-12 | 556 | // Test vectors from draft-irtf-cfrg-hash-to-curve-12 |
| 564 | test "edwards25519 hash-to-curve operation" { | 557 | test "edwards25519 hash-to-curve operation" { |
| 565 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 566 | |||
| 567 | var p = Edwards25519.fromString(true, "QUUX-V01-CS02-with-edwards25519_XMD:SHA-512_ELL2_RO_", "abc"); | 558 | var p = Edwards25519.fromString(true, "QUUX-V01-CS02-with-edwards25519_XMD:SHA-512_ELL2_RO_", "abc"); |
| 568 | try htest.assertEqual("31558a26887f23fb8218f143e69d5f0af2e7831130bd5b432ef23883b895839a", p.toBytes()[0..]); | 559 | try htest.assertEqual("31558a26887f23fb8218f143e69d5f0af2e7831130bd5b432ef23883b895839a", p.toBytes()[0..]); |
| 569 | 560 | ||
| ... | @@ -572,8 +563,6 @@ test "edwards25519 hash-to-curve operation" { | ... | @@ -572,8 +563,6 @@ test "edwards25519 hash-to-curve operation" { |
| 572 | } | 563 | } |
| 573 | 564 | ||
| 574 | test "edwards25519 implicit reduction of invalid scalars" { | 565 | test "edwards25519 implicit reduction of invalid scalars" { |
| 575 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 576 | |||
| 577 | const s = [_]u8{0} ** 31 ++ [_]u8{255}; | 566 | const s = [_]u8{0} ** 31 ++ [_]u8{255}; |
| 578 | const p1 = try Edwards25519.basePoint.mulPublic(s); | 567 | const p1 = try Edwards25519.basePoint.mulPublic(s); |
| 579 | const p2 = try Edwards25519.basePoint.mul(s); | 568 | const p2 = try Edwards25519.basePoint.mul(s); |
lib/std/crypto/25519/ristretto255.zig-2| ... | @@ -168,8 +168,6 @@ pub const Ristretto255 = struct { | ... | @@ -168,8 +168,6 @@ pub const Ristretto255 = struct { |
| 168 | }; | 168 | }; |
| 169 | 169 | ||
| 170 | test "ristretto255" { | 170 | test "ristretto255" { |
| 171 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 172 | |||
| 173 | const p = Ristretto255.basePoint; | 171 | const p = Ristretto255.basePoint; |
| 174 | var buf: [256]u8 = undefined; | 172 | var buf: [256]u8 = undefined; |
| 175 | try std.testing.expectEqualStrings(try std.fmt.bufPrint(&buf, "{s}", .{std.fmt.fmtSliceHexUpper(&p.toBytes())}), "E2F2AE0A6ABC4E71A884A961C500515F58E30B6AA582DD8DB6A65945E08D2D76"); | 173 | try std.testing.expectEqualStrings(try std.fmt.bufPrint(&buf, "{s}", .{std.fmt.fmtSliceHexUpper(&p.toBytes())}), "E2F2AE0A6ABC4E71A884A961C500515F58E30B6AA582DD8DB6A65945E08D2D76"); |
lib/std/crypto/25519/x25519.zig-15| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const crypto = std.crypto; | 2 | const crypto = std.crypto; |
| 4 | const mem = std.mem; | 3 | const mem = std.mem; |
| 5 | const fmt = std.fmt; | 4 | const fmt = std.fmt; |
| ... | @@ -83,8 +82,6 @@ pub const X25519 = struct { | ... | @@ -83,8 +82,6 @@ pub const X25519 = struct { |
| 83 | const htest = @import("../test.zig"); | 82 | const htest = @import("../test.zig"); |
| 84 | 83 | ||
| 85 | test "x25519 public key calculation from secret key" { | 84 | test "x25519 public key calculation from secret key" { |
| 86 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 87 | |||
| 88 | var sk: [32]u8 = undefined; | 85 | var sk: [32]u8 = undefined; |
| 89 | var pk_expected: [32]u8 = undefined; | 86 | var pk_expected: [32]u8 = undefined; |
| 90 | _ = try fmt.hexToBytes(sk[0..], "8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166"); | 87 | _ = try fmt.hexToBytes(sk[0..], "8052030376d47112be7f73ed7a019293dd12ad910b654455798b4667d73de166"); |
| ... | @@ -94,8 +91,6 @@ test "x25519 public key calculation from secret key" { | ... | @@ -94,8 +91,6 @@ test "x25519 public key calculation from secret key" { |
| 94 | } | 91 | } |
| 95 | 92 | ||
| 96 | test "x25519 rfc7748 vector1" { | 93 | test "x25519 rfc7748 vector1" { |
| 97 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 98 | |||
| 99 | const secret_key = [32]u8{ 0xa5, 0x46, 0xe3, 0x6b, 0xf0, 0x52, 0x7c, 0x9d, 0x3b, 0x16, 0x15, 0x4b, 0x82, 0x46, 0x5e, 0xdd, 0x62, 0x14, 0x4c, 0x0a, 0xc1, 0xfc, 0x5a, 0x18, 0x50, 0x6a, 0x22, 0x44, 0xba, 0x44, 0x9a, 0xc4 }; | 94 | const secret_key = [32]u8{ 0xa5, 0x46, 0xe3, 0x6b, 0xf0, 0x52, 0x7c, 0x9d, 0x3b, 0x16, 0x15, 0x4b, 0x82, 0x46, 0x5e, 0xdd, 0x62, 0x14, 0x4c, 0x0a, 0xc1, 0xfc, 0x5a, 0x18, 0x50, 0x6a, 0x22, 0x44, 0xba, 0x44, 0x9a, 0xc4 }; |
| 100 | const public_key = [32]u8{ 0xe6, 0xdb, 0x68, 0x67, 0x58, 0x30, 0x30, 0xdb, 0x35, 0x94, 0xc1, 0xa4, 0x24, 0xb1, 0x5f, 0x7c, 0x72, 0x66, 0x24, 0xec, 0x26, 0xb3, 0x35, 0x3b, 0x10, 0xa9, 0x03, 0xa6, 0xd0, 0xab, 0x1c, 0x4c }; | 95 | const public_key = [32]u8{ 0xe6, 0xdb, 0x68, 0x67, 0x58, 0x30, 0x30, 0xdb, 0x35, 0x94, 0xc1, 0xa4, 0x24, 0xb1, 0x5f, 0x7c, 0x72, 0x66, 0x24, 0xec, 0x26, 0xb3, 0x35, 0x3b, 0x10, 0xa9, 0x03, 0xa6, 0xd0, 0xab, 0x1c, 0x4c }; |
| 101 | 96 | ||
| ... | @@ -106,8 +101,6 @@ test "x25519 rfc7748 vector1" { | ... | @@ -106,8 +101,6 @@ test "x25519 rfc7748 vector1" { |
| 106 | } | 101 | } |
| 107 | 102 | ||
| 108 | test "x25519 rfc7748 vector2" { | 103 | test "x25519 rfc7748 vector2" { |
| 109 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 110 | |||
| 111 | const secret_key = [32]u8{ 0x4b, 0x66, 0xe9, 0xd4, 0xd1, 0xb4, 0x67, 0x3c, 0x5a, 0xd2, 0x26, 0x91, 0x95, 0x7d, 0x6a, 0xf5, 0xc1, 0x1b, 0x64, 0x21, 0xe0, 0xea, 0x01, 0xd4, 0x2c, 0xa4, 0x16, 0x9e, 0x79, 0x18, 0xba, 0x0d }; | 104 | const secret_key = [32]u8{ 0x4b, 0x66, 0xe9, 0xd4, 0xd1, 0xb4, 0x67, 0x3c, 0x5a, 0xd2, 0x26, 0x91, 0x95, 0x7d, 0x6a, 0xf5, 0xc1, 0x1b, 0x64, 0x21, 0xe0, 0xea, 0x01, 0xd4, 0x2c, 0xa4, 0x16, 0x9e, 0x79, 0x18, 0xba, 0x0d }; |
| 112 | const public_key = [32]u8{ 0xe5, 0x21, 0x0f, 0x12, 0x78, 0x68, 0x11, 0xd3, 0xf4, 0xb7, 0x95, 0x9d, 0x05, 0x38, 0xae, 0x2c, 0x31, 0xdb, 0xe7, 0x10, 0x6f, 0xc0, 0x3c, 0x3e, 0xfc, 0x4c, 0xd5, 0x49, 0xc7, 0x15, 0xa4, 0x93 }; | 105 | const public_key = [32]u8{ 0xe5, 0x21, 0x0f, 0x12, 0x78, 0x68, 0x11, 0xd3, 0xf4, 0xb7, 0x95, 0x9d, 0x05, 0x38, 0xae, 0x2c, 0x31, 0xdb, 0xe7, 0x10, 0x6f, 0xc0, 0x3c, 0x3e, 0xfc, 0x4c, 0xd5, 0x49, 0xc7, 0x15, 0xa4, 0x93 }; |
| 113 | 106 | ||
| ... | @@ -118,8 +111,6 @@ test "x25519 rfc7748 vector2" { | ... | @@ -118,8 +111,6 @@ test "x25519 rfc7748 vector2" { |
| 118 | } | 111 | } |
| 119 | 112 | ||
| 120 | test "x25519 rfc7748 one iteration" { | 113 | test "x25519 rfc7748 one iteration" { |
| 121 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 122 | |||
| 123 | const initial_value = [32]u8{ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | 114 | const initial_value = [32]u8{ 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; |
| 124 | const expected_output = [32]u8{ 0x42, 0x2c, 0x8e, 0x7a, 0x62, 0x27, 0xd7, 0xbc, 0xa1, 0x35, 0x0b, 0x3e, 0x2b, 0xb7, 0x27, 0x9f, 0x78, 0x97, 0xb8, 0x7b, 0xb6, 0x85, 0x4b, 0x78, 0x3c, 0x60, 0xe8, 0x03, 0x11, 0xae, 0x30, 0x79 }; | 115 | const expected_output = [32]u8{ 0x42, 0x2c, 0x8e, 0x7a, 0x62, 0x27, 0xd7, 0xbc, 0xa1, 0x35, 0x0b, 0x3e, 0x2b, 0xb7, 0x27, 0x9f, 0x78, 0x97, 0xb8, 0x7b, 0xb6, 0x85, 0x4b, 0x78, 0x3c, 0x60, 0xe8, 0x03, 0x11, 0xae, 0x30, 0x79 }; |
| 125 | 116 | ||
| ... | @@ -137,8 +128,6 @@ test "x25519 rfc7748 one iteration" { | ... | @@ -137,8 +128,6 @@ test "x25519 rfc7748 one iteration" { |
| 137 | } | 128 | } |
| 138 | 129 | ||
| 139 | test "x25519 rfc7748 1,000 iterations" { | 130 | test "x25519 rfc7748 1,000 iterations" { |
| 140 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 141 | |||
| 142 | // These iteration tests are slow so we always skip them. Results have been verified. | 131 | // These iteration tests are slow so we always skip them. Results have been verified. |
| 143 | if (true) { | 132 | if (true) { |
| 144 | return error.SkipZigTest; | 133 | return error.SkipZigTest; |
| ... | @@ -161,8 +150,6 @@ test "x25519 rfc7748 1,000 iterations" { | ... | @@ -161,8 +150,6 @@ test "x25519 rfc7748 1,000 iterations" { |
| 161 | } | 150 | } |
| 162 | 151 | ||
| 163 | test "x25519 rfc7748 1,000,000 iterations" { | 152 | test "x25519 rfc7748 1,000,000 iterations" { |
| 164 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 165 | |||
| 166 | if (true) { | 153 | if (true) { |
| 167 | return error.SkipZigTest; | 154 | return error.SkipZigTest; |
| 168 | } | 155 | } |
| ... | @@ -184,8 +171,6 @@ test "x25519 rfc7748 1,000,000 iterations" { | ... | @@ -184,8 +171,6 @@ test "x25519 rfc7748 1,000,000 iterations" { |
| 184 | } | 171 | } |
| 185 | 172 | ||
| 186 | test "edwards25519 -> curve25519 map" { | 173 | test "edwards25519 -> curve25519 map" { |
| 187 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 188 | |||
| 189 | const ed_kp = try crypto.sign.Ed25519.KeyPair.create([_]u8{0x42} ** 32); | 174 | const ed_kp = try crypto.sign.Ed25519.KeyPair.create([_]u8{0x42} ** 32); |
| 190 | const mont_kp = try X25519.KeyPair.fromEd25519(ed_kp); | 175 | const mont_kp = try X25519.KeyPair.fromEd25519(ed_kp); |
| 191 | try htest.assertEqual("90e7595fc89e52fdfddce9c6a43d74dbf6047025ee0462d2d172e8b6a2841d6e", &mont_kp.secret_key); | 176 | try htest.assertEqual("90e7595fc89e52fdfddce9c6a43d74dbf6047025ee0462d2d172e8b6a2841d6e", &mont_kp.secret_key); |
lib/std/crypto/Certificate.zig-6| ... | @@ -624,8 +624,6 @@ pub fn parseTimeDigits(text: *const [2]u8, min: u8, max: u8) !u8 { | ... | @@ -624,8 +624,6 @@ pub fn parseTimeDigits(text: *const [2]u8, min: u8, max: u8) !u8 { |
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | test parseTimeDigits { | 626 | test parseTimeDigits { |
| 627 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 628 | |||
| 629 | const expectEqual = std.testing.expectEqual; | 627 | const expectEqual = std.testing.expectEqual; |
| 630 | try expectEqual(@as(u8, 0), try parseTimeDigits("00", 0, 99)); | 628 | try expectEqual(@as(u8, 0), try parseTimeDigits("00", 0, 99)); |
| 631 | try expectEqual(@as(u8, 99), try parseTimeDigits("99", 0, 99)); | 629 | try expectEqual(@as(u8, 99), try parseTimeDigits("99", 0, 99)); |
| ... | @@ -647,8 +645,6 @@ pub fn parseYear4(text: *const [4]u8) !u16 { | ... | @@ -647,8 +645,6 @@ pub fn parseYear4(text: *const [4]u8) !u16 { |
| 647 | } | 645 | } |
| 648 | 646 | ||
| 649 | test parseYear4 { | 647 | test parseYear4 { |
| 650 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 651 | |||
| 652 | const expectEqual = std.testing.expectEqual; | 648 | const expectEqual = std.testing.expectEqual; |
| 653 | try expectEqual(@as(u16, 0), try parseYear4("0000")); | 649 | try expectEqual(@as(u16, 0), try parseYear4("0000")); |
| 654 | try expectEqual(@as(u16, 9999), try parseYear4("9999")); | 650 | try expectEqual(@as(u16, 9999), try parseYear4("9999")); |
| ... | @@ -1123,5 +1119,3 @@ pub const rsa = struct { | ... | @@ -1123,5 +1119,3 @@ pub const rsa = struct { |
| 1123 | return res; | 1119 | return res; |
| 1124 | } | 1120 | } |
| 1125 | }; | 1121 | }; |
| 1126 | |||
| 1127 | const builtin = @import("builtin"); |
lib/std/crypto/Certificate/Bundle.zig-2| ... | @@ -318,8 +318,6 @@ const MapContext = struct { | ... | @@ -318,8 +318,6 @@ const MapContext = struct { |
| 318 | test "scan for OS-provided certificates" { | 318 | test "scan for OS-provided certificates" { |
| 319 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 319 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 320 | 320 | ||
| 321 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 322 | |||
| 323 | var bundle: Bundle = .{}; | 321 | var bundle: Bundle = .{}; |
| 324 | defer bundle.deinit(std.testing.allocator); | 322 | defer bundle.deinit(std.testing.allocator); |
| 325 | 323 |
lib/std/crypto/aegis.zig-15| ... | @@ -17,7 +17,6 @@ | ... | @@ -17,7 +17,6 @@ |
| 17 | //! https://datatracker.ietf.org/doc/draft-irtf-cfrg-aegis-aead/ | 17 | //! https://datatracker.ietf.org/doc/draft-irtf-cfrg-aegis-aead/ |
| 18 | 18 | ||
| 19 | const std = @import("std"); | 19 | const std = @import("std"); |
| 20 | const builtin = @import("builtin"); | ||
| 21 | const crypto = std.crypto; | 20 | const crypto = std.crypto; |
| 22 | const mem = std.mem; | 21 | const mem = std.mem; |
| 23 | const assert = std.debug.assert; | 22 | const assert = std.debug.assert; |
| ... | @@ -514,8 +513,6 @@ const htest = @import("test.zig"); | ... | @@ -514,8 +513,6 @@ const htest = @import("test.zig"); |
| 514 | const testing = std.testing; | 513 | const testing = std.testing; |
| 515 | 514 | ||
| 516 | test "Aegis128L test vector 1" { | 515 | test "Aegis128L test vector 1" { |
| 517 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 518 | |||
| 519 | const key: [Aegis128L.key_length]u8 = [_]u8{ 0x10, 0x01 } ++ [_]u8{0x00} ** 14; | 516 | const key: [Aegis128L.key_length]u8 = [_]u8{ 0x10, 0x01 } ++ [_]u8{0x00} ** 14; |
| 520 | const nonce: [Aegis128L.nonce_length]u8 = [_]u8{ 0x10, 0x00, 0x02 } ++ [_]u8{0x00} ** 13; | 517 | const nonce: [Aegis128L.nonce_length]u8 = [_]u8{ 0x10, 0x00, 0x02 } ++ [_]u8{0x00} ** 13; |
| 521 | const ad = [8]u8{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 }; | 518 | const ad = [8]u8{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 }; |
| ... | @@ -539,8 +536,6 @@ test "Aegis128L test vector 1" { | ... | @@ -539,8 +536,6 @@ test "Aegis128L test vector 1" { |
| 539 | } | 536 | } |
| 540 | 537 | ||
| 541 | test "Aegis128L test vector 2" { | 538 | test "Aegis128L test vector 2" { |
| 542 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 543 | |||
| 544 | const key: [Aegis128L.key_length]u8 = [_]u8{0x00} ** 16; | 539 | const key: [Aegis128L.key_length]u8 = [_]u8{0x00} ** 16; |
| 545 | const nonce: [Aegis128L.nonce_length]u8 = [_]u8{0x00} ** 16; | 540 | const nonce: [Aegis128L.nonce_length]u8 = [_]u8{0x00} ** 16; |
| 546 | const ad = [_]u8{}; | 541 | const ad = [_]u8{}; |
| ... | @@ -558,8 +553,6 @@ test "Aegis128L test vector 2" { | ... | @@ -558,8 +553,6 @@ test "Aegis128L test vector 2" { |
| 558 | } | 553 | } |
| 559 | 554 | ||
| 560 | test "Aegis128L test vector 3" { | 555 | test "Aegis128L test vector 3" { |
| 561 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 562 | |||
| 563 | const key: [Aegis128L.key_length]u8 = [_]u8{0x00} ** 16; | 556 | const key: [Aegis128L.key_length]u8 = [_]u8{0x00} ** 16; |
| 564 | const nonce: [Aegis128L.nonce_length]u8 = [_]u8{0x00} ** 16; | 557 | const nonce: [Aegis128L.nonce_length]u8 = [_]u8{0x00} ** 16; |
| 565 | const ad = [_]u8{}; | 558 | const ad = [_]u8{}; |
| ... | @@ -576,8 +569,6 @@ test "Aegis128L test vector 3" { | ... | @@ -576,8 +569,6 @@ test "Aegis128L test vector 3" { |
| 576 | } | 569 | } |
| 577 | 570 | ||
| 578 | test "Aegis256 test vector 1" { | 571 | test "Aegis256 test vector 1" { |
| 579 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 580 | |||
| 581 | const key: [Aegis256.key_length]u8 = [_]u8{ 0x10, 0x01 } ++ [_]u8{0x00} ** 30; | 572 | const key: [Aegis256.key_length]u8 = [_]u8{ 0x10, 0x01 } ++ [_]u8{0x00} ** 30; |
| 582 | const nonce: [Aegis256.nonce_length]u8 = [_]u8{ 0x10, 0x00, 0x02 } ++ [_]u8{0x00} ** 29; | 573 | const nonce: [Aegis256.nonce_length]u8 = [_]u8{ 0x10, 0x00, 0x02 } ++ [_]u8{0x00} ** 29; |
| 583 | const ad = [8]u8{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 }; | 574 | const ad = [8]u8{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 }; |
| ... | @@ -601,8 +592,6 @@ test "Aegis256 test vector 1" { | ... | @@ -601,8 +592,6 @@ test "Aegis256 test vector 1" { |
| 601 | } | 592 | } |
| 602 | 593 | ||
| 603 | test "Aegis256 test vector 2" { | 594 | test "Aegis256 test vector 2" { |
| 604 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 605 | |||
| 606 | const key: [Aegis256.key_length]u8 = [_]u8{0x00} ** 32; | 595 | const key: [Aegis256.key_length]u8 = [_]u8{0x00} ** 32; |
| 607 | const nonce: [Aegis256.nonce_length]u8 = [_]u8{0x00} ** 32; | 596 | const nonce: [Aegis256.nonce_length]u8 = [_]u8{0x00} ** 32; |
| 608 | const ad = [_]u8{}; | 597 | const ad = [_]u8{}; |
| ... | @@ -620,8 +609,6 @@ test "Aegis256 test vector 2" { | ... | @@ -620,8 +609,6 @@ test "Aegis256 test vector 2" { |
| 620 | } | 609 | } |
| 621 | 610 | ||
| 622 | test "Aegis256 test vector 3" { | 611 | test "Aegis256 test vector 3" { |
| 623 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 624 | |||
| 625 | const key: [Aegis256.key_length]u8 = [_]u8{0x00} ** 32; | 612 | const key: [Aegis256.key_length]u8 = [_]u8{0x00} ** 32; |
| 626 | const nonce: [Aegis256.nonce_length]u8 = [_]u8{0x00} ** 32; | 613 | const nonce: [Aegis256.nonce_length]u8 = [_]u8{0x00} ** 32; |
| 627 | const ad = [_]u8{}; | 614 | const ad = [_]u8{}; |
| ... | @@ -638,8 +625,6 @@ test "Aegis256 test vector 3" { | ... | @@ -638,8 +625,6 @@ test "Aegis256 test vector 3" { |
| 638 | } | 625 | } |
| 639 | 626 | ||
| 640 | test "Aegis MAC" { | 627 | test "Aegis MAC" { |
| 641 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 642 | |||
| 643 | const key = [_]u8{0x00} ** Aegis128LMac.key_length; | 628 | const key = [_]u8{0x00} ** Aegis128LMac.key_length; |
| 644 | var msg: [64]u8 = undefined; | 629 | var msg: [64]u8 = undefined; |
| 645 | for (&msg, 0..) |*m, i| { | 630 | for (&msg, 0..) |*m, i| { |
lib/std/crypto/aes.zig-10| ... | @@ -28,8 +28,6 @@ pub const Aes128 = impl.Aes128; | ... | @@ -28,8 +28,6 @@ pub const Aes128 = impl.Aes128; |
| 28 | pub const Aes256 = impl.Aes256; | 28 | pub const Aes256 = impl.Aes256; |
| 29 | 29 | ||
| 30 | test "ctr" { | 30 | test "ctr" { |
| 31 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 32 | |||
| 33 | // NIST SP 800-38A pp 55-58 | 31 | // NIST SP 800-38A pp 55-58 |
| 34 | const ctr = @import("modes.zig").ctr; | 32 | const ctr = @import("modes.zig").ctr; |
| 35 | 33 | ||
| ... | @@ -55,8 +53,6 @@ test "ctr" { | ... | @@ -55,8 +53,6 @@ test "ctr" { |
| 55 | } | 53 | } |
| 56 | 54 | ||
| 57 | test "encrypt" { | 55 | test "encrypt" { |
| 58 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 59 | |||
| 60 | // Appendix B | 56 | // Appendix B |
| 61 | { | 57 | { |
| 62 | const key = [_]u8{ 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; | 58 | const key = [_]u8{ 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; |
| ... | @@ -86,8 +82,6 @@ test "encrypt" { | ... | @@ -86,8 +82,6 @@ test "encrypt" { |
| 86 | } | 82 | } |
| 87 | 83 | ||
| 88 | test "decrypt" { | 84 | test "decrypt" { |
| 89 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 90 | |||
| 91 | // Appendix B | 85 | // Appendix B |
| 92 | { | 86 | { |
| 93 | const key = [_]u8{ 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; | 87 | const key = [_]u8{ 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; |
| ... | @@ -117,8 +111,6 @@ test "decrypt" { | ... | @@ -117,8 +111,6 @@ test "decrypt" { |
| 117 | } | 111 | } |
| 118 | 112 | ||
| 119 | test "expand 128-bit key" { | 113 | test "expand 128-bit key" { |
| 120 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 121 | |||
| 122 | const key = [_]u8{ 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; | 114 | const key = [_]u8{ 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c }; |
| 123 | const exp_enc = [_]*const [32:0]u8{ | 115 | const exp_enc = [_]*const [32:0]u8{ |
| 124 | "2b7e151628aed2a6abf7158809cf4f3c", "a0fafe1788542cb123a339392a6c7605", "f2c295f27a96b9435935807a7359f67f", "3d80477d4716fe3e1e237e446d7a883b", "ef44a541a8525b7fb671253bdb0bad00", "d4d1c6f87c839d87caf2b8bc11f915bc", "6d88a37a110b3efddbf98641ca0093fd", "4e54f70e5f5fc9f384a64fb24ea6dc4f", "ead27321b58dbad2312bf5607f8d292f", "ac7766f319fadc2128d12941575c006e", "d014f9a8c9ee2589e13f0cc8b6630ca6", | 116 | "2b7e151628aed2a6abf7158809cf4f3c", "a0fafe1788542cb123a339392a6c7605", "f2c295f27a96b9435935807a7359f67f", "3d80477d4716fe3e1e237e446d7a883b", "ef44a541a8525b7fb671253bdb0bad00", "d4d1c6f87c839d87caf2b8bc11f915bc", "6d88a37a110b3efddbf98641ca0093fd", "4e54f70e5f5fc9f384a64fb24ea6dc4f", "ead27321b58dbad2312bf5607f8d292f", "ac7766f319fadc2128d12941575c006e", "d014f9a8c9ee2589e13f0cc8b6630ca6", |
| ... | @@ -141,8 +133,6 @@ test "expand 128-bit key" { | ... | @@ -141,8 +133,6 @@ test "expand 128-bit key" { |
| 141 | } | 133 | } |
| 142 | 134 | ||
| 143 | test "expand 256-bit key" { | 135 | test "expand 256-bit key" { |
| 144 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 145 | |||
| 146 | const key = [_]u8{ | 136 | const key = [_]u8{ |
| 147 | 0x60, 0x3d, 0xeb, 0x10, | 137 | 0x60, 0x3d, 0xeb, 0x10, |
| 148 | 0x15, 0xca, 0x71, 0xbe, | 138 | 0x15, 0xca, 0x71, 0xbe, |
lib/std/crypto/aes_gcm.zig-9| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const assert = std.debug.assert; | 2 | const assert = std.debug.assert; |
| 4 | const crypto = std.crypto; | 3 | const crypto = std.crypto; |
| 5 | const debug = std.debug; | 4 | const debug = std.debug; |
| ... | @@ -113,8 +112,6 @@ const htest = @import("test.zig"); | ... | @@ -113,8 +112,6 @@ const htest = @import("test.zig"); |
| 113 | const testing = std.testing; | 112 | const testing = std.testing; |
| 114 | 113 | ||
| 115 | test "Aes256Gcm - Empty message and no associated data" { | 114 | test "Aes256Gcm - Empty message and no associated data" { |
| 116 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 117 | |||
| 118 | const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length; | 115 | const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length; |
| 119 | const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; | 116 | const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; |
| 120 | const ad = ""; | 117 | const ad = ""; |
| ... | @@ -127,8 +124,6 @@ test "Aes256Gcm - Empty message and no associated data" { | ... | @@ -127,8 +124,6 @@ test "Aes256Gcm - Empty message and no associated data" { |
| 127 | } | 124 | } |
| 128 | 125 | ||
| 129 | test "Aes256Gcm - Associated data only" { | 126 | test "Aes256Gcm - Associated data only" { |
| 130 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 131 | |||
| 132 | const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length; | 127 | const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length; |
| 133 | const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; | 128 | const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; |
| 134 | const m = ""; | 129 | const m = ""; |
| ... | @@ -141,8 +136,6 @@ test "Aes256Gcm - Associated data only" { | ... | @@ -141,8 +136,6 @@ test "Aes256Gcm - Associated data only" { |
| 141 | } | 136 | } |
| 142 | 137 | ||
| 143 | test "Aes256Gcm - Message only" { | 138 | test "Aes256Gcm - Message only" { |
| 144 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 145 | |||
| 146 | const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length; | 139 | const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length; |
| 147 | const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; | 140 | const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; |
| 148 | const m = "Test with message only"; | 141 | const m = "Test with message only"; |
| ... | @@ -160,8 +153,6 @@ test "Aes256Gcm - Message only" { | ... | @@ -160,8 +153,6 @@ test "Aes256Gcm - Message only" { |
| 160 | } | 153 | } |
| 161 | 154 | ||
| 162 | test "Aes256Gcm - Message and associated data" { | 155 | test "Aes256Gcm - Message and associated data" { |
| 163 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 164 | |||
| 165 | const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length; | 156 | const key: [Aes256Gcm.key_length]u8 = [_]u8{0x69} ** Aes256Gcm.key_length; |
| 166 | const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; | 157 | const nonce: [Aes256Gcm.nonce_length]u8 = [_]u8{0x42} ** Aes256Gcm.nonce_length; |
| 167 | const m = "Test with message"; | 158 | const m = "Test with message"; |
lib/std/crypto/aes_ocb.zig+4-16| ... | @@ -261,10 +261,7 @@ inline fn xorWith(x: *Block, y: Block) void { | ... | @@ -261,10 +261,7 @@ inline fn xorWith(x: *Block, y: Block) void { |
| 261 | const hexToBytes = std.fmt.hexToBytes; | 261 | const hexToBytes = std.fmt.hexToBytes; |
| 262 | 262 | ||
| 263 | test "AesOcb test vector 1" { | 263 | test "AesOcb test vector 1" { |
| 264 | switch (builtin.zig_backend) { | 264 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 265 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 266 | else => {}, | ||
| 267 | } | ||
| 268 | 265 | ||
| 269 | var k: [Aes128Ocb.key_length]u8 = undefined; | 266 | var k: [Aes128Ocb.key_length]u8 = undefined; |
| 270 | var nonce: [Aes128Ocb.nonce_length]u8 = undefined; | 267 | var nonce: [Aes128Ocb.nonce_length]u8 = undefined; |
| ... | @@ -283,10 +280,7 @@ test "AesOcb test vector 1" { | ... | @@ -283,10 +280,7 @@ test "AesOcb test vector 1" { |
| 283 | } | 280 | } |
| 284 | 281 | ||
| 285 | test "AesOcb test vector 2" { | 282 | test "AesOcb test vector 2" { |
| 286 | switch (builtin.zig_backend) { | 283 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 287 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 288 | else => {}, | ||
| 289 | } | ||
| 290 | 284 | ||
| 291 | var k: [Aes128Ocb.key_length]u8 = undefined; | 285 | var k: [Aes128Ocb.key_length]u8 = undefined; |
| 292 | var nonce: [Aes128Ocb.nonce_length]u8 = undefined; | 286 | var nonce: [Aes128Ocb.nonce_length]u8 = undefined; |
| ... | @@ -307,10 +301,7 @@ test "AesOcb test vector 2" { | ... | @@ -307,10 +301,7 @@ test "AesOcb test vector 2" { |
| 307 | } | 301 | } |
| 308 | 302 | ||
| 309 | test "AesOcb test vector 3" { | 303 | test "AesOcb test vector 3" { |
| 310 | switch (builtin.zig_backend) { | 304 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 311 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 312 | else => {}, | ||
| 313 | } | ||
| 314 | 305 | ||
| 315 | var k: [Aes128Ocb.key_length]u8 = undefined; | 306 | var k: [Aes128Ocb.key_length]u8 = undefined; |
| 316 | var nonce: [Aes128Ocb.nonce_length]u8 = undefined; | 307 | var nonce: [Aes128Ocb.nonce_length]u8 = undefined; |
| ... | @@ -334,10 +325,7 @@ test "AesOcb test vector 3" { | ... | @@ -334,10 +325,7 @@ test "AesOcb test vector 3" { |
| 334 | } | 325 | } |
| 335 | 326 | ||
| 336 | test "AesOcb test vector 4" { | 327 | test "AesOcb test vector 4" { |
| 337 | switch (builtin.zig_backend) { | 328 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 338 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 339 | else => {}, | ||
| 340 | } | ||
| 341 | 329 | ||
| 342 | var k: [Aes128Ocb.key_length]u8 = undefined; | 330 | var k: [Aes128Ocb.key_length]u8 = undefined; |
| 343 | var nonce: [Aes128Ocb.nonce_length]u8 = undefined; | 331 | var nonce: [Aes128Ocb.nonce_length]u8 = undefined; |
lib/std/crypto/argon2.zig-14| ... | @@ -622,8 +622,6 @@ pub fn strVerify( | ... | @@ -622,8 +622,6 @@ pub fn strVerify( |
| 622 | } | 622 | } |
| 623 | 623 | ||
| 624 | test "argon2d" { | 624 | test "argon2d" { |
| 625 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 626 | |||
| 627 | const password = [_]u8{0x01} ** 32; | 625 | const password = [_]u8{0x01} ** 32; |
| 628 | const salt = [_]u8{0x02} ** 16; | 626 | const salt = [_]u8{0x02} ** 16; |
| 629 | const secret = [_]u8{0x03} ** 8; | 627 | const secret = [_]u8{0x03} ** 8; |
| ... | @@ -649,8 +647,6 @@ test "argon2d" { | ... | @@ -649,8 +647,6 @@ test "argon2d" { |
| 649 | } | 647 | } |
| 650 | 648 | ||
| 651 | test "argon2i" { | 649 | test "argon2i" { |
| 652 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 653 | |||
| 654 | const password = [_]u8{0x01} ** 32; | 650 | const password = [_]u8{0x01} ** 32; |
| 655 | const salt = [_]u8{0x02} ** 16; | 651 | const salt = [_]u8{0x02} ** 16; |
| 656 | const secret = [_]u8{0x03} ** 8; | 652 | const secret = [_]u8{0x03} ** 8; |
| ... | @@ -676,8 +672,6 @@ test "argon2i" { | ... | @@ -676,8 +672,6 @@ test "argon2i" { |
| 676 | } | 672 | } |
| 677 | 673 | ||
| 678 | test "argon2id" { | 674 | test "argon2id" { |
| 679 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 680 | |||
| 681 | const password = [_]u8{0x01} ** 32; | 675 | const password = [_]u8{0x01} ** 32; |
| 682 | const salt = [_]u8{0x02} ** 16; | 676 | const salt = [_]u8{0x02} ** 16; |
| 683 | const secret = [_]u8{0x03} ** 8; | 677 | const secret = [_]u8{0x03} ** 8; |
| ... | @@ -703,8 +697,6 @@ test "argon2id" { | ... | @@ -703,8 +697,6 @@ test "argon2id" { |
| 703 | } | 697 | } |
| 704 | 698 | ||
| 705 | test "kdf" { | 699 | test "kdf" { |
| 706 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 707 | |||
| 708 | const password = "password"; | 700 | const password = "password"; |
| 709 | const salt = "somesalt"; | 701 | const salt = "somesalt"; |
| 710 | 702 | ||
| ... | @@ -904,8 +896,6 @@ test "kdf" { | ... | @@ -904,8 +896,6 @@ test "kdf" { |
| 904 | } | 896 | } |
| 905 | 897 | ||
| 906 | test "phc format hasher" { | 898 | test "phc format hasher" { |
| 907 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 908 | |||
| 909 | const allocator = std.testing.allocator; | 899 | const allocator = std.testing.allocator; |
| 910 | const password = "testpass"; | 900 | const password = "testpass"; |
| 911 | 901 | ||
| ... | @@ -921,8 +911,6 @@ test "phc format hasher" { | ... | @@ -921,8 +911,6 @@ test "phc format hasher" { |
| 921 | } | 911 | } |
| 922 | 912 | ||
| 923 | test "password hash and password verify" { | 913 | test "password hash and password verify" { |
| 924 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 925 | |||
| 926 | const allocator = std.testing.allocator; | 914 | const allocator = std.testing.allocator; |
| 927 | const password = "testpass"; | 915 | const password = "testpass"; |
| 928 | 916 | ||
| ... | @@ -936,8 +924,6 @@ test "password hash and password verify" { | ... | @@ -936,8 +924,6 @@ test "password hash and password verify" { |
| 936 | } | 924 | } |
| 937 | 925 | ||
| 938 | test "kdf derived key length" { | 926 | test "kdf derived key length" { |
| 939 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 940 | |||
| 941 | const allocator = std.testing.allocator; | 927 | const allocator = std.testing.allocator; |
| 942 | 928 | ||
| 943 | const password = "testpass"; | 929 | const password = "testpass"; |
lib/std/crypto/bcrypt.zig-7| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const base64 = std.base64; | 2 | const base64 = std.base64; |
| 4 | const crypto = std.crypto; | 3 | const crypto = std.crypto; |
| 5 | const debug = std.debug; | 4 | const debug = std.debug; |
| ... | @@ -754,8 +753,6 @@ pub fn strVerify( | ... | @@ -754,8 +753,6 @@ pub fn strVerify( |
| 754 | } | 753 | } |
| 755 | 754 | ||
| 756 | test "bcrypt codec" { | 755 | test "bcrypt codec" { |
| 757 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 758 | |||
| 759 | var salt: [salt_length]u8 = undefined; | 756 | var salt: [salt_length]u8 = undefined; |
| 760 | crypto.random.bytes(&salt); | 757 | crypto.random.bytes(&salt); |
| 761 | var salt_str: [salt_str_length]u8 = undefined; | 758 | var salt_str: [salt_str_length]u8 = undefined; |
| ... | @@ -766,8 +763,6 @@ test "bcrypt codec" { | ... | @@ -766,8 +763,6 @@ test "bcrypt codec" { |
| 766 | } | 763 | } |
| 767 | 764 | ||
| 768 | test "bcrypt crypt format" { | 765 | test "bcrypt crypt format" { |
| 769 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 770 | |||
| 771 | var hash_options = HashOptions{ | 766 | var hash_options = HashOptions{ |
| 772 | .params = .{ .rounds_log = 5 }, | 767 | .params = .{ .rounds_log = 5 }, |
| 773 | .encoding = .crypt, | 768 | .encoding = .crypt, |
| ... | @@ -808,8 +803,6 @@ test "bcrypt crypt format" { | ... | @@ -808,8 +803,6 @@ test "bcrypt crypt format" { |
| 808 | } | 803 | } |
| 809 | 804 | ||
| 810 | test "bcrypt phc format" { | 805 | test "bcrypt phc format" { |
| 811 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 812 | |||
| 813 | var hash_options = HashOptions{ | 806 | var hash_options = HashOptions{ |
| 814 | .params = .{ .rounds_log = 5 }, | 807 | .params = .{ .rounds_log = 5 }, |
| 815 | .encoding = .phc, | 808 | .encoding = .phc, |
lib/std/crypto/blake3.zig+1-3| ... | @@ -200,7 +200,7 @@ const CompressGeneric = struct { | ... | @@ -200,7 +200,7 @@ const CompressGeneric = struct { |
| 200 | } | 200 | } |
| 201 | }; | 201 | }; |
| 202 | 202 | ||
| 203 | const compress = if (builtin.cpu.arch == .x86_64 and builtin.zig_backend != .stage2_x86_64) | 203 | const compress = if (builtin.cpu.arch == .x86_64) |
| 204 | CompressVectorized.compress | 204 | CompressVectorized.compress |
| 205 | else | 205 | else |
| 206 | CompressGeneric.compress; | 206 | CompressGeneric.compress; |
| ... | @@ -682,8 +682,6 @@ fn testBlake3(hasher: *Blake3, input_len: usize, expected_hex: [262]u8) !void { | ... | @@ -682,8 +682,6 @@ fn testBlake3(hasher: *Blake3, input_len: usize, expected_hex: [262]u8) !void { |
| 682 | } | 682 | } |
| 683 | 683 | ||
| 684 | test "BLAKE3 reference test cases" { | 684 | test "BLAKE3 reference test cases" { |
| 685 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 686 | |||
| 687 | var hash_state = Blake3.init(.{}); | 685 | var hash_state = Blake3.init(.{}); |
| 688 | const hash = &hash_state; | 686 | const hash = &hash_state; |
| 689 | var keyed_hash_state = Blake3.init(.{ .key = reference_test.key.* }); | 687 | var keyed_hash_state = Blake3.init(.{ .key = reference_test.key.* }); |
lib/std/crypto/chacha20.zig-22| ... | @@ -499,8 +499,6 @@ fn ChaChaNonVecImpl(comptime rounds_nb: usize) type { | ... | @@ -499,8 +499,6 @@ fn ChaChaNonVecImpl(comptime rounds_nb: usize) type { |
| 499 | fn ChaChaImpl(comptime rounds_nb: usize) type { | 499 | fn ChaChaImpl(comptime rounds_nb: usize) type { |
| 500 | switch (builtin.cpu.arch) { | 500 | switch (builtin.cpu.arch) { |
| 501 | .x86_64 => { | 501 | .x86_64 => { |
| 502 | if (builtin.zig_backend == .stage2_x86_64) return ChaChaNonVecImpl(rounds_nb); | ||
| 503 | |||
| 504 | const has_avx2 = std.Target.x86.featureSetHas(builtin.cpu.features, .avx2); | 502 | const has_avx2 = std.Target.x86.featureSetHas(builtin.cpu.features, .avx2); |
| 505 | const has_avx512f = std.Target.x86.featureSetHas(builtin.cpu.features, .avx512f); | 503 | const has_avx512f = std.Target.x86.featureSetHas(builtin.cpu.features, .avx512f); |
| 506 | if (has_avx512f) return ChaChaVecImpl(rounds_nb, 4); | 504 | if (has_avx512f) return ChaChaVecImpl(rounds_nb, 4); |
| ... | @@ -759,8 +757,6 @@ fn XChaChaPoly1305(comptime rounds_nb: usize) type { | ... | @@ -759,8 +757,6 @@ fn XChaChaPoly1305(comptime rounds_nb: usize) type { |
| 759 | } | 757 | } |
| 760 | 758 | ||
| 761 | test "chacha20 AEAD API" { | 759 | test "chacha20 AEAD API" { |
| 762 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 763 | |||
| 764 | const aeads = [_]type{ ChaCha20Poly1305, XChaCha20Poly1305 }; | 760 | const aeads = [_]type{ ChaCha20Poly1305, XChaCha20Poly1305 }; |
| 765 | const m = "Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it."; | 761 | const m = "Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it."; |
| 766 | const ad = "Additional data"; | 762 | const ad = "Additional data"; |
| ... | @@ -782,8 +778,6 @@ test "chacha20 AEAD API" { | ... | @@ -782,8 +778,6 @@ test "chacha20 AEAD API" { |
| 782 | 778 | ||
| 783 | // https://tools.ietf.org/html/rfc7539#section-2.4.2 | 779 | // https://tools.ietf.org/html/rfc7539#section-2.4.2 |
| 784 | test "crypto.chacha20 test vector sunscreen" { | 780 | test "crypto.chacha20 test vector sunscreen" { |
| 785 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 786 | |||
| 787 | const expected_result = [_]u8{ | 781 | const expected_result = [_]u8{ |
| 788 | 0x6e, 0x2e, 0x35, 0x9a, 0x25, 0x68, 0xf9, 0x80, | 782 | 0x6e, 0x2e, 0x35, 0x9a, 0x25, 0x68, 0xf9, 0x80, |
| 789 | 0x41, 0xba, 0x07, 0x28, 0xdd, 0x0d, 0x69, 0x81, | 783 | 0x41, 0xba, 0x07, 0x28, 0xdd, 0x0d, 0x69, 0x81, |
| ... | @@ -825,8 +819,6 @@ test "crypto.chacha20 test vector sunscreen" { | ... | @@ -825,8 +819,6 @@ test "crypto.chacha20 test vector sunscreen" { |
| 825 | 819 | ||
| 826 | // https://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04#section-7 | 820 | // https://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04#section-7 |
| 827 | test "crypto.chacha20 test vector 1" { | 821 | test "crypto.chacha20 test vector 1" { |
| 828 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 829 | |||
| 830 | const expected_result = [_]u8{ | 822 | const expected_result = [_]u8{ |
| 831 | 0x76, 0xb8, 0xe0, 0xad, 0xa0, 0xf1, 0x3d, 0x90, | 823 | 0x76, 0xb8, 0xe0, 0xad, 0xa0, 0xf1, 0x3d, 0x90, |
| 832 | 0x40, 0x5d, 0x6a, 0xe5, 0x53, 0x86, 0xbd, 0x28, | 824 | 0x40, 0x5d, 0x6a, 0xe5, 0x53, 0x86, 0xbd, 0x28, |
| ... | @@ -861,8 +853,6 @@ test "crypto.chacha20 test vector 1" { | ... | @@ -861,8 +853,6 @@ test "crypto.chacha20 test vector 1" { |
| 861 | } | 853 | } |
| 862 | 854 | ||
| 863 | test "crypto.chacha20 test vector 2" { | 855 | test "crypto.chacha20 test vector 2" { |
| 864 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 865 | |||
| 866 | const expected_result = [_]u8{ | 856 | const expected_result = [_]u8{ |
| 867 | 0x45, 0x40, 0xf0, 0x5a, 0x9f, 0x1f, 0xb2, 0x96, | 857 | 0x45, 0x40, 0xf0, 0x5a, 0x9f, 0x1f, 0xb2, 0x96, |
| 868 | 0xd7, 0x73, 0x6e, 0x7b, 0x20, 0x8e, 0x3c, 0x96, | 858 | 0xd7, 0x73, 0x6e, 0x7b, 0x20, 0x8e, 0x3c, 0x96, |
| ... | @@ -897,8 +887,6 @@ test "crypto.chacha20 test vector 2" { | ... | @@ -897,8 +887,6 @@ test "crypto.chacha20 test vector 2" { |
| 897 | } | 887 | } |
| 898 | 888 | ||
| 899 | test "crypto.chacha20 test vector 3" { | 889 | test "crypto.chacha20 test vector 3" { |
| 900 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 901 | |||
| 902 | const expected_result = [_]u8{ | 890 | const expected_result = [_]u8{ |
| 903 | 0xde, 0x9c, 0xba, 0x7b, 0xf3, 0xd6, 0x9e, 0xf5, | 891 | 0xde, 0x9c, 0xba, 0x7b, 0xf3, 0xd6, 0x9e, 0xf5, |
| 904 | 0xe7, 0x86, 0xdc, 0x63, 0x97, 0x3f, 0x65, 0x3a, | 892 | 0xe7, 0x86, 0xdc, 0x63, 0x97, 0x3f, 0x65, 0x3a, |
| ... | @@ -933,8 +921,6 @@ test "crypto.chacha20 test vector 3" { | ... | @@ -933,8 +921,6 @@ test "crypto.chacha20 test vector 3" { |
| 933 | } | 921 | } |
| 934 | 922 | ||
| 935 | test "crypto.chacha20 test vector 4" { | 923 | test "crypto.chacha20 test vector 4" { |
| 936 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 937 | |||
| 938 | const expected_result = [_]u8{ | 924 | const expected_result = [_]u8{ |
| 939 | 0xef, 0x3f, 0xdf, 0xd6, 0xc6, 0x15, 0x78, 0xfb, | 925 | 0xef, 0x3f, 0xdf, 0xd6, 0xc6, 0x15, 0x78, 0xfb, |
| 940 | 0xf5, 0xcf, 0x35, 0xbd, 0x3d, 0xd3, 0x3b, 0x80, | 926 | 0xf5, 0xcf, 0x35, 0xbd, 0x3d, 0xd3, 0x3b, 0x80, |
| ... | @@ -969,8 +955,6 @@ test "crypto.chacha20 test vector 4" { | ... | @@ -969,8 +955,6 @@ test "crypto.chacha20 test vector 4" { |
| 969 | } | 955 | } |
| 970 | 956 | ||
| 971 | test "crypto.chacha20 test vector 5" { | 957 | test "crypto.chacha20 test vector 5" { |
| 972 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 973 | |||
| 974 | const expected_result = [_]u8{ | 958 | const expected_result = [_]u8{ |
| 975 | 0xf7, 0x98, 0xa1, 0x89, 0xf1, 0x95, 0xe6, 0x69, | 959 | 0xf7, 0x98, 0xa1, 0x89, 0xf1, 0x95, 0xe6, 0x69, |
| 976 | 0x82, 0x10, 0x5f, 0xfb, 0x64, 0x0b, 0xb7, 0x75, | 960 | 0x82, 0x10, 0x5f, 0xfb, 0x64, 0x0b, 0xb7, 0x75, |
| ... | @@ -1043,8 +1027,6 @@ test "crypto.chacha20 test vector 5" { | ... | @@ -1043,8 +1027,6 @@ test "crypto.chacha20 test vector 5" { |
| 1043 | } | 1027 | } |
| 1044 | 1028 | ||
| 1045 | test "seal" { | 1029 | test "seal" { |
| 1046 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1047 | |||
| 1048 | { | 1030 | { |
| 1049 | const m = ""; | 1031 | const m = ""; |
| 1050 | const ad = ""; | 1032 | const ad = ""; |
| ... | @@ -1095,8 +1077,6 @@ test "seal" { | ... | @@ -1095,8 +1077,6 @@ test "seal" { |
| 1095 | } | 1077 | } |
| 1096 | 1078 | ||
| 1097 | test "open" { | 1079 | test "open" { |
| 1098 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1099 | |||
| 1100 | { | 1080 | { |
| 1101 | const c = [_]u8{ 0xa0, 0x78, 0x4d, 0x7a, 0x47, 0x16, 0xf3, 0xfe, 0xb4, 0xf6, 0x4e, 0x7f, 0x4b, 0x39, 0xbf, 0x4 }; | 1081 | const c = [_]u8{ 0xa0, 0x78, 0x4d, 0x7a, 0x47, 0x16, 0xf3, 0xfe, 0xb4, 0xf6, 0x4e, 0x7f, 0x4b, 0x39, 0xbf, 0x4 }; |
| 1102 | const ad = ""; | 1082 | const ad = ""; |
| ... | @@ -1161,8 +1141,6 @@ test "open" { | ... | @@ -1161,8 +1141,6 @@ test "open" { |
| 1161 | } | 1141 | } |
| 1162 | 1142 | ||
| 1163 | test "crypto.xchacha20" { | 1143 | test "crypto.xchacha20" { |
| 1164 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1165 | |||
| 1166 | const key = [_]u8{69} ** 32; | 1144 | const key = [_]u8{69} ** 32; |
| 1167 | const nonce = [_]u8{42} ** 24; | 1145 | const nonce = [_]u8{42} ** 24; |
| 1168 | const m = "Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it."; | 1146 | const m = "Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it."; |
lib/std/crypto/cmac.zig-9| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const crypto = std.crypto; | 2 | const crypto = std.crypto; |
| 4 | const mem = std.mem; | 3 | const mem = std.mem; |
| 5 | 4 | ||
| ... | @@ -94,8 +93,6 @@ pub fn Cmac(comptime BlockCipher: type) type { | ... | @@ -94,8 +93,6 @@ pub fn Cmac(comptime BlockCipher: type) type { |
| 94 | const testing = std.testing; | 93 | const testing = std.testing; |
| 95 | 94 | ||
| 96 | test "CmacAes128 - Example 1: len = 0" { | 95 | test "CmacAes128 - Example 1: len = 0" { |
| 97 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 98 | |||
| 99 | const key = [_]u8{ | 96 | const key = [_]u8{ |
| 100 | 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c, | 97 | 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c, |
| 101 | }; | 98 | }; |
| ... | @@ -109,8 +106,6 @@ test "CmacAes128 - Example 1: len = 0" { | ... | @@ -109,8 +106,6 @@ test "CmacAes128 - Example 1: len = 0" { |
| 109 | } | 106 | } |
| 110 | 107 | ||
| 111 | test "CmacAes128 - Example 2: len = 16" { | 108 | test "CmacAes128 - Example 2: len = 16" { |
| 112 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 113 | |||
| 114 | const key = [_]u8{ | 109 | const key = [_]u8{ |
| 115 | 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c, | 110 | 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c, |
| 116 | }; | 111 | }; |
| ... | @@ -126,8 +121,6 @@ test "CmacAes128 - Example 2: len = 16" { | ... | @@ -126,8 +121,6 @@ test "CmacAes128 - Example 2: len = 16" { |
| 126 | } | 121 | } |
| 127 | 122 | ||
| 128 | test "CmacAes128 - Example 3: len = 40" { | 123 | test "CmacAes128 - Example 3: len = 40" { |
| 129 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 130 | |||
| 131 | const key = [_]u8{ | 124 | const key = [_]u8{ |
| 132 | 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c, | 125 | 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c, |
| 133 | }; | 126 | }; |
| ... | @@ -145,8 +138,6 @@ test "CmacAes128 - Example 3: len = 40" { | ... | @@ -145,8 +138,6 @@ test "CmacAes128 - Example 3: len = 40" { |
| 145 | } | 138 | } |
| 146 | 139 | ||
| 147 | test "CmacAes128 - Example 4: len = 64" { | 140 | test "CmacAes128 - Example 4: len = 64" { |
| 148 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 149 | |||
| 150 | const key = [_]u8{ | 141 | const key = [_]u8{ |
| 151 | 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c, | 142 | 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c, |
| 152 | }; | 143 | }; |
lib/std/crypto/ecdsa.zig+6-24| ... | @@ -372,10 +372,7 @@ pub fn Ecdsa(comptime Curve: type, comptime Hash: type) type { | ... | @@ -372,10 +372,7 @@ pub fn Ecdsa(comptime Curve: type, comptime Hash: type) type { |
| 372 | } | 372 | } |
| 373 | 373 | ||
| 374 | test "ECDSA - Basic operations over EcdsaP384Sha384" { | 374 | test "ECDSA - Basic operations over EcdsaP384Sha384" { |
| 375 | switch (builtin.zig_backend) { | 375 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 376 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 377 | else => {}, | ||
| 378 | } | ||
| 379 | 376 | ||
| 380 | const Scheme = EcdsaP384Sha384; | 377 | const Scheme = EcdsaP384Sha384; |
| 381 | const kp = try Scheme.KeyPair.create(null); | 378 | const kp = try Scheme.KeyPair.create(null); |
| ... | @@ -391,10 +388,7 @@ test "ECDSA - Basic operations over EcdsaP384Sha384" { | ... | @@ -391,10 +388,7 @@ test "ECDSA - Basic operations over EcdsaP384Sha384" { |
| 391 | } | 388 | } |
| 392 | 389 | ||
| 393 | test "ECDSA - Basic operations over Secp256k1" { | 390 | test "ECDSA - Basic operations over Secp256k1" { |
| 394 | switch (builtin.zig_backend) { | 391 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 395 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 396 | else => {}, | ||
| 397 | } | ||
| 398 | 392 | ||
| 399 | const Scheme = EcdsaSecp256k1Sha256oSha256; | 393 | const Scheme = EcdsaSecp256k1Sha256oSha256; |
| 400 | const kp = try Scheme.KeyPair.create(null); | 394 | const kp = try Scheme.KeyPair.create(null); |
| ... | @@ -410,10 +404,7 @@ test "ECDSA - Basic operations over Secp256k1" { | ... | @@ -410,10 +404,7 @@ test "ECDSA - Basic operations over Secp256k1" { |
| 410 | } | 404 | } |
| 411 | 405 | ||
| 412 | test "ECDSA - Basic operations over EcdsaP384Sha256" { | 406 | test "ECDSA - Basic operations over EcdsaP384Sha256" { |
| 413 | switch (builtin.zig_backend) { | 407 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 414 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 415 | else => {}, | ||
| 416 | } | ||
| 417 | 408 | ||
| 418 | const Scheme = Ecdsa(crypto.ecc.P384, crypto.hash.sha2.Sha256); | 409 | const Scheme = Ecdsa(crypto.ecc.P384, crypto.hash.sha2.Sha256); |
| 419 | const kp = try Scheme.KeyPair.create(null); | 410 | const kp = try Scheme.KeyPair.create(null); |
| ... | @@ -429,10 +420,7 @@ test "ECDSA - Basic operations over EcdsaP384Sha256" { | ... | @@ -429,10 +420,7 @@ test "ECDSA - Basic operations over EcdsaP384Sha256" { |
| 429 | } | 420 | } |
| 430 | 421 | ||
| 431 | test "ECDSA - Verifying a existing signature with EcdsaP384Sha256" { | 422 | test "ECDSA - Verifying a existing signature with EcdsaP384Sha256" { |
| 432 | switch (builtin.zig_backend) { | 423 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 433 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 434 | else => {}, | ||
| 435 | } | ||
| 436 | 424 | ||
| 437 | const Scheme = Ecdsa(crypto.ecc.P384, crypto.hash.sha2.Sha256); | 425 | const Scheme = Ecdsa(crypto.ecc.P384, crypto.hash.sha2.Sha256); |
| 438 | // zig fmt: off | 426 | // zig fmt: off |
| ... | @@ -476,10 +464,7 @@ const TestVector = struct { | ... | @@ -476,10 +464,7 @@ const TestVector = struct { |
| 476 | }; | 464 | }; |
| 477 | 465 | ||
| 478 | test "ECDSA - Test vectors from Project Wycheproof" { | 466 | test "ECDSA - Test vectors from Project Wycheproof" { |
| 479 | switch (builtin.zig_backend) { | 467 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 480 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 481 | else => {}, | ||
| 482 | } | ||
| 483 | 468 | ||
| 484 | const vectors = [_]TestVector{ | 469 | const vectors = [_]TestVector{ |
| 485 | .{ .key = "042927b10512bae3eddcfe467828128bad2903269919f7086069c8c4df6c732838c7787964eaac00e5921fb1498a60f4606766b3d9685001558d1a974e7341513e", .msg = "313233343030", .sig = "304402202ba3a8be6b94d5ec80a6d9d1190a436effe50d85a1eee859b8cc6af9bd5c2e1802204cd60b855d442f5b3c7b11eb6c4e0ae7525fe710fab9aa7c77a67f79e6fadd76", .result = .valid }, | 470 | .{ .key = "042927b10512bae3eddcfe467828128bad2903269919f7086069c8c4df6c732838c7787964eaac00e5921fb1498a60f4606766b3d9685001558d1a974e7341513e", .msg = "313233343030", .sig = "304402202ba3a8be6b94d5ec80a6d9d1190a436effe50d85a1eee859b8cc6af9bd5c2e1802204cd60b855d442f5b3c7b11eb6c4e0ae7525fe710fab9aa7c77a67f79e6fadd76", .result = .valid }, |
| ... | @@ -893,10 +878,7 @@ fn tvTry(vector: TestVector) !void { | ... | @@ -893,10 +878,7 @@ fn tvTry(vector: TestVector) !void { |
| 893 | } | 878 | } |
| 894 | 879 | ||
| 895 | test "ECDSA - Sec1 encoding/decoding" { | 880 | test "ECDSA - Sec1 encoding/decoding" { |
| 896 | switch (builtin.zig_backend) { | 881 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 897 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 898 | else => {}, | ||
| 899 | } | ||
| 900 | 882 | ||
| 901 | const Scheme = EcdsaP384Sha384; | 883 | const Scheme = EcdsaP384Sha384; |
| 902 | const kp = try Scheme.KeyPair.create(null); | 884 | const kp = try Scheme.KeyPair.create(null); |
lib/std/crypto/ff.zig+1-4| ... | @@ -912,10 +912,7 @@ const ct_unprotected = struct { | ... | @@ -912,10 +912,7 @@ const ct_unprotected = struct { |
| 912 | }; | 912 | }; |
| 913 | 913 | ||
| 914 | test { | 914 | test { |
| 915 | switch (@import("builtin").zig_backend) { | 915 | if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest; |
| 916 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 917 | else => {}, | ||
| 918 | } | ||
| 919 | 916 | ||
| 920 | const M = Modulus(256); | 917 | const M = Modulus(256); |
| 921 | const m = try M.fromPrimitive(u256, 3429938563481314093726330772853735541133072814650493833233); | 918 | const m = try M.fromPrimitive(u256, 3429938563481314093726330772853735541133072814650493833233); |
lib/std/crypto/ghash_polyval.zig-6| ... | @@ -422,8 +422,6 @@ fn Hash(comptime endian: std.builtin.Endian, comptime shift_key: bool) type { | ... | @@ -422,8 +422,6 @@ fn Hash(comptime endian: std.builtin.Endian, comptime shift_key: bool) type { |
| 422 | const htest = @import("test.zig"); | 422 | const htest = @import("test.zig"); |
| 423 | 423 | ||
| 424 | test "ghash" { | 424 | test "ghash" { |
| 425 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 426 | |||
| 427 | const key = [_]u8{0x42} ** 16; | 425 | const key = [_]u8{0x42} ** 16; |
| 428 | const m = [_]u8{0x69} ** 256; | 426 | const m = [_]u8{0x69} ** 256; |
| 429 | 427 | ||
| ... | @@ -441,8 +439,6 @@ test "ghash" { | ... | @@ -441,8 +439,6 @@ test "ghash" { |
| 441 | } | 439 | } |
| 442 | 440 | ||
| 443 | test "ghash2" { | 441 | test "ghash2" { |
| 444 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 445 | |||
| 446 | var key: [16]u8 = undefined; | 442 | var key: [16]u8 = undefined; |
| 447 | var i: usize = 0; | 443 | var i: usize = 0; |
| 448 | while (i < key.len) : (i += 1) { | 444 | while (i < key.len) : (i += 1) { |
| ... | @@ -476,8 +472,6 @@ test "ghash2" { | ... | @@ -476,8 +472,6 @@ test "ghash2" { |
| 476 | } | 472 | } |
| 477 | 473 | ||
| 478 | test "polyval" { | 474 | test "polyval" { |
| 479 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 480 | |||
| 481 | const key = [_]u8{0x42} ** 16; | 475 | const key = [_]u8{0x42} ** 16; |
| 482 | const m = [_]u8{0x69} ** 256; | 476 | const m = [_]u8{0x69} ** 256; |
| 483 | 477 |
lib/std/crypto/hash_composition.zig-2| ... | @@ -65,8 +65,6 @@ pub const Sha384oSha384 = Composition(sha2.Sha384, sha2.Sha384); | ... | @@ -65,8 +65,6 @@ pub const Sha384oSha384 = Composition(sha2.Sha384, sha2.Sha384); |
| 65 | pub const Sha512oSha512 = Composition(sha2.Sha512, sha2.Sha512); | 65 | pub const Sha512oSha512 = Composition(sha2.Sha512, sha2.Sha512); |
| 66 | 66 | ||
| 67 | test "Hash composition" { | 67 | test "Hash composition" { |
| 68 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 69 | |||
| 70 | const Sha256 = sha2.Sha256; | 68 | const Sha256 = sha2.Sha256; |
| 71 | const msg = "test"; | 69 | const msg = "test"; |
| 72 | 70 |
lib/std/crypto/hkdf.zig-2| ... | @@ -72,8 +72,6 @@ pub fn Hkdf(comptime Hmac: type) type { | ... | @@ -72,8 +72,6 @@ pub fn Hkdf(comptime Hmac: type) type { |
| 72 | const htest = @import("test.zig"); | 72 | const htest = @import("test.zig"); |
| 73 | 73 | ||
| 74 | test "Hkdf" { | 74 | test "Hkdf" { |
| 75 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 76 | |||
| 77 | const ikm = [_]u8{0x0b} ** 22; | 75 | const ikm = [_]u8{0x0b} ** 22; |
| 78 | const salt = [_]u8{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c }; | 76 | const salt = [_]u8{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c }; |
| 79 | const context = [_]u8{ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9 }; | 77 | const context = [_]u8{ 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9 }; |
lib/std/crypto/kyber_d00.zig-28| ... | @@ -553,8 +553,6 @@ const inv_ntt_reductions = [_]i16{ | ... | @@ -553,8 +553,6 @@ const inv_ntt_reductions = [_]i16{ |
| 553 | }; | 553 | }; |
| 554 | 554 | ||
| 555 | test "invNTTReductions bounds" { | 555 | test "invNTTReductions bounds" { |
| 556 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 557 | |||
| 558 | // Checks whether the reductions proposed by invNTTReductions | 556 | // Checks whether the reductions proposed by invNTTReductions |
| 559 | // don't overflow during invNTT(). | 557 | // don't overflow during invNTT(). |
| 560 | var xs = [_]i32{1} ** 256; // start at |x| ≤ q | 558 | var xs = [_]i32{1} ** 256; // start at |x| ≤ q |
| ... | @@ -658,8 +656,6 @@ fn montReduce(x: i32) i16 { | ... | @@ -658,8 +656,6 @@ fn montReduce(x: i32) i16 { |
| 658 | } | 656 | } |
| 659 | 657 | ||
| 660 | test "Test montReduce" { | 658 | test "Test montReduce" { |
| 661 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 662 | |||
| 663 | var rnd = RndGen.init(0); | 659 | var rnd = RndGen.init(0); |
| 664 | for (0..1000) |_| { | 660 | for (0..1000) |_| { |
| 665 | const bound = comptime @as(i32, Q) * (1 << 15); | 661 | const bound = comptime @as(i32, Q) * (1 << 15); |
| ... | @@ -678,8 +674,6 @@ fn feToMont(x: i16) i16 { | ... | @@ -678,8 +674,6 @@ fn feToMont(x: i16) i16 { |
| 678 | } | 674 | } |
| 679 | 675 | ||
| 680 | test "Test feToMont" { | 676 | test "Test feToMont" { |
| 681 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 682 | |||
| 683 | var x: i32 = -(1 << 15); | 677 | var x: i32 = -(1 << 15); |
| 684 | while (x < 1 << 15) : (x += 1) { | 678 | while (x < 1 << 15) : (x += 1) { |
| 685 | const y = feToMont(@as(i16, @intCast(x))); | 679 | const y = feToMont(@as(i16, @intCast(x))); |
| ... | @@ -713,8 +707,6 @@ fn feBarrettReduce(x: i16) i16 { | ... | @@ -713,8 +707,6 @@ fn feBarrettReduce(x: i16) i16 { |
| 713 | } | 707 | } |
| 714 | 708 | ||
| 715 | test "Test Barrett reduction" { | 709 | test "Test Barrett reduction" { |
| 716 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 717 | |||
| 718 | var x: i32 = -(1 << 15); | 710 | var x: i32 = -(1 << 15); |
| 719 | while (x < 1 << 15) : (x += 1) { | 711 | while (x < 1 << 15) : (x += 1) { |
| 720 | var y1 = feBarrettReduce(@as(i16, @intCast(x))); | 712 | var y1 = feBarrettReduce(@as(i16, @intCast(x))); |
| ... | @@ -735,8 +727,6 @@ fn csubq(x: i16) i16 { | ... | @@ -735,8 +727,6 @@ fn csubq(x: i16) i16 { |
| 735 | } | 727 | } |
| 736 | 728 | ||
| 737 | test "Test csubq" { | 729 | test "Test csubq" { |
| 738 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 739 | |||
| 740 | var x: i32 = -29439; | 730 | var x: i32 = -29439; |
| 741 | while (x < 1 << 15) : (x += 1) { | 731 | while (x < 1 << 15) : (x += 1) { |
| 742 | const y1 = csubq(@as(i16, @intCast(x))); | 732 | const y1 = csubq(@as(i16, @intCast(x))); |
| ... | @@ -1476,8 +1466,6 @@ fn cmov(comptime len: usize, dst: *[len]u8, src: [len]u8, b: u1) void { | ... | @@ -1476,8 +1466,6 @@ fn cmov(comptime len: usize, dst: *[len]u8, src: [len]u8, b: u1) void { |
| 1476 | } | 1466 | } |
| 1477 | 1467 | ||
| 1478 | test "MulHat" { | 1468 | test "MulHat" { |
| 1479 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1480 | |||
| 1481 | var rnd = RndGen.init(0); | 1469 | var rnd = RndGen.init(0); |
| 1482 | 1470 | ||
| 1483 | for (0..100) |_| { | 1471 | for (0..100) |_| { |
| ... | @@ -1509,8 +1497,6 @@ test "MulHat" { | ... | @@ -1509,8 +1497,6 @@ test "MulHat" { |
| 1509 | } | 1497 | } |
| 1510 | 1498 | ||
| 1511 | test "NTT" { | 1499 | test "NTT" { |
| 1512 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1513 | |||
| 1514 | var rnd = RndGen.init(0); | 1500 | var rnd = RndGen.init(0); |
| 1515 | 1501 | ||
| 1516 | for (0..1000) |_| { | 1502 | for (0..1000) |_| { |
| ... | @@ -1534,8 +1520,6 @@ test "NTT" { | ... | @@ -1534,8 +1520,6 @@ test "NTT" { |
| 1534 | } | 1520 | } |
| 1535 | 1521 | ||
| 1536 | test "Compression" { | 1522 | test "Compression" { |
| 1537 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1538 | |||
| 1539 | var rnd = RndGen.init(0); | 1523 | var rnd = RndGen.init(0); |
| 1540 | inline for (.{ 1, 4, 5, 10, 11 }) |d| { | 1524 | inline for (.{ 1, 4, 5, 10, 11 }) |d| { |
| 1541 | for (0..1000) |_| { | 1525 | for (0..1000) |_| { |
| ... | @@ -1548,8 +1532,6 @@ test "Compression" { | ... | @@ -1548,8 +1532,6 @@ test "Compression" { |
| 1548 | } | 1532 | } |
| 1549 | 1533 | ||
| 1550 | test "noise" { | 1534 | test "noise" { |
| 1551 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1552 | |||
| 1553 | var seed: [32]u8 = undefined; | 1535 | var seed: [32]u8 = undefined; |
| 1554 | for (&seed, 0..) |*s, i| { | 1536 | for (&seed, 0..) |*s, i| { |
| 1555 | s.* = @as(u8, @intCast(i)); | 1537 | s.* = @as(u8, @intCast(i)); |
| ... | @@ -1596,8 +1578,6 @@ test "noise" { | ... | @@ -1596,8 +1578,6 @@ test "noise" { |
| 1596 | } | 1578 | } |
| 1597 | 1579 | ||
| 1598 | test "uniform sampling" { | 1580 | test "uniform sampling" { |
| 1599 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1600 | |||
| 1601 | var seed: [32]u8 = undefined; | 1581 | var seed: [32]u8 = undefined; |
| 1602 | for (&seed, 0..) |*s, i| { | 1582 | for (&seed, 0..) |*s, i| { |
| 1603 | s.* = @as(u8, @intCast(i)); | 1583 | s.* = @as(u8, @intCast(i)); |
| ... | @@ -1631,8 +1611,6 @@ test "uniform sampling" { | ... | @@ -1631,8 +1611,6 @@ test "uniform sampling" { |
| 1631 | } | 1611 | } |
| 1632 | 1612 | ||
| 1633 | test "Polynomial packing" { | 1613 | test "Polynomial packing" { |
| 1634 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1635 | |||
| 1636 | var rnd = RndGen.init(0); | 1614 | var rnd = RndGen.init(0); |
| 1637 | 1615 | ||
| 1638 | for (0..1000) |_| { | 1616 | for (0..1000) |_| { |
| ... | @@ -1642,8 +1620,6 @@ test "Polynomial packing" { | ... | @@ -1642,8 +1620,6 @@ test "Polynomial packing" { |
| 1642 | } | 1620 | } |
| 1643 | 1621 | ||
| 1644 | test "Test inner PKE" { | 1622 | test "Test inner PKE" { |
| 1645 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1646 | |||
| 1647 | var seed: [32]u8 = undefined; | 1623 | var seed: [32]u8 = undefined; |
| 1648 | var pt: [32]u8 = undefined; | 1624 | var pt: [32]u8 = undefined; |
| 1649 | for (&seed, &pt, 0..) |*s, *p, i| { | 1625 | for (&seed, &pt, 0..) |*s, *p, i| { |
| ... | @@ -1665,8 +1641,6 @@ test "Test inner PKE" { | ... | @@ -1665,8 +1641,6 @@ test "Test inner PKE" { |
| 1665 | } | 1641 | } |
| 1666 | 1642 | ||
| 1667 | test "Test happy flow" { | 1643 | test "Test happy flow" { |
| 1668 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1669 | |||
| 1670 | var seed: [64]u8 = undefined; | 1644 | var seed: [64]u8 = undefined; |
| 1671 | for (&seed, 0..) |*s, i| { | 1645 | for (&seed, 0..) |*s, i| { |
| 1672 | s.* = @as(u8, @intCast(i)); | 1646 | s.* = @as(u8, @intCast(i)); |
| ... | @@ -1693,8 +1667,6 @@ test "Test happy flow" { | ... | @@ -1693,8 +1667,6 @@ test "Test happy flow" { |
| 1693 | const sha2 = crypto.hash.sha2; | 1667 | const sha2 = crypto.hash.sha2; |
| 1694 | 1668 | ||
| 1695 | test "NIST KAT test" { | 1669 | test "NIST KAT test" { |
| 1696 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1697 | |||
| 1698 | inline for (.{ | 1670 | inline for (.{ |
| 1699 | .{ Kyber512, "e9c2bd37133fcb40772f81559f14b1f58dccd1c816701be9ba6214d43baf4547" }, | 1671 | .{ Kyber512, "e9c2bd37133fcb40772f81559f14b1f58dccd1c816701be9ba6214d43baf4547" }, |
| 1700 | .{ Kyber1024, "89248f2f33f7f4f7051729111f3049c409a933ec904aedadf035f30fa5646cd5" }, | 1672 | .{ Kyber1024, "89248f2f33f7f4f7051729111f3049c409a933ec904aedadf035f30fa5646cd5" }, |
lib/std/crypto/pbkdf2.zig-15| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const mem = std.mem; | 2 | const mem = std.mem; |
| 4 | const maxInt = std.math.maxInt; | 3 | const maxInt = std.math.maxInt; |
| 5 | const OutputTooLongError = std.crypto.errors.OutputTooLongError; | 4 | const OutputTooLongError = std.crypto.errors.OutputTooLongError; |
| ... | @@ -152,8 +151,6 @@ const HmacSha1 = std.crypto.auth.hmac.HmacSha1; | ... | @@ -152,8 +151,6 @@ const HmacSha1 = std.crypto.auth.hmac.HmacSha1; |
| 152 | // RFC 6070 PBKDF2 HMAC-SHA1 Test Vectors | 151 | // RFC 6070 PBKDF2 HMAC-SHA1 Test Vectors |
| 153 | 152 | ||
| 154 | test "RFC 6070 one iteration" { | 153 | test "RFC 6070 one iteration" { |
| 155 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 156 | |||
| 157 | const p = "password"; | 154 | const p = "password"; |
| 158 | const s = "salt"; | 155 | const s = "salt"; |
| 159 | const c = 1; | 156 | const c = 1; |
| ... | @@ -169,8 +166,6 @@ test "RFC 6070 one iteration" { | ... | @@ -169,8 +166,6 @@ test "RFC 6070 one iteration" { |
| 169 | } | 166 | } |
| 170 | 167 | ||
| 171 | test "RFC 6070 two iterations" { | 168 | test "RFC 6070 two iterations" { |
| 172 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 173 | |||
| 174 | const p = "password"; | 169 | const p = "password"; |
| 175 | const s = "salt"; | 170 | const s = "salt"; |
| 176 | const c = 2; | 171 | const c = 2; |
| ... | @@ -186,8 +181,6 @@ test "RFC 6070 two iterations" { | ... | @@ -186,8 +181,6 @@ test "RFC 6070 two iterations" { |
| 186 | } | 181 | } |
| 187 | 182 | ||
| 188 | test "RFC 6070 4096 iterations" { | 183 | test "RFC 6070 4096 iterations" { |
| 189 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 190 | |||
| 191 | const p = "password"; | 184 | const p = "password"; |
| 192 | const s = "salt"; | 185 | const s = "salt"; |
| 193 | const c = 4096; | 186 | const c = 4096; |
| ... | @@ -203,8 +196,6 @@ test "RFC 6070 4096 iterations" { | ... | @@ -203,8 +196,6 @@ test "RFC 6070 4096 iterations" { |
| 203 | } | 196 | } |
| 204 | 197 | ||
| 205 | test "RFC 6070 16,777,216 iterations" { | 198 | test "RFC 6070 16,777,216 iterations" { |
| 206 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 207 | |||
| 208 | // These iteration tests are slow so we always skip them. Results have been verified. | 199 | // These iteration tests are slow so we always skip them. Results have been verified. |
| 209 | if (true) { | 200 | if (true) { |
| 210 | return error.SkipZigTest; | 201 | return error.SkipZigTest; |
| ... | @@ -225,8 +216,6 @@ test "RFC 6070 16,777,216 iterations" { | ... | @@ -225,8 +216,6 @@ test "RFC 6070 16,777,216 iterations" { |
| 225 | } | 216 | } |
| 226 | 217 | ||
| 227 | test "RFC 6070 multi-block salt and password" { | 218 | test "RFC 6070 multi-block salt and password" { |
| 228 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 229 | |||
| 230 | const p = "passwordPASSWORDpassword"; | 219 | const p = "passwordPASSWORDpassword"; |
| 231 | const s = "saltSALTsaltSALTsaltSALTsaltSALTsalt"; | 220 | const s = "saltSALTsaltSALTsaltSALTsaltSALTsalt"; |
| 232 | const c = 4096; | 221 | const c = 4096; |
| ... | @@ -242,8 +231,6 @@ test "RFC 6070 multi-block salt and password" { | ... | @@ -242,8 +231,6 @@ test "RFC 6070 multi-block salt and password" { |
| 242 | } | 231 | } |
| 243 | 232 | ||
| 244 | test "RFC 6070 embedded NUL" { | 233 | test "RFC 6070 embedded NUL" { |
| 245 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 246 | |||
| 247 | const p = "pass\x00word"; | 234 | const p = "pass\x00word"; |
| 248 | const s = "sa\x00lt"; | 235 | const s = "sa\x00lt"; |
| 249 | const c = 4096; | 236 | const c = 4096; |
| ... | @@ -259,8 +246,6 @@ test "RFC 6070 embedded NUL" { | ... | @@ -259,8 +246,6 @@ test "RFC 6070 embedded NUL" { |
| 259 | } | 246 | } |
| 260 | 247 | ||
| 261 | test "Very large dk_len" { | 248 | test "Very large dk_len" { |
| 262 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 263 | |||
| 264 | // This test allocates 8GB of memory and is expected to take several hours to run. | 249 | // This test allocates 8GB of memory and is expected to take several hours to run. |
| 265 | if (true) { | 250 | if (true) { |
| 266 | return error.SkipZigTest; | 251 | return error.SkipZigTest; |
lib/std/crypto/pcurves/p256.zig-2| ... | @@ -478,7 +478,5 @@ pub const AffineCoordinates = struct { | ... | @@ -478,7 +478,5 @@ pub const AffineCoordinates = struct { |
| 478 | }; | 478 | }; |
| 479 | 479 | ||
| 480 | test { | 480 | test { |
| 481 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 482 | |||
| 483 | _ = @import("tests/p256.zig"); | 481 | _ = @import("tests/p256.zig"); |
| 484 | } | 482 | } |
lib/std/crypto/pcurves/p384.zig+1-4| ... | @@ -478,10 +478,7 @@ pub const AffineCoordinates = struct { | ... | @@ -478,10 +478,7 @@ pub const AffineCoordinates = struct { |
| 478 | }; | 478 | }; |
| 479 | 479 | ||
| 480 | test { | 480 | test { |
| 481 | switch (@import("builtin").zig_backend) { | 481 | if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest; |
| 482 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 483 | else => {}, | ||
| 484 | } | ||
| 485 | 482 | ||
| 486 | _ = @import("tests/p384.zig"); | 483 | _ = @import("tests/p384.zig"); |
| 487 | } | 484 | } |
lib/std/crypto/pcurves/secp256k1.zig+1-4| ... | @@ -556,10 +556,7 @@ pub const AffineCoordinates = struct { | ... | @@ -556,10 +556,7 @@ pub const AffineCoordinates = struct { |
| 556 | }; | 556 | }; |
| 557 | 557 | ||
| 558 | test { | 558 | test { |
| 559 | switch (@import("builtin").zig_backend) { | 559 | if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest; |
| 560 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 561 | else => {}, | ||
| 562 | } | ||
| 563 | 560 | ||
| 564 | _ = @import("tests/secp256k1.zig"); | 561 | _ = @import("tests/secp256k1.zig"); |
| 565 | } | 562 | } |
lib/std/crypto/phc_encoding.zig-9| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | // https://github.com/P-H-C/phc-string-format | 1 | // https://github.com/P-H-C/phc-string-format |
| 2 | 2 | ||
| 3 | const std = @import("std"); | 3 | const std = @import("std"); |
| 4 | const builtin = @import("builtin"); | ||
| 5 | const fmt = std.fmt; | 4 | const fmt = std.fmt; |
| 6 | const io = std.io; | 5 | const io = std.io; |
| 7 | const mem = std.mem; | 6 | const mem = std.mem; |
| ... | @@ -264,8 +263,6 @@ fn kvSplit(str: []const u8) !struct { key: []const u8, value: []const u8 } { | ... | @@ -264,8 +263,6 @@ fn kvSplit(str: []const u8) !struct { key: []const u8, value: []const u8 } { |
| 264 | } | 263 | } |
| 265 | 264 | ||
| 266 | test "phc format - encoding/decoding" { | 265 | test "phc format - encoding/decoding" { |
| 267 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 268 | |||
| 269 | const Input = struct { | 266 | const Input = struct { |
| 270 | str: []const u8, | 267 | str: []const u8, |
| 271 | HashResult: type, | 268 | HashResult: type, |
| ... | @@ -351,24 +348,18 @@ test "phc format - encoding/decoding" { | ... | @@ -351,24 +348,18 @@ test "phc format - encoding/decoding" { |
| 351 | } | 348 | } |
| 352 | 349 | ||
| 353 | test "phc format - empty input string" { | 350 | test "phc format - empty input string" { |
| 354 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 355 | |||
| 356 | const s = ""; | 351 | const s = ""; |
| 357 | const v = deserialize(struct { alg_id: []const u8 }, s); | 352 | const v = deserialize(struct { alg_id: []const u8 }, s); |
| 358 | try std.testing.expectError(Error.InvalidEncoding, v); | 353 | try std.testing.expectError(Error.InvalidEncoding, v); |
| 359 | } | 354 | } |
| 360 | 355 | ||
| 361 | test "phc format - hash without salt" { | 356 | test "phc format - hash without salt" { |
| 362 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 363 | |||
| 364 | const s = "$scrypt"; | 357 | const s = "$scrypt"; |
| 365 | const v = deserialize(struct { alg_id: []const u8, hash: BinValue(16) }, s); | 358 | const v = deserialize(struct { alg_id: []const u8, hash: BinValue(16) }, s); |
| 366 | try std.testing.expectError(Error.InvalidEncoding, v); | 359 | try std.testing.expectError(Error.InvalidEncoding, v); |
| 367 | } | 360 | } |
| 368 | 361 | ||
| 369 | test "phc format - calcSize" { | 362 | test "phc format - calcSize" { |
| 370 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 371 | |||
| 372 | const s = "$scrypt$v=1$ln=15,r=8,p=1$c2FsdHNhbHQ$dGVzdHBhc3M"; | 363 | const s = "$scrypt$v=1$ln=15,r=8,p=1$c2FsdHNhbHQ$dGVzdHBhc3M"; |
| 373 | const v = try deserialize(struct { | 364 | const v = try deserialize(struct { |
| 374 | alg_id: []const u8, | 365 | alg_id: []const u8, |
lib/std/crypto/poly1305.zig-2| ... | @@ -196,8 +196,6 @@ pub const Poly1305 = struct { | ... | @@ -196,8 +196,6 @@ pub const Poly1305 = struct { |
| 196 | }; | 196 | }; |
| 197 | 197 | ||
| 198 | test "poly1305 rfc7439 vector1" { | 198 | test "poly1305 rfc7439 vector1" { |
| 199 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 200 | |||
| 201 | const expected_mac = "\xa8\x06\x1d\xc1\x30\x51\x36\xc6\xc2\x2b\x8b\xaf\x0c\x01\x27\xa9"; | 199 | const expected_mac = "\xa8\x06\x1d\xc1\x30\x51\x36\xc6\xc2\x2b\x8b\xaf\x0c\x01\x27\xa9"; |
| 202 | 200 | ||
| 203 | const msg = "Cryptographic Forum Research Group"; | 201 | const msg = "Cryptographic Forum Research Group"; |
lib/std/crypto/salsa20.zig-12| ... | @@ -555,8 +555,6 @@ pub const SealedBox = struct { | ... | @@ -555,8 +555,6 @@ pub const SealedBox = struct { |
| 555 | const htest = @import("test.zig"); | 555 | const htest = @import("test.zig"); |
| 556 | 556 | ||
| 557 | test "(x)salsa20" { | 557 | test "(x)salsa20" { |
| 558 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 559 | |||
| 560 | const key = [_]u8{0x69} ** 32; | 558 | const key = [_]u8{0x69} ** 32; |
| 561 | const nonce = [_]u8{0x42} ** 8; | 559 | const nonce = [_]u8{0x42} ** 8; |
| 562 | const msg = [_]u8{0} ** 20; | 560 | const msg = [_]u8{0} ** 20; |
| ... | @@ -571,8 +569,6 @@ test "(x)salsa20" { | ... | @@ -571,8 +569,6 @@ test "(x)salsa20" { |
| 571 | } | 569 | } |
| 572 | 570 | ||
| 573 | test "xsalsa20poly1305" { | 571 | test "xsalsa20poly1305" { |
| 574 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 575 | |||
| 576 | var msg: [100]u8 = undefined; | 572 | var msg: [100]u8 = undefined; |
| 577 | var msg2: [msg.len]u8 = undefined; | 573 | var msg2: [msg.len]u8 = undefined; |
| 578 | var c: [msg.len]u8 = undefined; | 574 | var c: [msg.len]u8 = undefined; |
| ... | @@ -588,8 +584,6 @@ test "xsalsa20poly1305" { | ... | @@ -588,8 +584,6 @@ test "xsalsa20poly1305" { |
| 588 | } | 584 | } |
| 589 | 585 | ||
| 590 | test "xsalsa20poly1305 secretbox" { | 586 | test "xsalsa20poly1305 secretbox" { |
| 591 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 592 | |||
| 593 | var msg: [100]u8 = undefined; | 587 | var msg: [100]u8 = undefined; |
| 594 | var msg2: [msg.len]u8 = undefined; | 588 | var msg2: [msg.len]u8 = undefined; |
| 595 | var key: [XSalsa20Poly1305.key_length]u8 = undefined; | 589 | var key: [XSalsa20Poly1305.key_length]u8 = undefined; |
| ... | @@ -604,8 +598,6 @@ test "xsalsa20poly1305 secretbox" { | ... | @@ -604,8 +598,6 @@ test "xsalsa20poly1305 secretbox" { |
| 604 | } | 598 | } |
| 605 | 599 | ||
| 606 | test "xsalsa20poly1305 box" { | 600 | test "xsalsa20poly1305 box" { |
| 607 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 608 | |||
| 609 | var msg: [100]u8 = undefined; | 601 | var msg: [100]u8 = undefined; |
| 610 | var msg2: [msg.len]u8 = undefined; | 602 | var msg2: [msg.len]u8 = undefined; |
| 611 | var nonce: [Box.nonce_length]u8 = undefined; | 603 | var nonce: [Box.nonce_length]u8 = undefined; |
| ... | @@ -620,8 +612,6 @@ test "xsalsa20poly1305 box" { | ... | @@ -620,8 +612,6 @@ test "xsalsa20poly1305 box" { |
| 620 | } | 612 | } |
| 621 | 613 | ||
| 622 | test "xsalsa20poly1305 sealedbox" { | 614 | test "xsalsa20poly1305 sealedbox" { |
| 623 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 624 | |||
| 625 | var msg: [100]u8 = undefined; | 615 | var msg: [100]u8 = undefined; |
| 626 | var msg2: [msg.len]u8 = undefined; | 616 | var msg2: [msg.len]u8 = undefined; |
| 627 | var boxed: [msg.len + SealedBox.seal_length]u8 = undefined; | 617 | var boxed: [msg.len + SealedBox.seal_length]u8 = undefined; |
| ... | @@ -633,8 +623,6 @@ test "xsalsa20poly1305 sealedbox" { | ... | @@ -633,8 +623,6 @@ test "xsalsa20poly1305 sealedbox" { |
| 633 | } | 623 | } |
| 634 | 624 | ||
| 635 | test "secretbox twoblocks" { | 625 | test "secretbox twoblocks" { |
| 636 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 637 | |||
| 638 | const key = [_]u8{ 0xc9, 0xc9, 0x4d, 0xcf, 0x68, 0xbe, 0x00, 0xe4, 0x7f, 0xe6, 0x13, 0x26, 0xfc, 0xc4, 0x2f, 0xd0, 0xdb, 0x93, 0x91, 0x1c, 0x09, 0x94, 0x89, 0xe1, 0x1b, 0x88, 0x63, 0x18, 0x86, 0x64, 0x8b, 0x7b }; | 626 | const key = [_]u8{ 0xc9, 0xc9, 0x4d, 0xcf, 0x68, 0xbe, 0x00, 0xe4, 0x7f, 0xe6, 0x13, 0x26, 0xfc, 0xc4, 0x2f, 0xd0, 0xdb, 0x93, 0x91, 0x1c, 0x09, 0x94, 0x89, 0xe1, 0x1b, 0x88, 0x63, 0x18, 0x86, 0x64, 0x8b, 0x7b }; |
| 639 | const nonce = [_]u8{ 0xa4, 0x33, 0xe9, 0x0a, 0x07, 0x68, 0x6e, 0x9a, 0x2b, 0x6d, 0xd4, 0x59, 0x04, 0x72, 0x3e, 0xd3, 0x8a, 0x67, 0x55, 0xc7, 0x9e, 0x3e, 0x77, 0xdc }; | 627 | const nonce = [_]u8{ 0xa4, 0x33, 0xe9, 0x0a, 0x07, 0x68, 0x6e, 0x9a, 0x2b, 0x6d, 0xd4, 0x59, 0x04, 0x72, 0x3e, 0xd3, 0x8a, 0x67, 0x55, 0xc7, 0x9e, 0x3e, 0x77, 0xdc }; |
| 640 | const msg = [_]u8{'a'} ** 97; | 628 | const msg = [_]u8{'a'} ** 97; |
lib/std/crypto/scrypt.zig-5| ... | @@ -3,7 +3,6 @@ | ... | @@ -3,7 +3,6 @@ |
| 3 | // https://github.com/Tarsnap/scrypt | 3 | // https://github.com/Tarsnap/scrypt |
| 4 | 4 | ||
| 5 | const std = @import("std"); | 5 | const std = @import("std"); |
| 6 | const builtin = @import("builtin"); | ||
| 7 | const crypto = std.crypto; | 6 | const crypto = std.crypto; |
| 8 | const fmt = std.fmt; | 7 | const fmt = std.fmt; |
| 9 | const io = std.io; | 8 | const io = std.io; |
| ... | @@ -684,8 +683,6 @@ test "unix-scrypt" { | ... | @@ -684,8 +683,6 @@ test "unix-scrypt" { |
| 684 | } | 683 | } |
| 685 | 684 | ||
| 686 | test "crypt format" { | 685 | test "crypt format" { |
| 687 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 688 | |||
| 689 | const str = "$7$C6..../....SodiumChloride$kBGj9fHznVYFQMEn/qDCfrDevf9YDtcDdKvEqHJLV8D"; | 686 | const str = "$7$C6..../....SodiumChloride$kBGj9fHznVYFQMEn/qDCfrDevf9YDtcDdKvEqHJLV8D"; |
| 690 | const params = try crypt_format.deserialize(crypt_format.HashResult(32), str); | 687 | const params = try crypt_format.deserialize(crypt_format.HashResult(32), str); |
| 691 | var buf: [str.len]u8 = undefined; | 688 | var buf: [str.len]u8 = undefined; |
| ... | @@ -694,8 +691,6 @@ test "crypt format" { | ... | @@ -694,8 +691,6 @@ test "crypt format" { |
| 694 | } | 691 | } |
| 695 | 692 | ||
| 696 | test "kdf fast" { | 693 | test "kdf fast" { |
| 697 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 698 | |||
| 699 | const TestVector = struct { | 694 | const TestVector = struct { |
| 700 | password: []const u8, | 695 | password: []const u8, |
| 701 | salt: []const u8, | 696 | salt: []const u8, |
lib/std/crypto/sha2.zig+1-11| ... | @@ -238,7 +238,7 @@ fn Sha2x32(comptime params: Sha2Params32) type { | ... | @@ -238,7 +238,7 @@ fn Sha2x32(comptime params: Sha2Params32) type { |
| 238 | return; | 238 | return; |
| 239 | }, | 239 | }, |
| 240 | // C backend doesn't currently support passing vectors to inline asm. | 240 | // C backend doesn't currently support passing vectors to inline asm. |
| 241 | .x86_64 => if (builtin.zig_backend != .stage2_c and builtin.zig_backend != .stage2_x86_64 and comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .sha, .avx2 })) { | 241 | .x86_64 => if (builtin.zig_backend != .stage2_c and comptime std.Target.x86.featureSetHasAll(builtin.cpu.features, .{ .sha, .avx2 })) { |
| 242 | var x: v4u32 = [_]u32{ d.s[5], d.s[4], d.s[1], d.s[0] }; | 242 | var x: v4u32 = [_]u32{ d.s[5], d.s[4], d.s[1], d.s[0] }; |
| 243 | var y: v4u32 = [_]u32{ d.s[7], d.s[6], d.s[3], d.s[2] }; | 243 | var y: v4u32 = [_]u32{ d.s[7], d.s[6], d.s[3], d.s[2] }; |
| 244 | const s_v = @as(*[16]v4u32, @ptrCast(&s)); | 244 | const s_v = @as(*[16]v4u32, @ptrCast(&s)); |
| ... | @@ -406,16 +406,12 @@ fn Sha2x32(comptime params: Sha2Params32) type { | ... | @@ -406,16 +406,12 @@ fn Sha2x32(comptime params: Sha2Params32) type { |
| 406 | } | 406 | } |
| 407 | 407 | ||
| 408 | test "sha224 single" { | 408 | test "sha224 single" { |
| 409 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 410 | |||
| 411 | try htest.assertEqualHash(Sha224, "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", ""); | 409 | try htest.assertEqualHash(Sha224, "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f", ""); |
| 412 | try htest.assertEqualHash(Sha224, "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7", "abc"); | 410 | try htest.assertEqualHash(Sha224, "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7", "abc"); |
| 413 | try htest.assertEqualHash(Sha224, "c97ca9a559850ce97a04a96def6d99a9e0e0e2ab14e6b8df265fc0b3", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"); | 411 | try htest.assertEqualHash(Sha224, "c97ca9a559850ce97a04a96def6d99a9e0e0e2ab14e6b8df265fc0b3", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"); |
| 414 | } | 412 | } |
| 415 | 413 | ||
| 416 | test "sha224 streaming" { | 414 | test "sha224 streaming" { |
| 417 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 418 | |||
| 419 | var h = Sha224.init(.{}); | 415 | var h = Sha224.init(.{}); |
| 420 | var out: [28]u8 = undefined; | 416 | var out: [28]u8 = undefined; |
| 421 | 417 | ||
| ... | @@ -436,16 +432,12 @@ test "sha224 streaming" { | ... | @@ -436,16 +432,12 @@ test "sha224 streaming" { |
| 436 | } | 432 | } |
| 437 | 433 | ||
| 438 | test "sha256 single" { | 434 | test "sha256 single" { |
| 439 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 440 | |||
| 441 | try htest.assertEqualHash(Sha256, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", ""); | 435 | try htest.assertEqualHash(Sha256, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", ""); |
| 442 | try htest.assertEqualHash(Sha256, "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", "abc"); | 436 | try htest.assertEqualHash(Sha256, "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", "abc"); |
| 443 | try htest.assertEqualHash(Sha256, "cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"); | 437 | try htest.assertEqualHash(Sha256, "cf5b16a778af8380036ce59e7b0492370b249b11e8f07a51afac45037afee9d1", "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu"); |
| 444 | } | 438 | } |
| 445 | 439 | ||
| 446 | test "sha256 streaming" { | 440 | test "sha256 streaming" { |
| 447 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 448 | |||
| 449 | var h = Sha256.init(.{}); | 441 | var h = Sha256.init(.{}); |
| 450 | var out: [32]u8 = undefined; | 442 | var out: [32]u8 = undefined; |
| 451 | 443 | ||
| ... | @@ -466,8 +458,6 @@ test "sha256 streaming" { | ... | @@ -466,8 +458,6 @@ test "sha256 streaming" { |
| 466 | } | 458 | } |
| 467 | 459 | ||
| 468 | test "sha256 aligned final" { | 460 | test "sha256 aligned final" { |
| 469 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 470 | |||
| 471 | var block = [_]u8{0} ** Sha256.block_length; | 461 | var block = [_]u8{0} ** Sha256.block_length; |
| 472 | var out: [Sha256.digest_length]u8 = undefined; | 462 | var out: [Sha256.digest_length]u8 = undefined; |
| 473 | 463 |
lib/std/crypto/utils.zig-2| ... | @@ -149,8 +149,6 @@ test "crypto.utils.timingSafeEql" { | ... | @@ -149,8 +149,6 @@ test "crypto.utils.timingSafeEql" { |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | test "crypto.utils.timingSafeEql (vectors)" { | 151 | test "crypto.utils.timingSafeEql (vectors)" { |
| 152 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 153 | |||
| 154 | var a: [100]u8 = undefined; | 152 | var a: [100]u8 = undefined; |
| 155 | var b: [100]u8 = undefined; | 153 | var b: [100]u8 = undefined; |
| 156 | random.bytes(a[0..]); | 154 | random.bytes(a[0..]); |
lib/std/debug.zig-2| ... | @@ -2513,8 +2513,6 @@ pub fn dumpStackPointerAddr(prefix: []const u8) void { | ... | @@ -2513,8 +2513,6 @@ pub fn dumpStackPointerAddr(prefix: []const u8) void { |
| 2513 | } | 2513 | } |
| 2514 | 2514 | ||
| 2515 | test "manage resources correctly" { | 2515 | test "manage resources correctly" { |
| 2516 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2517 | |||
| 2518 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 2516 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 2519 | 2517 | ||
| 2520 | if (builtin.os.tag == .windows) { | 2518 | if (builtin.os.tag == .windows) { |
lib/std/dwarf/expressions.zig-2| ... | @@ -1054,8 +1054,6 @@ fn isOpcodeRegisterLocation(opcode: u8) bool { | ... | @@ -1054,8 +1054,6 @@ fn isOpcodeRegisterLocation(opcode: u8) bool { |
| 1054 | 1054 | ||
| 1055 | const testing = std.testing; | 1055 | const testing = std.testing; |
| 1056 | test "DWARF expressions" { | 1056 | test "DWARF expressions" { |
| 1057 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1058 | |||
| 1059 | const allocator = std.testing.allocator; | 1057 | const allocator = std.testing.allocator; |
| 1060 | 1058 | ||
| 1061 | const options = ExpressionOptions{}; | 1059 | const options = ExpressionOptions{}; |
lib/std/fifo.zig-2| ... | @@ -505,8 +505,6 @@ test "LinearFifo(u8, .Dynamic)" { | ... | @@ -505,8 +505,6 @@ test "LinearFifo(u8, .Dynamic)" { |
| 505 | } | 505 | } |
| 506 | 506 | ||
| 507 | test "LinearFifo" { | 507 | test "LinearFifo" { |
| 508 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 509 | |||
| 510 | inline for ([_]type{ u1, u8, u16, u64 }) |T| { | 508 | inline for ([_]type{ u1, u8, u16, u64 }) |T| { |
| 511 | inline for ([_]LinearFifoBufferType{ LinearFifoBufferType{ .Static = 32 }, .Slice, .Dynamic }) |bt| { | 509 | inline for ([_]LinearFifoBufferType{ LinearFifoBufferType{ .Static = 32 }, .Slice, .Dynamic }) |bt| { |
| 512 | const FifoType = LinearFifo(T, bt); | 510 | const FifoType = LinearFifo(T, bt); |
lib/std/fmt.zig-24| ... | @@ -2129,8 +2129,6 @@ test "int.small" { | ... | @@ -2129,8 +2129,6 @@ test "int.small" { |
| 2129 | } | 2129 | } |
| 2130 | 2130 | ||
| 2131 | test "int.specifier" { | 2131 | test "int.specifier" { |
| 2132 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2133 | |||
| 2134 | { | 2132 | { |
| 2135 | const value: u8 = 'a'; | 2133 | const value: u8 = 'a'; |
| 2136 | try expectFmt("u8: a\n", "u8: {c}\n", .{value}); | 2134 | try expectFmt("u8: a\n", "u8: {c}\n", .{value}); |
| ... | @@ -2181,8 +2179,6 @@ test "int.padded" { | ... | @@ -2181,8 +2179,6 @@ test "int.padded" { |
| 2181 | } | 2179 | } |
| 2182 | 2180 | ||
| 2183 | test "buffer" { | 2181 | test "buffer" { |
| 2184 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2185 | |||
| 2186 | { | 2182 | { |
| 2187 | var buf1: [32]u8 = undefined; | 2183 | var buf1: [32]u8 = undefined; |
| 2188 | var fbs = std.io.fixedBufferStream(&buf1); | 2184 | var fbs = std.io.fixedBufferStream(&buf1); |
| ... | @@ -2379,8 +2375,6 @@ test "float.scientific" { | ... | @@ -2379,8 +2375,6 @@ test "float.scientific" { |
| 2379 | } | 2375 | } |
| 2380 | 2376 | ||
| 2381 | test "float.scientific.precision" { | 2377 | test "float.scientific.precision" { |
| 2382 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2383 | |||
| 2384 | try expectFmt("f64: 1.40971e-42", "f64: {e:.5}", .{@as(f64, 1.409706e-42)}); | 2378 | try expectFmt("f64: 1.40971e-42", "f64: {e:.5}", .{@as(f64, 1.409706e-42)}); |
| 2385 | try expectFmt("f64: 1.00000e-09", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 814313563))))}); | 2379 | try expectFmt("f64: 1.00000e-09", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 814313563))))}); |
| 2386 | try expectFmt("f64: 7.81250e-03", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1006632960))))}); | 2380 | try expectFmt("f64: 7.81250e-03", "f64: {e:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1006632960))))}); |
| ... | @@ -2441,8 +2435,6 @@ test "float.hexadecimal" { | ... | @@ -2441,8 +2435,6 @@ test "float.hexadecimal" { |
| 2441 | } | 2435 | } |
| 2442 | 2436 | ||
| 2443 | test "float.hexadecimal.precision" { | 2437 | test "float.hexadecimal.precision" { |
| 2444 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2445 | |||
| 2446 | try expectFmt("f16: 0x1.5p-2", "f16: {x:.1}", .{@as(f16, 1.0 / 3.0)}); | 2438 | try expectFmt("f16: 0x1.5p-2", "f16: {x:.1}", .{@as(f16, 1.0 / 3.0)}); |
| 2447 | try expectFmt("f32: 0x1.555p-2", "f32: {x:.3}", .{@as(f32, 1.0 / 3.0)}); | 2439 | try expectFmt("f32: 0x1.555p-2", "f32: {x:.3}", .{@as(f32, 1.0 / 3.0)}); |
| 2448 | try expectFmt("f64: 0x1.55555p-2", "f64: {x:.5}", .{@as(f64, 1.0 / 3.0)}); | 2440 | try expectFmt("f64: 0x1.55555p-2", "f64: {x:.5}", .{@as(f64, 1.0 / 3.0)}); |
| ... | @@ -2457,8 +2449,6 @@ test "float.hexadecimal.precision" { | ... | @@ -2457,8 +2449,6 @@ test "float.hexadecimal.precision" { |
| 2457 | } | 2449 | } |
| 2458 | 2450 | ||
| 2459 | test "float.decimal" { | 2451 | test "float.decimal" { |
| 2460 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2461 | |||
| 2462 | try expectFmt("f64: 152314000000000000000000000000", "f64: {d}", .{@as(f64, 1.52314e+29)}); | 2452 | try expectFmt("f64: 152314000000000000000000000000", "f64: {d}", .{@as(f64, 1.52314e+29)}); |
| 2463 | try expectFmt("f32: 0", "f32: {d}", .{@as(f32, 0.0)}); | 2453 | try expectFmt("f32: 0", "f32: {d}", .{@as(f32, 0.0)}); |
| 2464 | try expectFmt("f32: 0", "f32: {d:.0}", .{@as(f32, 0.0)}); | 2454 | try expectFmt("f32: 0", "f32: {d:.0}", .{@as(f32, 0.0)}); |
| ... | @@ -2482,8 +2472,6 @@ test "float.decimal" { | ... | @@ -2482,8 +2472,6 @@ test "float.decimal" { |
| 2482 | } | 2472 | } |
| 2483 | 2473 | ||
| 2484 | test "float.libc.sanity" { | 2474 | test "float.libc.sanity" { |
| 2485 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2486 | |||
| 2487 | try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 916964781))))}); | 2475 | try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 916964781))))}); |
| 2488 | try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 925353389))))}); | 2476 | try expectFmt("f64: 0.00001", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 925353389))))}); |
| 2489 | try expectFmt("f64: 0.10000", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1036831278))))}); | 2477 | try expectFmt("f64: 0.10000", "f64: {d:.5}", .{@as(f64, @as(f32, @bitCast(@as(u32, 1036831278))))}); |
| ... | @@ -2503,8 +2491,6 @@ test "float.libc.sanity" { | ... | @@ -2503,8 +2491,6 @@ test "float.libc.sanity" { |
| 2503 | } | 2491 | } |
| 2504 | 2492 | ||
| 2505 | test "custom" { | 2493 | test "custom" { |
| 2506 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2507 | |||
| 2508 | const Vec2 = struct { | 2494 | const Vec2 = struct { |
| 2509 | const SelfType = @This(); | 2495 | const SelfType = @This(); |
| 2510 | x: f32, | 2496 | x: f32, |
| ... | @@ -2683,8 +2669,6 @@ test "formatFloatValue with comptime_float" { | ... | @@ -2683,8 +2669,6 @@ test "formatFloatValue with comptime_float" { |
| 2683 | } | 2669 | } |
| 2684 | 2670 | ||
| 2685 | test "formatType max_depth" { | 2671 | test "formatType max_depth" { |
| 2686 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2687 | |||
| 2688 | const Vec2 = struct { | 2672 | const Vec2 = struct { |
| 2689 | const SelfType = @This(); | 2673 | const SelfType = @This(); |
| 2690 | x: f32, | 2674 | x: f32, |
| ... | @@ -2751,8 +2735,6 @@ test "formatType max_depth" { | ... | @@ -2751,8 +2735,6 @@ test "formatType max_depth" { |
| 2751 | } | 2735 | } |
| 2752 | 2736 | ||
| 2753 | test "positional" { | 2737 | test "positional" { |
| 2754 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2755 | |||
| 2756 | try expectFmt("2 1 0", "{2} {1} {0}", .{ @as(usize, 0), @as(usize, 1), @as(usize, 2) }); | 2738 | try expectFmt("2 1 0", "{2} {1} {0}", .{ @as(usize, 0), @as(usize, 1), @as(usize, 2) }); |
| 2757 | try expectFmt("2 1 0", "{2} {1} {}", .{ @as(usize, 0), @as(usize, 1), @as(usize, 2) }); | 2739 | try expectFmt("2 1 0", "{2} {1} {}", .{ @as(usize, 0), @as(usize, 1), @as(usize, 2) }); |
| 2758 | try expectFmt("0 0", "{0} {0}", .{@as(usize, 0)}); | 2740 | try expectFmt("0 0", "{0} {0}", .{@as(usize, 0)}); |
| ... | @@ -2761,20 +2743,14 @@ test "positional" { | ... | @@ -2761,20 +2743,14 @@ test "positional" { |
| 2761 | } | 2743 | } |
| 2762 | 2744 | ||
| 2763 | test "positional with specifier" { | 2745 | test "positional with specifier" { |
| 2764 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2765 | |||
| 2766 | try expectFmt("10.0", "{0d:.1}", .{@as(f64, 9.999)}); | 2746 | try expectFmt("10.0", "{0d:.1}", .{@as(f64, 9.999)}); |
| 2767 | } | 2747 | } |
| 2768 | 2748 | ||
| 2769 | test "positional/alignment/width/precision" { | 2749 | test "positional/alignment/width/precision" { |
| 2770 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2771 | |||
| 2772 | try expectFmt("10.0", "{0d: >3.1}", .{@as(f64, 9.999)}); | 2750 | try expectFmt("10.0", "{0d: >3.1}", .{@as(f64, 9.999)}); |
| 2773 | } | 2751 | } |
| 2774 | 2752 | ||
| 2775 | test "vector" { | 2753 | test "vector" { |
| 2776 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2777 | |||
| 2778 | if (builtin.target.cpu.arch == .riscv64) { | 2754 | if (builtin.target.cpu.arch == .riscv64) { |
| 2779 | // https://github.com/ziglang/zig/issues/4486 | 2755 | // https://github.com/ziglang/zig/issues/4486 |
| 2780 | return error.SkipZigTest; | 2756 | return error.SkipZigTest; |
lib/std/fmt/parse_float.zig+1-17| ... | @@ -1,8 +1,8 @@ | ... | @@ -1,8 +1,8 @@ |
| 1 | pub const parseFloat = @import("parse_float/parse_float.zig").parseFloat; | 1 | pub const parseFloat = @import("parse_float/parse_float.zig").parseFloat; |
| 2 | pub const ParseFloatError = @import("parse_float/parse_float.zig").ParseFloatError; | 2 | pub const ParseFloatError = @import("parse_float/parse_float.zig").ParseFloatError; |
| 3 | 3 | ||
| 4 | const std = @import("std"); | ||
| 5 | const builtin = @import("builtin"); | 4 | const builtin = @import("builtin"); |
| 5 | const std = @import("std"); | ||
| 6 | const math = std.math; | 6 | const math = std.math; |
| 7 | const testing = std.testing; | 7 | const testing = std.testing; |
| 8 | const expect = testing.expect; | 8 | const expect = testing.expect; |
| ... | @@ -14,8 +14,6 @@ const epsilon = 1e-7; | ... | @@ -14,8 +14,6 @@ const epsilon = 1e-7; |
| 14 | // See https://github.com/tiehuis/parse-number-fxx-test-data for a wider-selection of test-data. | 14 | // See https://github.com/tiehuis/parse-number-fxx-test-data for a wider-selection of test-data. |
| 15 | 15 | ||
| 16 | test "fmt.parseFloat" { | 16 | test "fmt.parseFloat" { |
| 17 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 18 | |||
| 19 | inline for ([_]type{ f16, f32, f64, f128 }) |T| { | 17 | inline for ([_]type{ f16, f32, f64, f128 }) |T| { |
| 20 | try testing.expectError(error.InvalidCharacter, parseFloat(T, "")); | 18 | try testing.expectError(error.InvalidCharacter, parseFloat(T, "")); |
| 21 | try testing.expectError(error.InvalidCharacter, parseFloat(T, " 1")); | 19 | try testing.expectError(error.InvalidCharacter, parseFloat(T, " 1")); |
| ... | @@ -72,8 +70,6 @@ test "fmt.parseFloat" { | ... | @@ -72,8 +70,6 @@ test "fmt.parseFloat" { |
| 72 | } | 70 | } |
| 73 | 71 | ||
| 74 | test "fmt.parseFloat nan and inf" { | 72 | test "fmt.parseFloat nan and inf" { |
| 75 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 76 | |||
| 77 | inline for ([_]type{ f16, f32, f64, f128 }) |T| { | 73 | inline for ([_]type{ f16, f32, f64, f128 }) |T| { |
| 78 | const Z = std.meta.Int(.unsigned, @typeInfo(T).Float.bits); | 74 | const Z = std.meta.Int(.unsigned, @typeInfo(T).Float.bits); |
| 79 | 75 | ||
| ... | @@ -84,22 +80,16 @@ test "fmt.parseFloat nan and inf" { | ... | @@ -84,22 +80,16 @@ test "fmt.parseFloat nan and inf" { |
| 84 | } | 80 | } |
| 85 | 81 | ||
| 86 | test "fmt.parseFloat #11169" { | 82 | test "fmt.parseFloat #11169" { |
| 87 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 88 | |||
| 89 | try expectEqual(try parseFloat(f128, "9007199254740993.0"), 9007199254740993.0); | 83 | try expectEqual(try parseFloat(f128, "9007199254740993.0"), 9007199254740993.0); |
| 90 | } | 84 | } |
| 91 | 85 | ||
| 92 | test "fmt.parseFloat hex.special" { | 86 | test "fmt.parseFloat hex.special" { |
| 93 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 94 | |||
| 95 | try testing.expect(math.isNan(try parseFloat(f32, "nAn"))); | 87 | try testing.expect(math.isNan(try parseFloat(f32, "nAn"))); |
| 96 | try testing.expect(math.isPositiveInf(try parseFloat(f32, "iNf"))); | 88 | try testing.expect(math.isPositiveInf(try parseFloat(f32, "iNf"))); |
| 97 | try testing.expect(math.isPositiveInf(try parseFloat(f32, "+Inf"))); | 89 | try testing.expect(math.isPositiveInf(try parseFloat(f32, "+Inf"))); |
| 98 | try testing.expect(math.isNegativeInf(try parseFloat(f32, "-iNf"))); | 90 | try testing.expect(math.isNegativeInf(try parseFloat(f32, "-iNf"))); |
| 99 | } | 91 | } |
| 100 | test "fmt.parseFloat hex.zero" { | 92 | test "fmt.parseFloat hex.zero" { |
| 101 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 102 | |||
| 103 | try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "0x0")); | 93 | try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "0x0")); |
| 104 | try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "-0x0")); | 94 | try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "-0x0")); |
| 105 | try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "0x0p42")); | 95 | try testing.expectEqual(@as(f32, 0.0), try parseFloat(f32, "0x0p42")); |
| ... | @@ -108,8 +98,6 @@ test "fmt.parseFloat hex.zero" { | ... | @@ -108,8 +98,6 @@ test "fmt.parseFloat hex.zero" { |
| 108 | } | 98 | } |
| 109 | 99 | ||
| 110 | test "fmt.parseFloat hex.f16" { | 100 | test "fmt.parseFloat hex.f16" { |
| 111 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 112 | |||
| 113 | try testing.expectEqual(try parseFloat(f16, "0x1p0"), 1.0); | 101 | try testing.expectEqual(try parseFloat(f16, "0x1p0"), 1.0); |
| 114 | try testing.expectEqual(try parseFloat(f16, "-0x1p-1"), -0.5); | 102 | try testing.expectEqual(try parseFloat(f16, "-0x1p-1"), -0.5); |
| 115 | try testing.expectEqual(try parseFloat(f16, "0x10p+10"), 16384.0); | 103 | try testing.expectEqual(try parseFloat(f16, "0x10p+10"), 16384.0); |
| ... | @@ -126,8 +114,6 @@ test "fmt.parseFloat hex.f16" { | ... | @@ -126,8 +114,6 @@ test "fmt.parseFloat hex.f16" { |
| 126 | } | 114 | } |
| 127 | 115 | ||
| 128 | test "fmt.parseFloat hex.f32" { | 116 | test "fmt.parseFloat hex.f32" { |
| 129 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 130 | |||
| 131 | try testing.expectError(error.InvalidCharacter, parseFloat(f32, "0x")); | 117 | try testing.expectError(error.InvalidCharacter, parseFloat(f32, "0x")); |
| 132 | try testing.expectEqual(try parseFloat(f32, "0x1p0"), 1.0); | 118 | try testing.expectEqual(try parseFloat(f32, "0x1p0"), 1.0); |
| 133 | try testing.expectEqual(try parseFloat(f32, "-0x1p-1"), -0.5); | 119 | try testing.expectEqual(try parseFloat(f32, "-0x1p-1"), -0.5); |
| ... | @@ -162,8 +148,6 @@ test "fmt.parseFloat hex.f64" { | ... | @@ -162,8 +148,6 @@ test "fmt.parseFloat hex.f64" { |
| 162 | try testing.expectEqual(try parseFloat(f64, "-0x1p-1074"), -math.floatTrueMin(f64)); | 148 | try testing.expectEqual(try parseFloat(f64, "-0x1p-1074"), -math.floatTrueMin(f64)); |
| 163 | } | 149 | } |
| 164 | test "fmt.parseFloat hex.f128" { | 150 | test "fmt.parseFloat hex.f128" { |
| 165 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 166 | |||
| 167 | try testing.expectEqual(try parseFloat(f128, "0x1p0"), 1.0); | 151 | try testing.expectEqual(try parseFloat(f128, "0x1p0"), 1.0); |
| 168 | try testing.expectEqual(try parseFloat(f128, "-0x1p-1"), -0.5); | 152 | try testing.expectEqual(try parseFloat(f128, "-0x1p-1"), -0.5); |
| 169 | try testing.expectEqual(try parseFloat(f128, "0x10p+10"), 16384.0); | 153 | try testing.expectEqual(try parseFloat(f128, "0x10p+10"), 16384.0); |
lib/std/fs.zig+6-8| ... | @@ -3244,15 +3244,13 @@ fn copy_file(fd_in: os.fd_t, fd_out: os.fd_t, maybe_size: ?u64) CopyFileRawError | ... | @@ -3244,15 +3244,13 @@ fn copy_file(fd_in: os.fd_t, fd_out: os.fd_t, maybe_size: ?u64) CopyFileRawError |
| 3244 | } | 3244 | } |
| 3245 | 3245 | ||
| 3246 | test { | 3246 | test { |
| 3247 | if (builtin.zig_backend != .stage2_x86_64) { | 3247 | if (builtin.os.tag != .wasi) { |
| 3248 | if (builtin.os.tag != .wasi) { | 3248 | _ = &makeDirAbsolute; |
| 3249 | _ = &makeDirAbsolute; | 3249 | _ = &makeDirAbsoluteZ; |
| 3250 | _ = &makeDirAbsoluteZ; | 3250 | _ = &copyFileAbsolute; |
| 3251 | _ = &copyFileAbsolute; | 3251 | _ = &updateFileAbsolute; |
| 3252 | _ = &updateFileAbsolute; | ||
| 3253 | } | ||
| 3254 | _ = &Dir.copyFile; | ||
| 3255 | } | 3252 | } |
| 3253 | _ = &Dir.copyFile; | ||
| 3256 | _ = @import("fs/test.zig"); | 3254 | _ = @import("fs/test.zig"); |
| 3257 | _ = @import("fs/path.zig"); | 3255 | _ = @import("fs/path.zig"); |
| 3258 | _ = @import("fs/file.zig"); | 3256 | _ = @import("fs/file.zig"); |
lib/std/fs/test.zig-104| ... | @@ -124,8 +124,6 @@ fn testWithAllSupportedPathTypes(test_func: anytype) !void { | ... | @@ -124,8 +124,6 @@ fn testWithAllSupportedPathTypes(test_func: anytype) !void { |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | test "Dir.readLink" { | 126 | test "Dir.readLink" { |
| 127 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 128 | |||
| 129 | try testWithAllSupportedPathTypes(struct { | 127 | try testWithAllSupportedPathTypes(struct { |
| 130 | fn impl(ctx: *TestContext) !void { | 128 | fn impl(ctx: *TestContext) !void { |
| 131 | // Create some targets | 129 | // Create some targets |
| ... | @@ -163,8 +161,6 @@ fn testReadLink(dir: Dir, target_path: []const u8, symlink_path: []const u8) !vo | ... | @@ -163,8 +161,6 @@ fn testReadLink(dir: Dir, target_path: []const u8, symlink_path: []const u8) !vo |
| 163 | } | 161 | } |
| 164 | 162 | ||
| 165 | test "relative symlink to parent directory" { | 163 | test "relative symlink to parent directory" { |
| 166 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 167 | |||
| 168 | var tmp = tmpDir(.{}); | 164 | var tmp = tmpDir(.{}); |
| 169 | defer tmp.cleanup(); | 165 | defer tmp.cleanup(); |
| 170 | 166 | ||
| ... | @@ -182,8 +178,6 @@ test "relative symlink to parent directory" { | ... | @@ -182,8 +178,6 @@ test "relative symlink to parent directory" { |
| 182 | } | 178 | } |
| 183 | 179 | ||
| 184 | test "openDir" { | 180 | test "openDir" { |
| 185 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 186 | |||
| 187 | try testWithAllSupportedPathTypes(struct { | 181 | try testWithAllSupportedPathTypes(struct { |
| 188 | fn impl(ctx: *TestContext) !void { | 182 | fn impl(ctx: *TestContext) !void { |
| 189 | const allocator = ctx.arena.allocator(); | 183 | const allocator = ctx.arena.allocator(); |
| ... | @@ -202,8 +196,6 @@ test "openDir" { | ... | @@ -202,8 +196,6 @@ test "openDir" { |
| 202 | test "accessAbsolute" { | 196 | test "accessAbsolute" { |
| 203 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 197 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 204 | 198 | ||
| 205 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 206 | |||
| 207 | var tmp = tmpDir(.{}); | 199 | var tmp = tmpDir(.{}); |
| 208 | defer tmp.cleanup(); | 200 | defer tmp.cleanup(); |
| 209 | 201 | ||
| ... | @@ -222,8 +214,6 @@ test "accessAbsolute" { | ... | @@ -222,8 +214,6 @@ test "accessAbsolute" { |
| 222 | test "openDirAbsolute" { | 214 | test "openDirAbsolute" { |
| 223 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 215 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 224 | 216 | ||
| 225 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 226 | |||
| 227 | var tmp = tmpDir(.{}); | 217 | var tmp = tmpDir(.{}); |
| 228 | defer tmp.cleanup(); | 218 | defer tmp.cleanup(); |
| 229 | 219 | ||
| ... | @@ -262,8 +252,6 @@ test "openDir non-cwd parent .." { | ... | @@ -262,8 +252,6 @@ test "openDir non-cwd parent .." { |
| 262 | else => {}, | 252 | else => {}, |
| 263 | } | 253 | } |
| 264 | 254 | ||
| 265 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 266 | |||
| 267 | var tmp = tmpDir(.{}); | 255 | var tmp = tmpDir(.{}); |
| 268 | defer tmp.cleanup(); | 256 | defer tmp.cleanup(); |
| 269 | 257 | ||
| ... | @@ -285,8 +273,6 @@ test "openDir non-cwd parent .." { | ... | @@ -285,8 +273,6 @@ test "openDir non-cwd parent .." { |
| 285 | test "readLinkAbsolute" { | 273 | test "readLinkAbsolute" { |
| 286 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 274 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 287 | 275 | ||
| 288 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 289 | |||
| 290 | var tmp = tmpDir(.{}); | 276 | var tmp = tmpDir(.{}); |
| 291 | defer tmp.cleanup(); | 277 | defer tmp.cleanup(); |
| 292 | 278 | ||
| ... | @@ -337,8 +323,6 @@ fn testReadLinkAbsolute(target_path: []const u8, symlink_path: []const u8) !void | ... | @@ -337,8 +323,6 @@ fn testReadLinkAbsolute(target_path: []const u8, symlink_path: []const u8) !void |
| 337 | } | 323 | } |
| 338 | 324 | ||
| 339 | test "Dir.Iterator" { | 325 | test "Dir.Iterator" { |
| 340 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 341 | |||
| 342 | var tmp_dir = tmpIterableDir(.{}); | 326 | var tmp_dir = tmpIterableDir(.{}); |
| 343 | defer tmp_dir.cleanup(); | 327 | defer tmp_dir.cleanup(); |
| 344 | 328 | ||
| ... | @@ -369,8 +353,6 @@ test "Dir.Iterator" { | ... | @@ -369,8 +353,6 @@ test "Dir.Iterator" { |
| 369 | } | 353 | } |
| 370 | 354 | ||
| 371 | test "Dir.Iterator many entries" { | 355 | test "Dir.Iterator many entries" { |
| 372 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 373 | |||
| 374 | var tmp_dir = tmpIterableDir(.{}); | 356 | var tmp_dir = tmpIterableDir(.{}); |
| 375 | defer tmp_dir.cleanup(); | 357 | defer tmp_dir.cleanup(); |
| 376 | 358 | ||
| ... | @@ -406,8 +388,6 @@ test "Dir.Iterator many entries" { | ... | @@ -406,8 +388,6 @@ test "Dir.Iterator many entries" { |
| 406 | } | 388 | } |
| 407 | 389 | ||
| 408 | test "Dir.Iterator twice" { | 390 | test "Dir.Iterator twice" { |
| 409 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 410 | |||
| 411 | var tmp_dir = tmpIterableDir(.{}); | 391 | var tmp_dir = tmpIterableDir(.{}); |
| 412 | defer tmp_dir.cleanup(); | 392 | defer tmp_dir.cleanup(); |
| 413 | 393 | ||
| ... | @@ -441,8 +421,6 @@ test "Dir.Iterator twice" { | ... | @@ -441,8 +421,6 @@ test "Dir.Iterator twice" { |
| 441 | } | 421 | } |
| 442 | 422 | ||
| 443 | test "Dir.Iterator reset" { | 423 | test "Dir.Iterator reset" { |
| 444 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 445 | |||
| 446 | var tmp_dir = tmpIterableDir(.{}); | 424 | var tmp_dir = tmpIterableDir(.{}); |
| 447 | defer tmp_dir.cleanup(); | 425 | defer tmp_dir.cleanup(); |
| 448 | 426 | ||
| ... | @@ -479,8 +457,6 @@ test "Dir.Iterator reset" { | ... | @@ -479,8 +457,6 @@ test "Dir.Iterator reset" { |
| 479 | } | 457 | } |
| 480 | 458 | ||
| 481 | test "Dir.Iterator but dir is deleted during iteration" { | 459 | test "Dir.Iterator but dir is deleted during iteration" { |
| 482 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 483 | |||
| 484 | var tmp = std.testing.tmpDir(.{}); | 460 | var tmp = std.testing.tmpDir(.{}); |
| 485 | defer tmp.cleanup(); | 461 | defer tmp.cleanup(); |
| 486 | 462 | ||
| ... | @@ -523,8 +499,6 @@ fn contains(entries: *const std.ArrayList(IterableDir.Entry), el: IterableDir.En | ... | @@ -523,8 +499,6 @@ fn contains(entries: *const std.ArrayList(IterableDir.Entry), el: IterableDir.En |
| 523 | test "Dir.realpath smoke test" { | 499 | test "Dir.realpath smoke test" { |
| 524 | if (!comptime std.os.isGetFdPathSupportedOnTarget(builtin.os)) return error.SkipZigTest; | 500 | if (!comptime std.os.isGetFdPathSupportedOnTarget(builtin.os)) return error.SkipZigTest; |
| 525 | 501 | ||
| 526 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 527 | |||
| 528 | try testWithAllSupportedPathTypes(struct { | 502 | try testWithAllSupportedPathTypes(struct { |
| 529 | fn impl(ctx: *TestContext) !void { | 503 | fn impl(ctx: *TestContext) !void { |
| 530 | const allocator = ctx.arena.allocator(); | 504 | const allocator = ctx.arena.allocator(); |
| ... | @@ -575,8 +549,6 @@ test "Dir.realpath smoke test" { | ... | @@ -575,8 +549,6 @@ test "Dir.realpath smoke test" { |
| 575 | } | 549 | } |
| 576 | 550 | ||
| 577 | test "readAllAlloc" { | 551 | test "readAllAlloc" { |
| 578 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 579 | |||
| 580 | var tmp_dir = tmpDir(.{}); | 552 | var tmp_dir = tmpDir(.{}); |
| 581 | defer tmp_dir.cleanup(); | 553 | defer tmp_dir.cleanup(); |
| 582 | 554 | ||
| ... | @@ -613,8 +585,6 @@ test "Dir.statFile" { | ... | @@ -613,8 +585,6 @@ test "Dir.statFile" { |
| 613 | // TODO: Re-enable once https://github.com/ziglang/zig/issues/17034 is solved | 585 | // TODO: Re-enable once https://github.com/ziglang/zig/issues/17034 is solved |
| 614 | if (builtin.os.tag == .linux and builtin.link_libc and builtin.abi == .gnu) return error.SkipZigTest; | 586 | if (builtin.os.tag == .linux and builtin.link_libc and builtin.abi == .gnu) return error.SkipZigTest; |
| 615 | 587 | ||
| 616 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 617 | |||
| 618 | try testWithAllSupportedPathTypes(struct { | 588 | try testWithAllSupportedPathTypes(struct { |
| 619 | fn impl(ctx: *TestContext) !void { | 589 | fn impl(ctx: *TestContext) !void { |
| 620 | const test_file_name = try ctx.transformPath("test_file"); | 590 | const test_file_name = try ctx.transformPath("test_file"); |
| ... | @@ -630,8 +600,6 @@ test "Dir.statFile" { | ... | @@ -630,8 +600,6 @@ test "Dir.statFile" { |
| 630 | } | 600 | } |
| 631 | 601 | ||
| 632 | test "directory operations on files" { | 602 | test "directory operations on files" { |
| 633 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 634 | |||
| 635 | try testWithAllSupportedPathTypes(struct { | 603 | try testWithAllSupportedPathTypes(struct { |
| 636 | fn impl(ctx: *TestContext) !void { | 604 | fn impl(ctx: *TestContext) !void { |
| 637 | const test_file_name = try ctx.transformPath("test_file"); | 605 | const test_file_name = try ctx.transformPath("test_file"); |
| ... | @@ -661,8 +629,6 @@ test "file operations on directories" { | ... | @@ -661,8 +629,6 @@ test "file operations on directories" { |
| 661 | // TODO: fix this test on FreeBSD. https://github.com/ziglang/zig/issues/1759 | 629 | // TODO: fix this test on FreeBSD. https://github.com/ziglang/zig/issues/1759 |
| 662 | if (builtin.os.tag == .freebsd) return error.SkipZigTest; | 630 | if (builtin.os.tag == .freebsd) return error.SkipZigTest; |
| 663 | 631 | ||
| 664 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 665 | |||
| 666 | try testWithAllSupportedPathTypes(struct { | 632 | try testWithAllSupportedPathTypes(struct { |
| 667 | fn impl(ctx: *TestContext) !void { | 633 | fn impl(ctx: *TestContext) !void { |
| 668 | const test_dir_name = try ctx.transformPath("test_dir"); | 634 | const test_dir_name = try ctx.transformPath("test_dir"); |
| ... | @@ -710,8 +676,6 @@ test "makeOpenPath parent dirs do not exist" { | ... | @@ -710,8 +676,6 @@ test "makeOpenPath parent dirs do not exist" { |
| 710 | } | 676 | } |
| 711 | 677 | ||
| 712 | test "deleteDir" { | 678 | test "deleteDir" { |
| 713 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 714 | |||
| 715 | try testWithAllSupportedPathTypes(struct { | 679 | try testWithAllSupportedPathTypes(struct { |
| 716 | fn impl(ctx: *TestContext) !void { | 680 | fn impl(ctx: *TestContext) !void { |
| 717 | const test_dir_path = try ctx.transformPath("test_dir"); | 681 | const test_dir_path = try ctx.transformPath("test_dir"); |
| ... | @@ -733,8 +697,6 @@ test "deleteDir" { | ... | @@ -733,8 +697,6 @@ test "deleteDir" { |
| 733 | } | 697 | } |
| 734 | 698 | ||
| 735 | test "Dir.rename files" { | 699 | test "Dir.rename files" { |
| 736 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 737 | |||
| 738 | try testWithAllSupportedPathTypes(struct { | 700 | try testWithAllSupportedPathTypes(struct { |
| 739 | fn impl(ctx: *TestContext) !void { | 701 | fn impl(ctx: *TestContext) !void { |
| 740 | // Rename on Windows can hit intermittent AccessDenied errors | 702 | // Rename on Windows can hit intermittent AccessDenied errors |
| ... | @@ -777,8 +739,6 @@ test "Dir.rename files" { | ... | @@ -777,8 +739,6 @@ test "Dir.rename files" { |
| 777 | } | 739 | } |
| 778 | 740 | ||
| 779 | test "Dir.rename directories" { | 741 | test "Dir.rename directories" { |
| 780 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 781 | |||
| 782 | try testWithAllSupportedPathTypes(struct { | 742 | try testWithAllSupportedPathTypes(struct { |
| 783 | fn impl(ctx: *TestContext) !void { | 743 | fn impl(ctx: *TestContext) !void { |
| 784 | // Rename on Windows can hit intermittent AccessDenied errors | 744 | // Rename on Windows can hit intermittent AccessDenied errors |
| ... | @@ -820,8 +780,6 @@ test "Dir.rename directory onto empty dir" { | ... | @@ -820,8 +780,6 @@ test "Dir.rename directory onto empty dir" { |
| 820 | // TODO: Fix on Windows, see https://github.com/ziglang/zig/issues/6364 | 780 | // TODO: Fix on Windows, see https://github.com/ziglang/zig/issues/6364 |
| 821 | if (builtin.os.tag == .windows) return error.SkipZigTest; | 781 | if (builtin.os.tag == .windows) return error.SkipZigTest; |
| 822 | 782 | ||
| 823 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 824 | |||
| 825 | try testWithAllSupportedPathTypes(struct { | 783 | try testWithAllSupportedPathTypes(struct { |
| 826 | fn impl(ctx: *TestContext) !void { | 784 | fn impl(ctx: *TestContext) !void { |
| 827 | const test_dir_path = try ctx.transformPath("test_dir"); | 785 | const test_dir_path = try ctx.transformPath("test_dir"); |
| ... | @@ -843,8 +801,6 @@ test "Dir.rename directory onto non-empty dir" { | ... | @@ -843,8 +801,6 @@ test "Dir.rename directory onto non-empty dir" { |
| 843 | // TODO: Fix on Windows, see https://github.com/ziglang/zig/issues/6364 | 801 | // TODO: Fix on Windows, see https://github.com/ziglang/zig/issues/6364 |
| 844 | if (builtin.os.tag == .windows) return error.SkipZigTest; | 802 | if (builtin.os.tag == .windows) return error.SkipZigTest; |
| 845 | 803 | ||
| 846 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 847 | |||
| 848 | try testWithAllSupportedPathTypes(struct { | 804 | try testWithAllSupportedPathTypes(struct { |
| 849 | fn impl(ctx: *TestContext) !void { | 805 | fn impl(ctx: *TestContext) !void { |
| 850 | const test_dir_path = try ctx.transformPath("test_dir"); | 806 | const test_dir_path = try ctx.transformPath("test_dir"); |
| ... | @@ -871,8 +827,6 @@ test "Dir.rename file <-> dir" { | ... | @@ -871,8 +827,6 @@ test "Dir.rename file <-> dir" { |
| 871 | // TODO: Fix on Windows, see https://github.com/ziglang/zig/issues/6364 | 827 | // TODO: Fix on Windows, see https://github.com/ziglang/zig/issues/6364 |
| 872 | if (builtin.os.tag == .windows) return error.SkipZigTest; | 828 | if (builtin.os.tag == .windows) return error.SkipZigTest; |
| 873 | 829 | ||
| 874 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 875 | |||
| 876 | try testWithAllSupportedPathTypes(struct { | 830 | try testWithAllSupportedPathTypes(struct { |
| 877 | fn impl(ctx: *TestContext) !void { | 831 | fn impl(ctx: *TestContext) !void { |
| 878 | const test_file_path = try ctx.transformPath("test_file"); | 832 | const test_file_path = try ctx.transformPath("test_file"); |
| ... | @@ -888,8 +842,6 @@ test "Dir.rename file <-> dir" { | ... | @@ -888,8 +842,6 @@ test "Dir.rename file <-> dir" { |
| 888 | } | 842 | } |
| 889 | 843 | ||
| 890 | test "rename" { | 844 | test "rename" { |
| 891 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 892 | |||
| 893 | var tmp_dir1 = tmpDir(.{}); | 845 | var tmp_dir1 = tmpDir(.{}); |
| 894 | defer tmp_dir1.cleanup(); | 846 | defer tmp_dir1.cleanup(); |
| 895 | 847 | ||
| ... | @@ -912,8 +864,6 @@ test "rename" { | ... | @@ -912,8 +864,6 @@ test "rename" { |
| 912 | test "renameAbsolute" { | 864 | test "renameAbsolute" { |
| 913 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 865 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 914 | 866 | ||
| 915 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 916 | |||
| 917 | var tmp_dir = tmpDir(.{}); | 867 | var tmp_dir = tmpDir(.{}); |
| 918 | defer tmp_dir.cleanup(); | 868 | defer tmp_dir.cleanup(); |
| 919 | 869 | ||
| ... | @@ -972,8 +922,6 @@ test "openSelfExe" { | ... | @@ -972,8 +922,6 @@ test "openSelfExe" { |
| 972 | } | 922 | } |
| 973 | 923 | ||
| 974 | test "makePath, put some files in it, deleteTree" { | 924 | test "makePath, put some files in it, deleteTree" { |
| 975 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 976 | |||
| 977 | try testWithAllSupportedPathTypes(struct { | 925 | try testWithAllSupportedPathTypes(struct { |
| 978 | fn impl(ctx: *TestContext) !void { | 926 | fn impl(ctx: *TestContext) !void { |
| 979 | const allocator = ctx.arena.allocator(); | 927 | const allocator = ctx.arena.allocator(); |
| ... | @@ -990,8 +938,6 @@ test "makePath, put some files in it, deleteTree" { | ... | @@ -990,8 +938,6 @@ test "makePath, put some files in it, deleteTree" { |
| 990 | } | 938 | } |
| 991 | 939 | ||
| 992 | test "makePath, put some files in it, deleteTreeMinStackSize" { | 940 | test "makePath, put some files in it, deleteTreeMinStackSize" { |
| 993 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 994 | |||
| 995 | try testWithAllSupportedPathTypes(struct { | 941 | try testWithAllSupportedPathTypes(struct { |
| 996 | fn impl(ctx: *TestContext) !void { | 942 | fn impl(ctx: *TestContext) !void { |
| 997 | const allocator = ctx.arena.allocator(); | 943 | const allocator = ctx.arena.allocator(); |
| ... | @@ -1010,8 +956,6 @@ test "makePath, put some files in it, deleteTreeMinStackSize" { | ... | @@ -1010,8 +956,6 @@ test "makePath, put some files in it, deleteTreeMinStackSize" { |
| 1010 | test "makePath in a directory that no longer exists" { | 956 | test "makePath in a directory that no longer exists" { |
| 1011 | if (builtin.os.tag == .windows) return error.SkipZigTest; // Windows returns FileBusy if attempting to remove an open dir | 957 | if (builtin.os.tag == .windows) return error.SkipZigTest; // Windows returns FileBusy if attempting to remove an open dir |
| 1012 | 958 | ||
| 1013 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1014 | |||
| 1015 | var tmp = tmpDir(.{}); | 959 | var tmp = tmpDir(.{}); |
| 1016 | defer tmp.cleanup(); | 960 | defer tmp.cleanup(); |
| 1017 | try tmp.parent_dir.deleteTree(&tmp.sub_path); | 961 | try tmp.parent_dir.deleteTree(&tmp.sub_path); |
| ... | @@ -1043,8 +987,6 @@ fn testFilenameLimits(iterable_dir: IterableDir, maxed_filename: []const u8) !vo | ... | @@ -1043,8 +987,6 @@ fn testFilenameLimits(iterable_dir: IterableDir, maxed_filename: []const u8) !vo |
| 1043 | } | 987 | } |
| 1044 | 988 | ||
| 1045 | test "max file name component lengths" { | 989 | test "max file name component lengths" { |
| 1046 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1047 | |||
| 1048 | var tmp = tmpIterableDir(.{}); | 990 | var tmp = tmpIterableDir(.{}); |
| 1049 | defer tmp.cleanup(); | 991 | defer tmp.cleanup(); |
| 1050 | 992 | ||
| ... | @@ -1066,8 +1008,6 @@ test "max file name component lengths" { | ... | @@ -1066,8 +1008,6 @@ test "max file name component lengths" { |
| 1066 | } | 1008 | } |
| 1067 | 1009 | ||
| 1068 | test "writev, readv" { | 1010 | test "writev, readv" { |
| 1069 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1070 | |||
| 1071 | var tmp = tmpDir(.{}); | 1011 | var tmp = tmpDir(.{}); |
| 1072 | defer tmp.cleanup(); | 1012 | defer tmp.cleanup(); |
| 1073 | 1013 | ||
| ... | @@ -1110,8 +1050,6 @@ test "writev, readv" { | ... | @@ -1110,8 +1050,6 @@ test "writev, readv" { |
| 1110 | } | 1050 | } |
| 1111 | 1051 | ||
| 1112 | test "pwritev, preadv" { | 1052 | test "pwritev, preadv" { |
| 1113 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1114 | |||
| 1115 | var tmp = tmpDir(.{}); | 1053 | var tmp = tmpDir(.{}); |
| 1116 | defer tmp.cleanup(); | 1054 | defer tmp.cleanup(); |
| 1117 | 1055 | ||
| ... | @@ -1153,8 +1091,6 @@ test "pwritev, preadv" { | ... | @@ -1153,8 +1091,6 @@ test "pwritev, preadv" { |
| 1153 | } | 1091 | } |
| 1154 | 1092 | ||
| 1155 | test "access file" { | 1093 | test "access file" { |
| 1156 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1157 | |||
| 1158 | try testWithAllSupportedPathTypes(struct { | 1094 | try testWithAllSupportedPathTypes(struct { |
| 1159 | fn impl(ctx: *TestContext) !void { | 1095 | fn impl(ctx: *TestContext) !void { |
| 1160 | const dir_path = try ctx.transformPath("os_test_tmp"); | 1096 | const dir_path = try ctx.transformPath("os_test_tmp"); |
| ... | @@ -1171,8 +1107,6 @@ test "access file" { | ... | @@ -1171,8 +1107,6 @@ test "access file" { |
| 1171 | } | 1107 | } |
| 1172 | 1108 | ||
| 1173 | test "sendfile" { | 1109 | test "sendfile" { |
| 1174 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1175 | |||
| 1176 | var tmp = tmpDir(.{}); | 1110 | var tmp = tmpDir(.{}); |
| 1177 | defer tmp.cleanup(); | 1111 | defer tmp.cleanup(); |
| 1178 | 1112 | ||
| ... | @@ -1238,8 +1172,6 @@ test "sendfile" { | ... | @@ -1238,8 +1172,6 @@ test "sendfile" { |
| 1238 | } | 1172 | } |
| 1239 | 1173 | ||
| 1240 | test "copyRangeAll" { | 1174 | test "copyRangeAll" { |
| 1241 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1242 | |||
| 1243 | var tmp = tmpDir(.{}); | 1175 | var tmp = tmpDir(.{}); |
| 1244 | defer tmp.cleanup(); | 1176 | defer tmp.cleanup(); |
| 1245 | 1177 | ||
| ... | @@ -1266,8 +1198,6 @@ test "copyRangeAll" { | ... | @@ -1266,8 +1198,6 @@ test "copyRangeAll" { |
| 1266 | } | 1198 | } |
| 1267 | 1199 | ||
| 1268 | test "copyFile" { | 1200 | test "copyFile" { |
| 1269 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1270 | |||
| 1271 | try testWithAllSupportedPathTypes(struct { | 1201 | try testWithAllSupportedPathTypes(struct { |
| 1272 | fn impl(ctx: *TestContext) !void { | 1202 | fn impl(ctx: *TestContext) !void { |
| 1273 | const data = "u6wj+JmdF3qHsFPE BUlH2g4gJCmEz0PP"; | 1203 | const data = "u6wj+JmdF3qHsFPE BUlH2g4gJCmEz0PP"; |
| ... | @@ -1298,8 +1228,6 @@ fn expectFileContents(dir: Dir, file_path: []const u8, data: []const u8) !void { | ... | @@ -1298,8 +1228,6 @@ fn expectFileContents(dir: Dir, file_path: []const u8, data: []const u8) !void { |
| 1298 | } | 1228 | } |
| 1299 | 1229 | ||
| 1300 | test "AtomicFile" { | 1230 | test "AtomicFile" { |
| 1301 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1302 | |||
| 1303 | try testWithAllSupportedPathTypes(struct { | 1231 | try testWithAllSupportedPathTypes(struct { |
| 1304 | fn impl(ctx: *TestContext) !void { | 1232 | fn impl(ctx: *TestContext) !void { |
| 1305 | const allocator = ctx.arena.allocator(); | 1233 | const allocator = ctx.arena.allocator(); |
| ... | @@ -1326,8 +1254,6 @@ test "AtomicFile" { | ... | @@ -1326,8 +1254,6 @@ test "AtomicFile" { |
| 1326 | test "open file with exclusive nonblocking lock twice" { | 1254 | test "open file with exclusive nonblocking lock twice" { |
| 1327 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 1255 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 1328 | 1256 | ||
| 1329 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1330 | |||
| 1331 | try testWithAllSupportedPathTypes(struct { | 1257 | try testWithAllSupportedPathTypes(struct { |
| 1332 | fn impl(ctx: *TestContext) !void { | 1258 | fn impl(ctx: *TestContext) !void { |
| 1333 | const filename = try ctx.transformPath("file_nonblocking_lock_test.txt"); | 1259 | const filename = try ctx.transformPath("file_nonblocking_lock_test.txt"); |
| ... | @@ -1344,8 +1270,6 @@ test "open file with exclusive nonblocking lock twice" { | ... | @@ -1344,8 +1270,6 @@ test "open file with exclusive nonblocking lock twice" { |
| 1344 | test "open file with shared and exclusive nonblocking lock" { | 1270 | test "open file with shared and exclusive nonblocking lock" { |
| 1345 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 1271 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 1346 | 1272 | ||
| 1347 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1348 | |||
| 1349 | try testWithAllSupportedPathTypes(struct { | 1273 | try testWithAllSupportedPathTypes(struct { |
| 1350 | fn impl(ctx: *TestContext) !void { | 1274 | fn impl(ctx: *TestContext) !void { |
| 1351 | const filename = try ctx.transformPath("file_nonblocking_lock_test.txt"); | 1275 | const filename = try ctx.transformPath("file_nonblocking_lock_test.txt"); |
| ... | @@ -1362,8 +1286,6 @@ test "open file with shared and exclusive nonblocking lock" { | ... | @@ -1362,8 +1286,6 @@ test "open file with shared and exclusive nonblocking lock" { |
| 1362 | test "open file with exclusive and shared nonblocking lock" { | 1286 | test "open file with exclusive and shared nonblocking lock" { |
| 1363 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 1287 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 1364 | 1288 | ||
| 1365 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1366 | |||
| 1367 | try testWithAllSupportedPathTypes(struct { | 1289 | try testWithAllSupportedPathTypes(struct { |
| 1368 | fn impl(ctx: *TestContext) !void { | 1290 | fn impl(ctx: *TestContext) !void { |
| 1369 | const filename = try ctx.transformPath("file_nonblocking_lock_test.txt"); | 1291 | const filename = try ctx.transformPath("file_nonblocking_lock_test.txt"); |
| ... | @@ -1378,8 +1300,6 @@ test "open file with exclusive and shared nonblocking lock" { | ... | @@ -1378,8 +1300,6 @@ test "open file with exclusive and shared nonblocking lock" { |
| 1378 | } | 1300 | } |
| 1379 | 1301 | ||
| 1380 | test "open file with exclusive lock twice, make sure second lock waits" { | 1302 | test "open file with exclusive lock twice, make sure second lock waits" { |
| 1381 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1382 | |||
| 1383 | if (builtin.single_threaded) return error.SkipZigTest; | 1303 | if (builtin.single_threaded) return error.SkipZigTest; |
| 1384 | 1304 | ||
| 1385 | if (std.io.is_async) { | 1305 | if (std.io.is_async) { |
| ... | @@ -1430,8 +1350,6 @@ test "open file with exclusive lock twice, make sure second lock waits" { | ... | @@ -1430,8 +1350,6 @@ test "open file with exclusive lock twice, make sure second lock waits" { |
| 1430 | test "open file with exclusive nonblocking lock twice (absolute paths)" { | 1350 | test "open file with exclusive nonblocking lock twice (absolute paths)" { |
| 1431 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 1351 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 1432 | 1352 | ||
| 1433 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1434 | |||
| 1435 | var random_bytes: [12]u8 = undefined; | 1353 | var random_bytes: [12]u8 = undefined; |
| 1436 | std.crypto.random.bytes(&random_bytes); | 1354 | std.crypto.random.bytes(&random_bytes); |
| 1437 | 1355 | ||
| ... | @@ -1466,8 +1384,6 @@ test "open file with exclusive nonblocking lock twice (absolute paths)" { | ... | @@ -1466,8 +1384,6 @@ test "open file with exclusive nonblocking lock twice (absolute paths)" { |
| 1466 | test "walker" { | 1384 | test "walker" { |
| 1467 | if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest; | 1385 | if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest; |
| 1468 | 1386 | ||
| 1469 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1470 | |||
| 1471 | var tmp = tmpIterableDir(.{}); | 1387 | var tmp = tmpIterableDir(.{}); |
| 1472 | defer tmp.cleanup(); | 1388 | defer tmp.cleanup(); |
| 1473 | 1389 | ||
| ... | @@ -1521,8 +1437,6 @@ test "walker" { | ... | @@ -1521,8 +1437,6 @@ test "walker" { |
| 1521 | test "walker without fully iterating" { | 1437 | test "walker without fully iterating" { |
| 1522 | if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest; | 1438 | if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest; |
| 1523 | 1439 | ||
| 1524 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1525 | |||
| 1526 | var tmp = tmpIterableDir(.{}); | 1440 | var tmp = tmpIterableDir(.{}); |
| 1527 | defer tmp.cleanup(); | 1441 | defer tmp.cleanup(); |
| 1528 | 1442 | ||
| ... | @@ -1546,8 +1460,6 @@ test "walker without fully iterating" { | ... | @@ -1546,8 +1460,6 @@ test "walker without fully iterating" { |
| 1546 | test ". and .. in fs.Dir functions" { | 1460 | test ". and .. in fs.Dir functions" { |
| 1547 | if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest; | 1461 | if (builtin.os.tag == .wasi and builtin.link_libc) return error.SkipZigTest; |
| 1548 | 1462 | ||
| 1549 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1550 | |||
| 1551 | if (builtin.os.tag == .windows and builtin.cpu.arch == .aarch64) { | 1463 | if (builtin.os.tag == .windows and builtin.cpu.arch == .aarch64) { |
| 1552 | // https://github.com/ziglang/zig/issues/17134 | 1464 | // https://github.com/ziglang/zig/issues/17134 |
| 1553 | return error.SkipZigTest; | 1465 | return error.SkipZigTest; |
| ... | @@ -1588,8 +1500,6 @@ test ". and .. in fs.Dir functions" { | ... | @@ -1588,8 +1500,6 @@ test ". and .. in fs.Dir functions" { |
| 1588 | test ". and .. in absolute functions" { | 1500 | test ". and .. in absolute functions" { |
| 1589 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 1501 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 1590 | 1502 | ||
| 1591 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1592 | |||
| 1593 | var tmp = tmpDir(.{}); | 1503 | var tmp = tmpDir(.{}); |
| 1594 | defer tmp.cleanup(); | 1504 | defer tmp.cleanup(); |
| 1595 | 1505 | ||
| ... | @@ -1635,8 +1545,6 @@ test "chmod" { | ... | @@ -1635,8 +1545,6 @@ test "chmod" { |
| 1635 | if (builtin.os.tag == .windows or builtin.os.tag == .wasi) | 1545 | if (builtin.os.tag == .windows or builtin.os.tag == .wasi) |
| 1636 | return error.SkipZigTest; | 1546 | return error.SkipZigTest; |
| 1637 | 1547 | ||
| 1638 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1639 | |||
| 1640 | var tmp = tmpDir(.{}); | 1548 | var tmp = tmpDir(.{}); |
| 1641 | defer tmp.cleanup(); | 1549 | defer tmp.cleanup(); |
| 1642 | 1550 | ||
| ... | @@ -1659,8 +1567,6 @@ test "chown" { | ... | @@ -1659,8 +1567,6 @@ test "chown" { |
| 1659 | if (builtin.os.tag == .windows or builtin.os.tag == .wasi) | 1567 | if (builtin.os.tag == .windows or builtin.os.tag == .wasi) |
| 1660 | return error.SkipZigTest; | 1568 | return error.SkipZigTest; |
| 1661 | 1569 | ||
| 1662 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1663 | |||
| 1664 | var tmp = tmpDir(.{}); | 1570 | var tmp = tmpDir(.{}); |
| 1665 | defer tmp.cleanup(); | 1571 | defer tmp.cleanup(); |
| 1666 | 1572 | ||
| ... | @@ -1676,8 +1582,6 @@ test "chown" { | ... | @@ -1676,8 +1582,6 @@ test "chown" { |
| 1676 | } | 1582 | } |
| 1677 | 1583 | ||
| 1678 | test "File.Metadata" { | 1584 | test "File.Metadata" { |
| 1679 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1680 | |||
| 1681 | var tmp = tmpDir(.{}); | 1585 | var tmp = tmpDir(.{}); |
| 1682 | defer tmp.cleanup(); | 1586 | defer tmp.cleanup(); |
| 1683 | 1587 | ||
| ... | @@ -1696,8 +1600,6 @@ test "File.Permissions" { | ... | @@ -1696,8 +1600,6 @@ test "File.Permissions" { |
| 1696 | if (builtin.os.tag == .wasi) | 1600 | if (builtin.os.tag == .wasi) |
| 1697 | return error.SkipZigTest; | 1601 | return error.SkipZigTest; |
| 1698 | 1602 | ||
| 1699 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1700 | |||
| 1701 | var tmp = tmpDir(.{}); | 1603 | var tmp = tmpDir(.{}); |
| 1702 | defer tmp.cleanup(); | 1604 | defer tmp.cleanup(); |
| 1703 | 1605 | ||
| ... | @@ -1724,8 +1626,6 @@ test "File.PermissionsUnix" { | ... | @@ -1724,8 +1626,6 @@ test "File.PermissionsUnix" { |
| 1724 | if (builtin.os.tag == .windows or builtin.os.tag == .wasi) | 1626 | if (builtin.os.tag == .windows or builtin.os.tag == .wasi) |
| 1725 | return error.SkipZigTest; | 1627 | return error.SkipZigTest; |
| 1726 | 1628 | ||
| 1727 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1728 | |||
| 1729 | var tmp = tmpDir(.{}); | 1629 | var tmp = tmpDir(.{}); |
| 1730 | defer tmp.cleanup(); | 1630 | defer tmp.cleanup(); |
| 1731 | 1631 | ||
| ... | @@ -1761,8 +1661,6 @@ test "delete a read-only file on windows" { | ... | @@ -1761,8 +1661,6 @@ test "delete a read-only file on windows" { |
| 1761 | if (builtin.os.tag != .windows) | 1661 | if (builtin.os.tag != .windows) |
| 1762 | return error.SkipZigTest; | 1662 | return error.SkipZigTest; |
| 1763 | 1663 | ||
| 1764 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1765 | |||
| 1766 | var tmp = testing.tmpDir(.{}); | 1664 | var tmp = testing.tmpDir(.{}); |
| 1767 | defer tmp.cleanup(); | 1665 | defer tmp.cleanup(); |
| 1768 | 1666 | ||
| ... | @@ -1793,8 +1691,6 @@ test "delete a read-only file on windows" { | ... | @@ -1793,8 +1691,6 @@ test "delete a read-only file on windows" { |
| 1793 | test "delete a setAsCwd directory on Windows" { | 1691 | test "delete a setAsCwd directory on Windows" { |
| 1794 | if (builtin.os.tag != .windows) return error.SkipZigTest; | 1692 | if (builtin.os.tag != .windows) return error.SkipZigTest; |
| 1795 | 1693 | ||
| 1796 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1797 | |||
| 1798 | var tmp = tmpDir(.{}); | 1694 | var tmp = tmpDir(.{}); |
| 1799 | // Set tmp dir as current working directory. | 1695 | // Set tmp dir as current working directory. |
| 1800 | try tmp.dir.setAsCwd(); | 1696 | try tmp.dir.setAsCwd(); |
lib/std/hash/auto_hash.zig-21| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const assert = std.debug.assert; | 2 | const assert = std.debug.assert; |
| 3 | const builtin = @import("builtin"); | ||
| 4 | const mem = std.mem; | 3 | const mem = std.mem; |
| 5 | const meta = std.meta; | 4 | const meta = std.meta; |
| 6 | 5 | ||
| ... | @@ -253,8 +252,6 @@ test "typeContainsSlice" { | ... | @@ -253,8 +252,6 @@ test "typeContainsSlice" { |
| 253 | } | 252 | } |
| 254 | 253 | ||
| 255 | test "hash pointer" { | 254 | test "hash pointer" { |
| 256 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 257 | |||
| 258 | const array = [_]u32{ 123, 123, 123 }; | 255 | const array = [_]u32{ 123, 123, 123 }; |
| 259 | const a = &array[0]; | 256 | const a = &array[0]; |
| 260 | const b = &array[1]; | 257 | const b = &array[1]; |
| ... | @@ -275,8 +272,6 @@ test "hash pointer" { | ... | @@ -275,8 +272,6 @@ test "hash pointer" { |
| 275 | } | 272 | } |
| 276 | 273 | ||
| 277 | test "hash slice shallow" { | 274 | test "hash slice shallow" { |
| 278 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 279 | |||
| 280 | // Allocate one array dynamically so that we're assured it is not merged | 275 | // Allocate one array dynamically so that we're assured it is not merged |
| 281 | // with the other by the optimization passes. | 276 | // with the other by the optimization passes. |
| 282 | const array1 = try std.testing.allocator.create([6]u32); | 277 | const array1 = try std.testing.allocator.create([6]u32); |
| ... | @@ -295,8 +290,6 @@ test "hash slice shallow" { | ... | @@ -295,8 +290,6 @@ test "hash slice shallow" { |
| 295 | } | 290 | } |
| 296 | 291 | ||
| 297 | test "hash slice deep" { | 292 | test "hash slice deep" { |
| 298 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 299 | |||
| 300 | // Allocate one array dynamically so that we're assured it is not merged | 293 | // Allocate one array dynamically so that we're assured it is not merged |
| 301 | // with the other by the optimization passes. | 294 | // with the other by the optimization passes. |
| 302 | const array1 = try std.testing.allocator.create([6]u32); | 295 | const array1 = try std.testing.allocator.create([6]u32); |
| ... | @@ -313,8 +306,6 @@ test "hash slice deep" { | ... | @@ -313,8 +306,6 @@ test "hash slice deep" { |
| 313 | } | 306 | } |
| 314 | 307 | ||
| 315 | test "hash struct deep" { | 308 | test "hash struct deep" { |
| 316 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 317 | |||
| 318 | const Foo = struct { | 309 | const Foo = struct { |
| 319 | a: u32, | 310 | a: u32, |
| 320 | b: u16, | 311 | b: u16, |
| ... | @@ -354,8 +345,6 @@ test "hash struct deep" { | ... | @@ -354,8 +345,6 @@ test "hash struct deep" { |
| 354 | } | 345 | } |
| 355 | 346 | ||
| 356 | test "testHash optional" { | 347 | test "testHash optional" { |
| 357 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 358 | |||
| 359 | const a: ?u32 = 123; | 348 | const a: ?u32 = 123; |
| 360 | const b: ?u32 = null; | 349 | const b: ?u32 = null; |
| 361 | try testing.expectEqual(testHash(a), testHash(@as(u32, 123))); | 350 | try testing.expectEqual(testHash(a), testHash(@as(u32, 123))); |
| ... | @@ -364,8 +353,6 @@ test "testHash optional" { | ... | @@ -364,8 +353,6 @@ test "testHash optional" { |
| 364 | } | 353 | } |
| 365 | 354 | ||
| 366 | test "testHash array" { | 355 | test "testHash array" { |
| 367 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 368 | |||
| 369 | const a = [_]u32{ 1, 2, 3 }; | 356 | const a = [_]u32{ 1, 2, 3 }; |
| 370 | const h = testHash(a); | 357 | const h = testHash(a); |
| 371 | var hasher = Wyhash.init(0); | 358 | var hasher = Wyhash.init(0); |
| ... | @@ -382,8 +369,6 @@ test "testHash multi-dimensional array" { | ... | @@ -382,8 +369,6 @@ test "testHash multi-dimensional array" { |
| 382 | } | 369 | } |
| 383 | 370 | ||
| 384 | test "testHash struct" { | 371 | test "testHash struct" { |
| 385 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 386 | |||
| 387 | const Foo = struct { | 372 | const Foo = struct { |
| 388 | a: u32 = 1, | 373 | a: u32 = 1, |
| 389 | b: u32 = 2, | 374 | b: u32 = 2, |
| ... | @@ -399,8 +384,6 @@ test "testHash struct" { | ... | @@ -399,8 +384,6 @@ test "testHash struct" { |
| 399 | } | 384 | } |
| 400 | 385 | ||
| 401 | test "testHash union" { | 386 | test "testHash union" { |
| 402 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 403 | |||
| 404 | const Foo = union(enum) { | 387 | const Foo = union(enum) { |
| 405 | A: u32, | 388 | A: u32, |
| 406 | B: bool, | 389 | B: bool, |
| ... | @@ -425,8 +408,6 @@ test "testHash union" { | ... | @@ -425,8 +408,6 @@ test "testHash union" { |
| 425 | } | 408 | } |
| 426 | 409 | ||
| 427 | test "testHash vector" { | 410 | test "testHash vector" { |
| 428 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 429 | |||
| 430 | const a: @Vector(4, u32) = [_]u32{ 1, 2, 3, 4 }; | 411 | const a: @Vector(4, u32) = [_]u32{ 1, 2, 3, 4 }; |
| 431 | const b: @Vector(4, u32) = [_]u32{ 1, 2, 3, 5 }; | 412 | const b: @Vector(4, u32) = [_]u32{ 1, 2, 3, 5 }; |
| 432 | try testing.expect(testHash(a) == testHash(a)); | 413 | try testing.expect(testHash(a) == testHash(a)); |
| ... | @@ -439,8 +420,6 @@ test "testHash vector" { | ... | @@ -439,8 +420,6 @@ test "testHash vector" { |
| 439 | } | 420 | } |
| 440 | 421 | ||
| 441 | test "testHash error union" { | 422 | test "testHash error union" { |
| 442 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 443 | |||
| 444 | const Errors = error{Test}; | 423 | const Errors = error{Test}; |
| 445 | const Foo = struct { | 424 | const Foo = struct { |
| 446 | a: u32 = 1, | 425 | a: u32 = 1, |
lib/std/hash/wyhash.zig-2| ... | @@ -242,8 +242,6 @@ test "smhasher" { | ... | @@ -242,8 +242,6 @@ test "smhasher" { |
| 242 | } | 242 | } |
| 243 | 243 | ||
| 244 | test "iterative api" { | 244 | test "iterative api" { |
| 245 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 246 | |||
| 247 | const Test = struct { | 245 | const Test = struct { |
| 248 | fn do() !void { | 246 | fn do() !void { |
| 249 | try verify.iterativeApi(Wyhash); | 247 | try verify.iterativeApi(Wyhash); |
lib/std/hash/xxhash.zig-18| ... | @@ -803,8 +803,6 @@ fn testExpect(comptime H: type, seed: anytype, input: []const u8, expected: u64) | ... | @@ -803,8 +803,6 @@ fn testExpect(comptime H: type, seed: anytype, input: []const u8, expected: u64) |
| 803 | } | 803 | } |
| 804 | 804 | ||
| 805 | test "xxhash3" { | 805 | test "xxhash3" { |
| 806 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 807 | |||
| 808 | const H = XxHash3; | 806 | const H = XxHash3; |
| 809 | // Non-Seeded Tests | 807 | // Non-Seeded Tests |
| 810 | try testExpect(H, 0, "", 0x2d06800538d394c2); | 808 | try testExpect(H, 0, "", 0x2d06800538d394c2); |
| ... | @@ -836,8 +834,6 @@ test "xxhash3" { | ... | @@ -836,8 +834,6 @@ test "xxhash3" { |
| 836 | } | 834 | } |
| 837 | 835 | ||
| 838 | test "xxhash3 smhasher" { | 836 | test "xxhash3 smhasher" { |
| 839 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 840 | |||
| 841 | const Test = struct { | 837 | const Test = struct { |
| 842 | fn do() !void { | 838 | fn do() !void { |
| 843 | try expectEqual(verify.smhasher(XxHash3.hash), 0x9a636405); | 839 | try expectEqual(verify.smhasher(XxHash3.hash), 0x9a636405); |
| ... | @@ -849,8 +845,6 @@ test "xxhash3 smhasher" { | ... | @@ -849,8 +845,6 @@ test "xxhash3 smhasher" { |
| 849 | } | 845 | } |
| 850 | 846 | ||
| 851 | test "xxhash3 iterative api" { | 847 | test "xxhash3 iterative api" { |
| 852 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 853 | |||
| 854 | const Test = struct { | 848 | const Test = struct { |
| 855 | fn do() !void { | 849 | fn do() !void { |
| 856 | try verify.iterativeApi(XxHash3); | 850 | try verify.iterativeApi(XxHash3); |
| ... | @@ -862,8 +856,6 @@ test "xxhash3 iterative api" { | ... | @@ -862,8 +856,6 @@ test "xxhash3 iterative api" { |
| 862 | } | 856 | } |
| 863 | 857 | ||
| 864 | test "xxhash64" { | 858 | test "xxhash64" { |
| 865 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 866 | |||
| 867 | const H = XxHash64; | 859 | const H = XxHash64; |
| 868 | try testExpect(H, 0, "", 0xef46db3751d8e999); | 860 | try testExpect(H, 0, "", 0xef46db3751d8e999); |
| 869 | try testExpect(H, 0, "a", 0xd24ec4f1a98c6e5b); | 861 | try testExpect(H, 0, "a", 0xd24ec4f1a98c6e5b); |
| ... | @@ -875,8 +867,6 @@ test "xxhash64" { | ... | @@ -875,8 +867,6 @@ test "xxhash64" { |
| 875 | } | 867 | } |
| 876 | 868 | ||
| 877 | test "xxhash64 smhasher" { | 869 | test "xxhash64 smhasher" { |
| 878 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 879 | |||
| 880 | const Test = struct { | 870 | const Test = struct { |
| 881 | fn do() !void { | 871 | fn do() !void { |
| 882 | try expectEqual(verify.smhasher(XxHash64.hash), 0x024B7CF4); | 872 | try expectEqual(verify.smhasher(XxHash64.hash), 0x024B7CF4); |
| ... | @@ -888,8 +878,6 @@ test "xxhash64 smhasher" { | ... | @@ -888,8 +878,6 @@ test "xxhash64 smhasher" { |
| 888 | } | 878 | } |
| 889 | 879 | ||
| 890 | test "xxhash64 iterative api" { | 880 | test "xxhash64 iterative api" { |
| 891 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 892 | |||
| 893 | const Test = struct { | 881 | const Test = struct { |
| 894 | fn do() !void { | 882 | fn do() !void { |
| 895 | try verify.iterativeApi(XxHash64); | 883 | try verify.iterativeApi(XxHash64); |
| ... | @@ -901,8 +889,6 @@ test "xxhash64 iterative api" { | ... | @@ -901,8 +889,6 @@ test "xxhash64 iterative api" { |
| 901 | } | 889 | } |
| 902 | 890 | ||
| 903 | test "xxhash32" { | 891 | test "xxhash32" { |
| 904 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 905 | |||
| 906 | const H = XxHash32; | 892 | const H = XxHash32; |
| 907 | 893 | ||
| 908 | try testExpect(H, 0, "", 0x02cc5d05); | 894 | try testExpect(H, 0, "", 0x02cc5d05); |
| ... | @@ -915,8 +901,6 @@ test "xxhash32" { | ... | @@ -915,8 +901,6 @@ test "xxhash32" { |
| 915 | } | 901 | } |
| 916 | 902 | ||
| 917 | test "xxhash32 smhasher" { | 903 | test "xxhash32 smhasher" { |
| 918 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 919 | |||
| 920 | const Test = struct { | 904 | const Test = struct { |
| 921 | fn do() !void { | 905 | fn do() !void { |
| 922 | try expectEqual(verify.smhasher(XxHash32.hash), 0xBA88B743); | 906 | try expectEqual(verify.smhasher(XxHash32.hash), 0xBA88B743); |
| ... | @@ -928,8 +912,6 @@ test "xxhash32 smhasher" { | ... | @@ -928,8 +912,6 @@ test "xxhash32 smhasher" { |
| 928 | } | 912 | } |
| 929 | 913 | ||
| 930 | test "xxhash32 iterative api" { | 914 | test "xxhash32 iterative api" { |
| 931 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 932 | |||
| 933 | const Test = struct { | 915 | const Test = struct { |
| 934 | fn do() !void { | 916 | fn do() !void { |
| 935 | try verify.iterativeApi(XxHash32); | 917 | try verify.iterativeApi(XxHash32); |
lib/std/hash_map.zig-2| ... | @@ -1873,8 +1873,6 @@ test "std.hash_map multiple removes on same metadata" { | ... | @@ -1873,8 +1873,6 @@ test "std.hash_map multiple removes on same metadata" { |
| 1873 | } | 1873 | } |
| 1874 | 1874 | ||
| 1875 | test "std.hash_map put and remove loop in random order" { | 1875 | test "std.hash_map put and remove loop in random order" { |
| 1876 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1877 | |||
| 1878 | var map = AutoHashMap(u32, u32).init(std.testing.allocator); | 1876 | var map = AutoHashMap(u32, u32).init(std.testing.allocator); |
| 1879 | defer map.deinit(); | 1877 | defer map.deinit(); |
| 1880 | 1878 |
lib/std/heap/general_purpose_allocator.zig-4| ... | @@ -1042,8 +1042,6 @@ const TraceKind = enum { | ... | @@ -1042,8 +1042,6 @@ const TraceKind = enum { |
| 1042 | const test_config = Config{}; | 1042 | const test_config = Config{}; |
| 1043 | 1043 | ||
| 1044 | test "small allocations - free in same order" { | 1044 | test "small allocations - free in same order" { |
| 1045 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1046 | |||
| 1047 | var gpa = GeneralPurposeAllocator(test_config){}; | 1045 | var gpa = GeneralPurposeAllocator(test_config){}; |
| 1048 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); | 1046 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); |
| 1049 | const allocator = gpa.allocator(); | 1047 | const allocator = gpa.allocator(); |
| ... | @@ -1063,8 +1061,6 @@ test "small allocations - free in same order" { | ... | @@ -1063,8 +1061,6 @@ test "small allocations - free in same order" { |
| 1063 | } | 1061 | } |
| 1064 | 1062 | ||
| 1065 | test "small allocations - free in reverse order" { | 1063 | test "small allocations - free in reverse order" { |
| 1066 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1067 | |||
| 1068 | var gpa = GeneralPurposeAllocator(test_config){}; | 1064 | var gpa = GeneralPurposeAllocator(test_config){}; |
| 1069 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); | 1065 | defer std.testing.expect(gpa.deinit() == .ok) catch @panic("leak"); |
| 1070 | const allocator = gpa.allocator(); | 1066 | const allocator = gpa.allocator(); |
lib/std/http/Client.zig+2-6| ... | @@ -1,7 +1,6 @@ | ... | @@ -1,7 +1,6 @@ |
| 1 | //! Connecting and opening requests are threadsafe. Individual requests are not. | 1 | //! Connecting and opening requests are threadsafe. Individual requests are not. |
| 2 | 2 | ||
| 3 | const std = @import("../std.zig"); | 3 | const std = @import("../std.zig"); |
| 4 | const builtin = @import("builtin"); | ||
| 5 | const testing = std.testing; | 4 | const testing = std.testing; |
| 6 | const http = std.http; | 5 | const http = std.http; |
| 7 | const mem = std.mem; | 6 | const mem = std.mem; |
| ... | @@ -428,8 +427,6 @@ pub const Response = struct { | ... | @@ -428,8 +427,6 @@ pub const Response = struct { |
| 428 | } | 427 | } |
| 429 | 428 | ||
| 430 | test parseInt3 { | 429 | test parseInt3 { |
| 431 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 432 | |||
| 433 | const expectEqual = testing.expectEqual; | 430 | const expectEqual = testing.expectEqual; |
| 434 | try expectEqual(@as(u10, 0), parseInt3("000".*)); | 431 | try expectEqual(@as(u10, 0), parseInt3("000".*)); |
| 435 | try expectEqual(@as(u10, 418), parseInt3("418".*)); | 432 | try expectEqual(@as(u10, 418), parseInt3("418".*)); |
| ... | @@ -588,7 +585,7 @@ pub const Request = struct { | ... | @@ -588,7 +585,7 @@ pub const Request = struct { |
| 588 | 585 | ||
| 589 | if (!req.headers.contains("user-agent")) { | 586 | if (!req.headers.contains("user-agent")) { |
| 590 | try w.writeAll("User-Agent: zig/"); | 587 | try w.writeAll("User-Agent: zig/"); |
| 591 | try w.writeAll(builtin.zig_version_string); | 588 | try w.writeAll(@import("builtin").zig_version_string); |
| 592 | try w.writeAll(" (std.http)\r\n"); | 589 | try w.writeAll(" (std.http)\r\n"); |
| 593 | } | 590 | } |
| 594 | 591 | ||
| ... | @@ -1252,6 +1249,7 @@ pub fn fetch(client: *Client, allocator: Allocator, options: FetchOptions) !Fetc | ... | @@ -1252,6 +1249,7 @@ pub fn fetch(client: *Client, allocator: Allocator, options: FetchOptions) !Fetc |
| 1252 | } | 1249 | } |
| 1253 | 1250 | ||
| 1254 | test { | 1251 | test { |
| 1252 | const builtin = @import("builtin"); | ||
| 1255 | const native_endian = comptime builtin.cpu.arch.endian(); | 1253 | const native_endian = comptime builtin.cpu.arch.endian(); |
| 1256 | if (builtin.zig_backend == .stage2_llvm and native_endian == .Big) { | 1254 | if (builtin.zig_backend == .stage2_llvm and native_endian == .Big) { |
| 1257 | // https://github.com/ziglang/zig/issues/13782 | 1255 | // https://github.com/ziglang/zig/issues/13782 |
| ... | @@ -1260,7 +1258,5 @@ test { | ... | @@ -1260,7 +1258,5 @@ test { |
| 1260 | 1258 | ||
| 1261 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 1259 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 1262 | 1260 | ||
| 1263 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1264 | |||
| 1265 | std.testing.refAllDecls(@This()); | 1261 | std.testing.refAllDecls(@This()); |
| 1266 | } | 1262 | } |
lib/std/http/Server.zig-2| ... | @@ -725,8 +725,6 @@ test "HTTP server handles a chunked transfer coding request" { | ... | @@ -725,8 +725,6 @@ test "HTTP server handles a chunked transfer coding request" { |
| 725 | return error.SkipZigTest; | 725 | return error.SkipZigTest; |
| 726 | } | 726 | } |
| 727 | 727 | ||
| 728 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 729 | |||
| 730 | const native_endian = comptime builtin.cpu.arch.endian(); | 728 | const native_endian = comptime builtin.cpu.arch.endian(); |
| 731 | if (builtin.zig_backend == .stage2_llvm and native_endian == .Big) { | 729 | if (builtin.zig_backend == .stage2_llvm and native_endian == .Big) { |
| 732 | // https://github.com/ziglang/zig/issues/13782 | 730 | // https://github.com/ziglang/zig/issues/13782 |
lib/std/io/bit_reader.zig-2| ... | @@ -164,8 +164,6 @@ pub fn bitReader( | ... | @@ -164,8 +164,6 @@ pub fn bitReader( |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | test "api coverage" { | 166 | test "api coverage" { |
| 167 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 168 | |||
| 169 | const mem_be = [_]u8{ 0b11001101, 0b00001011 }; | 167 | const mem_be = [_]u8{ 0b11001101, 0b00001011 }; |
| 170 | const mem_le = [_]u8{ 0b00011101, 0b10010101 }; | 168 | const mem_le = [_]u8{ 0b00011101, 0b10010101 }; |
| 171 | 169 |
lib/std/io/multi_writer.zig-1| ... | @@ -36,7 +36,6 @@ pub fn multiWriter(streams: anytype) MultiWriter(@TypeOf(streams)) { | ... | @@ -36,7 +36,6 @@ pub fn multiWriter(streams: anytype) MultiWriter(@TypeOf(streams)) { |
| 36 | const testing = std.testing; | 36 | const testing = std.testing; |
| 37 | 37 | ||
| 38 | test "MultiWriter" { | 38 | test "MultiWriter" { |
| 39 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 40 | var tmp = testing.tmpDir(.{}); | 39 | var tmp = testing.tmpDir(.{}); |
| 41 | defer tmp.cleanup(); | 40 | defer tmp.cleanup(); |
| 42 | var f = try tmp.dir.createFile("t.txt", .{}); | 41 | var f = try tmp.dir.createFile("t.txt", .{}); |
lib/std/io/test.zig-10| ... | @@ -15,8 +15,6 @@ const native_endian = builtin.target.cpu.arch.endian(); | ... | @@ -15,8 +15,6 @@ const native_endian = builtin.target.cpu.arch.endian(); |
| 15 | const tmpDir = std.testing.tmpDir; | 15 | const tmpDir = std.testing.tmpDir; |
| 16 | 16 | ||
| 17 | test "write a file, read it, then delete it" { | 17 | test "write a file, read it, then delete it" { |
| 18 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 19 | |||
| 20 | var tmp = tmpDir(.{}); | 18 | var tmp = tmpDir(.{}); |
| 21 | defer tmp.cleanup(); | 19 | defer tmp.cleanup(); |
| 22 | 20 | ||
| ... | @@ -63,8 +61,6 @@ test "write a file, read it, then delete it" { | ... | @@ -63,8 +61,6 @@ test "write a file, read it, then delete it" { |
| 63 | } | 61 | } |
| 64 | 62 | ||
| 65 | test "BitStreams with File Stream" { | 63 | test "BitStreams with File Stream" { |
| 66 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 67 | |||
| 68 | var tmp = tmpDir(.{}); | 64 | var tmp = tmpDir(.{}); |
| 69 | defer tmp.cleanup(); | 65 | defer tmp.cleanup(); |
| 70 | 66 | ||
| ... | @@ -110,8 +106,6 @@ test "BitStreams with File Stream" { | ... | @@ -110,8 +106,6 @@ test "BitStreams with File Stream" { |
| 110 | } | 106 | } |
| 111 | 107 | ||
| 112 | test "File seek ops" { | 108 | test "File seek ops" { |
| 113 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 114 | |||
| 115 | var tmp = tmpDir(.{}); | 109 | var tmp = tmpDir(.{}); |
| 116 | defer tmp.cleanup(); | 110 | defer tmp.cleanup(); |
| 117 | 111 | ||
| ... | @@ -139,8 +133,6 @@ test "File seek ops" { | ... | @@ -139,8 +133,6 @@ test "File seek ops" { |
| 139 | } | 133 | } |
| 140 | 134 | ||
| 141 | test "setEndPos" { | 135 | test "setEndPos" { |
| 142 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 143 | |||
| 144 | var tmp = tmpDir(.{}); | 136 | var tmp = tmpDir(.{}); |
| 145 | defer tmp.cleanup(); | 137 | defer tmp.cleanup(); |
| 146 | 138 | ||
| ... | @@ -167,8 +159,6 @@ test "setEndPos" { | ... | @@ -167,8 +159,6 @@ test "setEndPos" { |
| 167 | } | 159 | } |
| 168 | 160 | ||
| 169 | test "updateTimes" { | 161 | test "updateTimes" { |
| 170 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 171 | |||
| 172 | var tmp = tmpDir(.{}); | 162 | var tmp = tmpDir(.{}); |
| 173 | defer tmp.cleanup(); | 163 | defer tmp.cleanup(); |
| 174 | 164 |
lib/std/json.zig-9| ... | @@ -9,7 +9,6 @@ | ... | @@ -9,7 +9,6 @@ |
| 9 | //! The low-level `writeStream` emits syntax-conformant JSON tokens to a `std.io.Writer`. | 9 | //! The low-level `writeStream` emits syntax-conformant JSON tokens to a `std.io.Writer`. |
| 10 | //! The high-level `stringify` serializes a Zig or `Value` type into JSON. | 10 | //! The high-level `stringify` serializes a Zig or `Value` type into JSON. |
| 11 | 11 | ||
| 12 | const builtin = @import("builtin"); | ||
| 13 | const testing = @import("std").testing; | 12 | const testing = @import("std").testing; |
| 14 | const ArrayList = @import("std").ArrayList; | 13 | const ArrayList = @import("std").ArrayList; |
| 15 | 14 | ||
| ... | @@ -24,8 +23,6 @@ test Scanner { | ... | @@ -24,8 +23,6 @@ test Scanner { |
| 24 | } | 23 | } |
| 25 | 24 | ||
| 26 | test parseFromSlice { | 25 | test parseFromSlice { |
| 27 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 28 | |||
| 29 | var parsed_str = try parseFromSlice([]const u8, testing.allocator, "\"a\\u0020b\"", .{}); | 26 | var parsed_str = try parseFromSlice([]const u8, testing.allocator, "\"a\\u0020b\"", .{}); |
| 30 | defer parsed_str.deinit(); | 27 | defer parsed_str.deinit(); |
| 31 | try testing.expectEqualSlices(u8, "a b", parsed_str.value); | 28 | try testing.expectEqualSlices(u8, "a b", parsed_str.value); |
| ... | @@ -38,16 +35,12 @@ test parseFromSlice { | ... | @@ -38,16 +35,12 @@ test parseFromSlice { |
| 38 | } | 35 | } |
| 39 | 36 | ||
| 40 | test Value { | 37 | test Value { |
| 41 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 42 | |||
| 43 | var parsed = try parseFromSlice(Value, testing.allocator, "{\"anything\": \"goes\"}", .{}); | 38 | var parsed = try parseFromSlice(Value, testing.allocator, "{\"anything\": \"goes\"}", .{}); |
| 44 | defer parsed.deinit(); | 39 | defer parsed.deinit(); |
| 45 | try testing.expectEqualSlices(u8, "goes", parsed.value.object.get("anything").?.string); | 40 | try testing.expectEqualSlices(u8, "goes", parsed.value.object.get("anything").?.string); |
| 46 | } | 41 | } |
| 47 | 42 | ||
| 48 | test writeStream { | 43 | test writeStream { |
| 49 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 50 | |||
| 51 | var out = ArrayList(u8).init(testing.allocator); | 44 | var out = ArrayList(u8).init(testing.allocator); |
| 52 | defer out.deinit(); | 45 | defer out.deinit(); |
| 53 | var write_stream = writeStream(out.writer(), .{ .whitespace = .indent_2 }); | 46 | var write_stream = writeStream(out.writer(), .{ .whitespace = .indent_2 }); |
| ... | @@ -65,8 +58,6 @@ test writeStream { | ... | @@ -65,8 +58,6 @@ test writeStream { |
| 65 | } | 58 | } |
| 66 | 59 | ||
| 67 | test stringify { | 60 | test stringify { |
| 68 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 69 | |||
| 70 | var out = ArrayList(u8).init(testing.allocator); | 61 | var out = ArrayList(u8).init(testing.allocator); |
| 71 | defer out.deinit(); | 62 | defer out.deinit(); |
| 72 | 63 |
lib/std/json/JSONTestSuite_test.zig-72| ... | @@ -104,8 +104,6 @@ test "i_string_utf16LE_no_BOM.json" { | ... | @@ -104,8 +104,6 @@ test "i_string_utf16LE_no_BOM.json" { |
| 104 | try any("[\x00\"\x00\xe9\x00\"\x00]\x00"); | 104 | try any("[\x00\"\x00\xe9\x00\"\x00]\x00"); |
| 105 | } | 105 | } |
| 106 | test "i_structure_500_nested_arrays.json" { | 106 | test "i_structure_500_nested_arrays.json" { |
| 107 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 108 | |||
| 109 | try any("[" ** 500 ++ "]" ** 500); | 107 | try any("[" ** 500 ++ "]" ** 500); |
| 110 | } | 108 | } |
| 111 | test "i_structure_UTF-8_BOM_empty_object.json" { | 109 | test "i_structure_UTF-8_BOM_empty_object.json" { |
| ... | @@ -361,21 +359,15 @@ test "n_object_bracket_key.json" { | ... | @@ -361,21 +359,15 @@ test "n_object_bracket_key.json" { |
| 361 | try err("{[: \"x\"}\n"); | 359 | try err("{[: \"x\"}\n"); |
| 362 | } | 360 | } |
| 363 | test "n_object_comma_instead_of_colon.json" { | 361 | test "n_object_comma_instead_of_colon.json" { |
| 364 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 365 | |||
| 366 | try err("{\"x\", null}"); | 362 | try err("{\"x\", null}"); |
| 367 | } | 363 | } |
| 368 | test "n_object_double_colon.json" { | 364 | test "n_object_double_colon.json" { |
| 369 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 370 | |||
| 371 | try err("{\"x\"::\"b\"}"); | 365 | try err("{\"x\"::\"b\"}"); |
| 372 | } | 366 | } |
| 373 | test "n_object_emoji.json" { | 367 | test "n_object_emoji.json" { |
| 374 | try err("{\xf0\x9f\x87\xa8\xf0\x9f\x87\xad}"); | 368 | try err("{\xf0\x9f\x87\xa8\xf0\x9f\x87\xad}"); |
| 375 | } | 369 | } |
| 376 | test "n_object_garbage_at_end.json" { | 370 | test "n_object_garbage_at_end.json" { |
| 377 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 378 | |||
| 379 | try err("{\"a\":\"a\" 123}"); | 371 | try err("{\"a\":\"a\" 123}"); |
| 380 | } | 372 | } |
| 381 | test "n_object_key_with_single_quotes.json" { | 373 | test "n_object_key_with_single_quotes.json" { |
| ... | @@ -385,26 +377,18 @@ test "n_object_lone_continuation_byte_in_key_and_trailing_comma.json" { | ... | @@ -385,26 +377,18 @@ test "n_object_lone_continuation_byte_in_key_and_trailing_comma.json" { |
| 385 | try err("{\"\xb9\":\"0\",}"); | 377 | try err("{\"\xb9\":\"0\",}"); |
| 386 | } | 378 | } |
| 387 | test "n_object_missing_colon.json" { | 379 | test "n_object_missing_colon.json" { |
| 388 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 389 | |||
| 390 | try err("{\"a\" b}"); | 380 | try err("{\"a\" b}"); |
| 391 | } | 381 | } |
| 392 | test "n_object_missing_key.json" { | 382 | test "n_object_missing_key.json" { |
| 393 | try err("{:\"b\"}"); | 383 | try err("{:\"b\"}"); |
| 394 | } | 384 | } |
| 395 | test "n_object_missing_semicolon.json" { | 385 | test "n_object_missing_semicolon.json" { |
| 396 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 397 | |||
| 398 | try err("{\"a\" \"b\"}"); | 386 | try err("{\"a\" \"b\"}"); |
| 399 | } | 387 | } |
| 400 | test "n_object_missing_value.json" { | 388 | test "n_object_missing_value.json" { |
| 401 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 402 | |||
| 403 | try err("{\"a\":"); | 389 | try err("{\"a\":"); |
| 404 | } | 390 | } |
| 405 | test "n_object_no-colon.json" { | 391 | test "n_object_no-colon.json" { |
| 406 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 407 | |||
| 408 | try err("{\"a\""); | 392 | try err("{\"a\""); |
| 409 | } | 393 | } |
| 410 | test "n_object_non_string_key.json" { | 394 | test "n_object_non_string_key.json" { |
| ... | @@ -417,59 +401,39 @@ test "n_object_repeated_null_null.json" { | ... | @@ -417,59 +401,39 @@ test "n_object_repeated_null_null.json" { |
| 417 | try err("{null:null,null:null}"); | 401 | try err("{null:null,null:null}"); |
| 418 | } | 402 | } |
| 419 | test "n_object_several_trailing_commas.json" { | 403 | test "n_object_several_trailing_commas.json" { |
| 420 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 421 | |||
| 422 | try err("{\"id\":0,,,,,}"); | 404 | try err("{\"id\":0,,,,,}"); |
| 423 | } | 405 | } |
| 424 | test "n_object_single_quote.json" { | 406 | test "n_object_single_quote.json" { |
| 425 | try err("{'a':0}"); | 407 | try err("{'a':0}"); |
| 426 | } | 408 | } |
| 427 | test "n_object_trailing_comma.json" { | 409 | test "n_object_trailing_comma.json" { |
| 428 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 429 | |||
| 430 | try err("{\"id\":0,}"); | 410 | try err("{\"id\":0,}"); |
| 431 | } | 411 | } |
| 432 | test "n_object_trailing_comment.json" { | 412 | test "n_object_trailing_comment.json" { |
| 433 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 434 | |||
| 435 | try err("{\"a\":\"b\"}/**/"); | 413 | try err("{\"a\":\"b\"}/**/"); |
| 436 | } | 414 | } |
| 437 | test "n_object_trailing_comment_open.json" { | 415 | test "n_object_trailing_comment_open.json" { |
| 438 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 439 | |||
| 440 | try err("{\"a\":\"b\"}/**//"); | 416 | try err("{\"a\":\"b\"}/**//"); |
| 441 | } | 417 | } |
| 442 | test "n_object_trailing_comment_slash_open.json" { | 418 | test "n_object_trailing_comment_slash_open.json" { |
| 443 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 444 | |||
| 445 | try err("{\"a\":\"b\"}//"); | 419 | try err("{\"a\":\"b\"}//"); |
| 446 | } | 420 | } |
| 447 | test "n_object_trailing_comment_slash_open_incomplete.json" { | 421 | test "n_object_trailing_comment_slash_open_incomplete.json" { |
| 448 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 449 | |||
| 450 | try err("{\"a\":\"b\"}/"); | 422 | try err("{\"a\":\"b\"}/"); |
| 451 | } | 423 | } |
| 452 | test "n_object_two_commas_in_a_row.json" { | 424 | test "n_object_two_commas_in_a_row.json" { |
| 453 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 454 | |||
| 455 | try err("{\"a\":\"b\",,\"c\":\"d\"}"); | 425 | try err("{\"a\":\"b\",,\"c\":\"d\"}"); |
| 456 | } | 426 | } |
| 457 | test "n_object_unquoted_key.json" { | 427 | test "n_object_unquoted_key.json" { |
| 458 | try err("{a: \"b\"}"); | 428 | try err("{a: \"b\"}"); |
| 459 | } | 429 | } |
| 460 | test "n_object_unterminated-value.json" { | 430 | test "n_object_unterminated-value.json" { |
| 461 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 462 | |||
| 463 | try err("{\"a\":\"a"); | 431 | try err("{\"a\":\"a"); |
| 464 | } | 432 | } |
| 465 | test "n_object_with_single_string.json" { | 433 | test "n_object_with_single_string.json" { |
| 466 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 467 | |||
| 468 | try err("{ \"foo\" : \"bar\", \"a\" }"); | 434 | try err("{ \"foo\" : \"bar\", \"a\" }"); |
| 469 | } | 435 | } |
| 470 | test "n_object_with_trailing_garbage.json" { | 436 | test "n_object_with_trailing_garbage.json" { |
| 471 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 472 | |||
| 473 | try err("{\"a\":\"b\"}#"); | 437 | try err("{\"a\":\"b\"}#"); |
| 474 | } | 438 | } |
| 475 | test "n_single_space.json" { | 439 | test "n_single_space.json" { |
| ... | @@ -596,8 +560,6 @@ test "n_structure_close_unopened_array.json" { | ... | @@ -596,8 +560,6 @@ test "n_structure_close_unopened_array.json" { |
| 596 | try err("1]"); | 560 | try err("1]"); |
| 597 | } | 561 | } |
| 598 | test "n_structure_comma_instead_of_closing_brace.json" { | 562 | test "n_structure_comma_instead_of_closing_brace.json" { |
| 599 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 600 | |||
| 601 | try err("{\"x\": true,"); | 563 | try err("{\"x\": true,"); |
| 602 | } | 564 | } |
| 603 | test "n_structure_double_array.json" { | 565 | test "n_structure_double_array.json" { |
| ... | @@ -628,18 +590,12 @@ test "n_structure_object_followed_by_closing_object.json" { | ... | @@ -628,18 +590,12 @@ test "n_structure_object_followed_by_closing_object.json" { |
| 628 | try err("{}}"); | 590 | try err("{}}"); |
| 629 | } | 591 | } |
| 630 | test "n_structure_object_unclosed_no_value.json" { | 592 | test "n_structure_object_unclosed_no_value.json" { |
| 631 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 632 | |||
| 633 | try err("{\"\":"); | 593 | try err("{\"\":"); |
| 634 | } | 594 | } |
| 635 | test "n_structure_object_with_comment.json" { | 595 | test "n_structure_object_with_comment.json" { |
| 636 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 637 | |||
| 638 | try err("{\"a\":/*comment*/\"b\"}"); | 596 | try err("{\"a\":/*comment*/\"b\"}"); |
| 639 | } | 597 | } |
| 640 | test "n_structure_object_with_trailing_garbage.json" { | 598 | test "n_structure_object_with_trailing_garbage.json" { |
| 641 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 642 | |||
| 643 | try err("{\"a\": true} \"x\""); | 599 | try err("{\"a\": true} \"x\""); |
| 644 | } | 600 | } |
| 645 | test "n_structure_open_array_apostrophe.json" { | 601 | test "n_structure_open_array_apostrophe.json" { |
| ... | @@ -649,8 +605,6 @@ test "n_structure_open_array_comma.json" { | ... | @@ -649,8 +605,6 @@ test "n_structure_open_array_comma.json" { |
| 649 | try err("[,"); | 605 | try err("[,"); |
| 650 | } | 606 | } |
| 651 | test "n_structure_open_array_object.json" { | 607 | test "n_structure_open_array_object.json" { |
| 652 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 653 | |||
| 654 | try err("[{\"\":" ** 50000 ++ "\n"); | 608 | try err("[{\"\":" ** 50000 ++ "\n"); |
| 655 | } | 609 | } |
| 656 | test "n_structure_open_array_open_object.json" { | 610 | test "n_structure_open_array_open_object.json" { |
| ... | @@ -690,8 +644,6 @@ test "n_structure_single_star.json" { | ... | @@ -690,8 +644,6 @@ test "n_structure_single_star.json" { |
| 690 | try err("*"); | 644 | try err("*"); |
| 691 | } | 645 | } |
| 692 | test "n_structure_trailing_#.json" { | 646 | test "n_structure_trailing_#.json" { |
| 693 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 694 | |||
| 695 | try err("{\"a\":\"b\"}#{}"); | 647 | try err("{\"a\":\"b\"}#{}"); |
| 696 | } | 648 | } |
| 697 | test "n_structure_uescaped_LF_before_string.json" { | 649 | test "n_structure_uescaped_LF_before_string.json" { |
| ... | @@ -710,8 +662,6 @@ test "n_structure_unclosed_array_unfinished_true.json" { | ... | @@ -710,8 +662,6 @@ test "n_structure_unclosed_array_unfinished_true.json" { |
| 710 | try err("[ false, tru"); | 662 | try err("[ false, tru"); |
| 711 | } | 663 | } |
| 712 | test "n_structure_unclosed_object.json" { | 664 | test "n_structure_unclosed_object.json" { |
| 713 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 714 | |||
| 715 | try err("{\"asd\":\"asd\""); | 665 | try err("{\"asd\":\"asd\""); |
| 716 | } | 666 | } |
| 717 | test "n_structure_unicode-identifier.json" { | 667 | test "n_structure_unicode-identifier.json" { |
| ... | @@ -814,61 +764,39 @@ test "y_number_simple_real.json" { | ... | @@ -814,61 +764,39 @@ test "y_number_simple_real.json" { |
| 814 | try ok("[123.456789]"); | 764 | try ok("[123.456789]"); |
| 815 | } | 765 | } |
| 816 | test "y_object.json" { | 766 | test "y_object.json" { |
| 817 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 818 | |||
| 819 | try ok("{\"asd\":\"sdf\", \"dfg\":\"fgh\"}"); | 767 | try ok("{\"asd\":\"sdf\", \"dfg\":\"fgh\"}"); |
| 820 | } | 768 | } |
| 821 | test "y_object_basic.json" { | 769 | test "y_object_basic.json" { |
| 822 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 823 | |||
| 824 | try ok("{\"asd\":\"sdf\"}"); | 770 | try ok("{\"asd\":\"sdf\"}"); |
| 825 | } | 771 | } |
| 826 | test "y_object_duplicated_key.json" { | 772 | test "y_object_duplicated_key.json" { |
| 827 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 828 | |||
| 829 | try ok("{\"a\":\"b\",\"a\":\"c\"}"); | 773 | try ok("{\"a\":\"b\",\"a\":\"c\"}"); |
| 830 | } | 774 | } |
| 831 | test "y_object_duplicated_key_and_value.json" { | 775 | test "y_object_duplicated_key_and_value.json" { |
| 832 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 833 | |||
| 834 | try ok("{\"a\":\"b\",\"a\":\"b\"}"); | 776 | try ok("{\"a\":\"b\",\"a\":\"b\"}"); |
| 835 | } | 777 | } |
| 836 | test "y_object_empty.json" { | 778 | test "y_object_empty.json" { |
| 837 | try ok("{}"); | 779 | try ok("{}"); |
| 838 | } | 780 | } |
| 839 | test "y_object_empty_key.json" { | 781 | test "y_object_empty_key.json" { |
| 840 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 841 | |||
| 842 | try ok("{\"\":0}"); | 782 | try ok("{\"\":0}"); |
| 843 | } | 783 | } |
| 844 | test "y_object_escaped_null_in_key.json" { | 784 | test "y_object_escaped_null_in_key.json" { |
| 845 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 846 | |||
| 847 | try ok("{\"foo\\u0000bar\": 42}"); | 785 | try ok("{\"foo\\u0000bar\": 42}"); |
| 848 | } | 786 | } |
| 849 | test "y_object_extreme_numbers.json" { | 787 | test "y_object_extreme_numbers.json" { |
| 850 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 851 | |||
| 852 | try ok("{ \"min\": -1.0e+28, \"max\": 1.0e+28 }"); | 788 | try ok("{ \"min\": -1.0e+28, \"max\": 1.0e+28 }"); |
| 853 | } | 789 | } |
| 854 | test "y_object_long_strings.json" { | 790 | test "y_object_long_strings.json" { |
| 855 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 856 | |||
| 857 | try ok("{\"x\":[{\"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}], \"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}"); | 791 | try ok("{\"x\":[{\"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}], \"id\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"}"); |
| 858 | } | 792 | } |
| 859 | test "y_object_simple.json" { | 793 | test "y_object_simple.json" { |
| 860 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 861 | |||
| 862 | try ok("{\"a\":[]}"); | 794 | try ok("{\"a\":[]}"); |
| 863 | } | 795 | } |
| 864 | test "y_object_string_unicode.json" { | 796 | test "y_object_string_unicode.json" { |
| 865 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 866 | |||
| 867 | try ok("{\"title\":\"\\u041f\\u043e\\u043b\\u0442\\u043e\\u0440\\u0430 \\u0417\\u0435\\u043c\\u043b\\u0435\\u043a\\u043e\\u043f\\u0430\" }"); | 797 | try ok("{\"title\":\"\\u041f\\u043e\\u043b\\u0442\\u043e\\u0440\\u0430 \\u0417\\u0435\\u043c\\u043b\\u0435\\u043a\\u043e\\u043f\\u0430\" }"); |
| 868 | } | 798 | } |
| 869 | test "y_object_with_newlines.json" { | 799 | test "y_object_with_newlines.json" { |
| 870 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 871 | |||
| 872 | try ok("{\n\"a\": \"b\"\n}"); | 800 | try ok("{\n\"a\": \"b\"\n}"); |
| 873 | } | 801 | } |
| 874 | test "y_string_1_2_3_bytes_UTF-8_sequences.json" { | 802 | test "y_string_1_2_3_bytes_UTF-8_sequences.json" { |
lib/std/json/dynamic_test.zig-25| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const mem = std.mem; | 2 | const mem = std.mem; |
| 4 | const testing = std.testing; | 3 | const testing = std.testing; |
| 5 | const ArenaAllocator = std.heap.ArenaAllocator; | 4 | const ArenaAllocator = std.heap.ArenaAllocator; |
| ... | @@ -19,8 +18,6 @@ const jsonReader = @import("scanner.zig").reader; | ... | @@ -19,8 +18,6 @@ const jsonReader = @import("scanner.zig").reader; |
| 19 | const JsonReader = @import("scanner.zig").Reader; | 18 | const JsonReader = @import("scanner.zig").Reader; |
| 20 | 19 | ||
| 21 | test "json.parser.dynamic" { | 20 | test "json.parser.dynamic" { |
| 22 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 23 | |||
| 24 | const s = | 21 | const s = |
| 25 | \\{ | 22 | \\{ |
| 26 | \\ "Image": { | 23 | \\ "Image": { |
| ... | @@ -75,8 +72,6 @@ test "json.parser.dynamic" { | ... | @@ -75,8 +72,6 @@ test "json.parser.dynamic" { |
| 75 | 72 | ||
| 76 | const writeStream = @import("./stringify.zig").writeStream; | 73 | const writeStream = @import("./stringify.zig").writeStream; |
| 77 | test "write json then parse it" { | 74 | test "write json then parse it" { |
| 78 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 79 | |||
| 80 | var out_buffer: [1000]u8 = undefined; | 75 | var out_buffer: [1000]u8 = undefined; |
| 81 | 76 | ||
| 82 | var fixed_buffer_stream = std.io.fixedBufferStream(&out_buffer); | 77 | var fixed_buffer_stream = std.io.fixedBufferStream(&out_buffer); |
| ... | @@ -125,16 +120,12 @@ fn testParse(allocator: std.mem.Allocator, json_str: []const u8) !Value { | ... | @@ -125,16 +120,12 @@ fn testParse(allocator: std.mem.Allocator, json_str: []const u8) !Value { |
| 125 | } | 120 | } |
| 126 | 121 | ||
| 127 | test "parsing empty string gives appropriate error" { | 122 | test "parsing empty string gives appropriate error" { |
| 128 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 129 | |||
| 130 | var arena_allocator = std.heap.ArenaAllocator.init(std.testing.allocator); | 123 | var arena_allocator = std.heap.ArenaAllocator.init(std.testing.allocator); |
| 131 | defer arena_allocator.deinit(); | 124 | defer arena_allocator.deinit(); |
| 132 | try testing.expectError(error.UnexpectedEndOfInput, testParse(arena_allocator.allocator(), "")); | 125 | try testing.expectError(error.UnexpectedEndOfInput, testParse(arena_allocator.allocator(), "")); |
| 133 | } | 126 | } |
| 134 | 127 | ||
| 135 | test "Value.array allocator should still be usable after parsing" { | 128 | test "Value.array allocator should still be usable after parsing" { |
| 136 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 137 | |||
| 138 | var parsed = try parseFromSlice(Value, std.testing.allocator, "[]", .{}); | 129 | var parsed = try parseFromSlice(Value, std.testing.allocator, "[]", .{}); |
| 139 | defer parsed.deinit(); | 130 | defer parsed.deinit(); |
| 140 | 131 | ||
| ... | @@ -147,8 +138,6 @@ test "Value.array allocator should still be usable after parsing" { | ... | @@ -147,8 +138,6 @@ test "Value.array allocator should still be usable after parsing" { |
| 147 | } | 138 | } |
| 148 | 139 | ||
| 149 | test "integer after float has proper type" { | 140 | test "integer after float has proper type" { |
| 150 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 151 | |||
| 152 | var arena_allocator = std.heap.ArenaAllocator.init(std.testing.allocator); | 141 | var arena_allocator = std.heap.ArenaAllocator.init(std.testing.allocator); |
| 153 | defer arena_allocator.deinit(); | 142 | defer arena_allocator.deinit(); |
| 154 | const parsed = try testParse(arena_allocator.allocator(), | 143 | const parsed = try testParse(arena_allocator.allocator(), |
| ... | @@ -161,8 +150,6 @@ test "integer after float has proper type" { | ... | @@ -161,8 +150,6 @@ test "integer after float has proper type" { |
| 161 | } | 150 | } |
| 162 | 151 | ||
| 163 | test "escaped characters" { | 152 | test "escaped characters" { |
| 164 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 165 | |||
| 166 | var arena_allocator = std.heap.ArenaAllocator.init(std.testing.allocator); | 153 | var arena_allocator = std.heap.ArenaAllocator.init(std.testing.allocator); |
| 167 | defer arena_allocator.deinit(); | 154 | defer arena_allocator.deinit(); |
| 168 | const input = | 155 | const input = |
| ... | @@ -195,8 +182,6 @@ test "escaped characters" { | ... | @@ -195,8 +182,6 @@ test "escaped characters" { |
| 195 | } | 182 | } |
| 196 | 183 | ||
| 197 | test "Value.jsonStringify" { | 184 | test "Value.jsonStringify" { |
| 198 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 199 | |||
| 200 | var vals = [_]Value{ | 185 | var vals = [_]Value{ |
| 201 | .{ .integer = 1 }, | 186 | .{ .integer = 1 }, |
| 202 | .{ .integer = 2 }, | 187 | .{ .integer = 2 }, |
| ... | @@ -244,8 +229,6 @@ test "Value.jsonStringify" { | ... | @@ -244,8 +229,6 @@ test "Value.jsonStringify" { |
| 244 | } | 229 | } |
| 245 | 230 | ||
| 246 | test "parseFromValue(std.json.Value,...)" { | 231 | test "parseFromValue(std.json.Value,...)" { |
| 247 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 248 | |||
| 249 | const str = | 232 | const str = |
| 250 | \\{ | 233 | \\{ |
| 251 | \\ "int": 32, | 234 | \\ "int": 32, |
| ... | @@ -263,8 +246,6 @@ test "parseFromValue(std.json.Value,...)" { | ... | @@ -263,8 +246,6 @@ test "parseFromValue(std.json.Value,...)" { |
| 263 | } | 246 | } |
| 264 | 247 | ||
| 265 | test "polymorphic parsing" { | 248 | test "polymorphic parsing" { |
| 266 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 267 | |||
| 268 | if (true) return error.SkipZigTest; // See https://github.com/ziglang/zig/issues/16108 | 249 | if (true) return error.SkipZigTest; // See https://github.com/ziglang/zig/issues/16108 |
| 269 | const doc = | 250 | const doc = |
| 270 | \\{ "type": "div", | 251 | \\{ "type": "div", |
| ... | @@ -310,8 +291,6 @@ test "polymorphic parsing" { | ... | @@ -310,8 +291,6 @@ test "polymorphic parsing" { |
| 310 | } | 291 | } |
| 311 | 292 | ||
| 312 | test "long object value" { | 293 | test "long object value" { |
| 313 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 314 | |||
| 315 | const value = "01234567890123456789"; | 294 | const value = "01234567890123456789"; |
| 316 | const doc = "{\"key\":\"" ++ value ++ "\"}"; | 295 | const doc = "{\"key\":\"" ++ value ++ "\"}"; |
| 317 | var fbs = std.io.fixedBufferStream(doc); | 296 | var fbs = std.io.fixedBufferStream(doc); |
| ... | @@ -324,8 +303,6 @@ test "long object value" { | ... | @@ -324,8 +303,6 @@ test "long object value" { |
| 324 | } | 303 | } |
| 325 | 304 | ||
| 326 | test "ParseOptions.max_value_len" { | 305 | test "ParseOptions.max_value_len" { |
| 327 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 328 | |||
| 329 | var arena = ArenaAllocator.init(testing.allocator); | 306 | var arena = ArenaAllocator.init(testing.allocator); |
| 330 | defer arena.deinit(); | 307 | defer arena.deinit(); |
| 331 | 308 | ||
| ... | @@ -340,8 +317,6 @@ test "ParseOptions.max_value_len" { | ... | @@ -340,8 +317,6 @@ test "ParseOptions.max_value_len" { |
| 340 | } | 317 | } |
| 341 | 318 | ||
| 342 | test "many object keys" { | 319 | test "many object keys" { |
| 343 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 344 | |||
| 345 | const doc = | 320 | const doc = |
| 346 | \\{ | 321 | \\{ |
| 347 | \\ "k1": "v1", | 322 | \\ "k1": "v1", |
lib/std/json/hashmap_test.zig-13| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const testing = std.testing; | 2 | const testing = std.testing; |
| 4 | 3 | ||
| 5 | const ArrayHashMap = @import("hashmap.zig").ArrayHashMap; | 4 | const ArrayHashMap = @import("hashmap.zig").ArrayHashMap; |
| ... | @@ -19,8 +18,6 @@ const T = struct { | ... | @@ -19,8 +18,6 @@ const T = struct { |
| 19 | }; | 18 | }; |
| 20 | 19 | ||
| 21 | test "parse json hashmap" { | 20 | test "parse json hashmap" { |
| 22 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 23 | |||
| 24 | const doc = | 21 | const doc = |
| 25 | \\{ | 22 | \\{ |
| 26 | \\ "abc": {"i": 0, "s": "d"}, | 23 | \\ "abc": {"i": 0, "s": "d"}, |
| ... | @@ -36,8 +33,6 @@ test "parse json hashmap" { | ... | @@ -36,8 +33,6 @@ test "parse json hashmap" { |
| 36 | } | 33 | } |
| 37 | 34 | ||
| 38 | test "parse json hashmap while streaming" { | 35 | test "parse json hashmap while streaming" { |
| 39 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 40 | |||
| 41 | const doc = | 36 | const doc = |
| 42 | \\{ | 37 | \\{ |
| 43 | \\ "abc": {"i": 0, "s": "d"}, | 38 | \\ "abc": {"i": 0, "s": "d"}, |
| ... | @@ -63,8 +58,6 @@ test "parse json hashmap while streaming" { | ... | @@ -63,8 +58,6 @@ test "parse json hashmap while streaming" { |
| 63 | } | 58 | } |
| 64 | 59 | ||
| 65 | test "parse json hashmap duplicate fields" { | 60 | test "parse json hashmap duplicate fields" { |
| 66 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 67 | |||
| 68 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); | 61 | var arena = std.heap.ArenaAllocator.init(std.testing.allocator); |
| 69 | defer arena.deinit(); | 62 | defer arena.deinit(); |
| 70 | 63 | ||
| ... | @@ -93,8 +86,6 @@ test "parse json hashmap duplicate fields" { | ... | @@ -93,8 +86,6 @@ test "parse json hashmap duplicate fields" { |
| 93 | } | 86 | } |
| 94 | 87 | ||
| 95 | test "stringify json hashmap" { | 88 | test "stringify json hashmap" { |
| 96 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 97 | |||
| 98 | var value = ArrayHashMap(T){}; | 89 | var value = ArrayHashMap(T){}; |
| 99 | defer value.deinit(testing.allocator); | 90 | defer value.deinit(testing.allocator); |
| 100 | { | 91 | { |
| ... | @@ -132,8 +123,6 @@ test "stringify json hashmap" { | ... | @@ -132,8 +123,6 @@ test "stringify json hashmap" { |
| 132 | } | 123 | } |
| 133 | 124 | ||
| 134 | test "stringify json hashmap whitespace" { | 125 | test "stringify json hashmap whitespace" { |
| 135 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 136 | |||
| 137 | var value = ArrayHashMap(T){}; | 126 | var value = ArrayHashMap(T){}; |
| 138 | defer value.deinit(testing.allocator); | 127 | defer value.deinit(testing.allocator); |
| 139 | try value.map.put(testing.allocator, "abc", .{ .i = 0, .s = "d" }); | 128 | try value.map.put(testing.allocator, "abc", .{ .i = 0, .s = "d" }); |
| ... | @@ -158,8 +147,6 @@ test "stringify json hashmap whitespace" { | ... | @@ -158,8 +147,6 @@ test "stringify json hashmap whitespace" { |
| 158 | } | 147 | } |
| 159 | 148 | ||
| 160 | test "json parse from value hashmap" { | 149 | test "json parse from value hashmap" { |
| 161 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 162 | |||
| 163 | const doc = | 150 | const doc = |
| 164 | \\{ | 151 | \\{ |
| 165 | \\ "abc": {"i": 0, "s": "d"}, | 152 | \\ "abc": {"i": 0, "s": "d"}, |
lib/std/json/static_test.zig-49| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const testing = std.testing; | 2 | const testing = std.testing; |
| 4 | const ArenaAllocator = std.heap.ArenaAllocator; | 3 | const ArenaAllocator = std.heap.ArenaAllocator; |
| 5 | const Allocator = std.mem.Allocator; | 4 | const Allocator = std.mem.Allocator; |
| ... | @@ -372,8 +371,6 @@ test "test all types" { | ... | @@ -372,8 +371,6 @@ test "test all types" { |
| 372 | } | 371 | } |
| 373 | 372 | ||
| 374 | test "parse" { | 373 | test "parse" { |
| 375 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 376 | |||
| 377 | try testing.expectEqual(false, try parseFromSliceLeaky(bool, testing.allocator, "false", .{})); | 374 | try testing.expectEqual(false, try parseFromSliceLeaky(bool, testing.allocator, "false", .{})); |
| 378 | try testing.expectEqual(true, try parseFromSliceLeaky(bool, testing.allocator, "true", .{})); | 375 | try testing.expectEqual(true, try parseFromSliceLeaky(bool, testing.allocator, "true", .{})); |
| 379 | try testing.expectEqual(@as(u1, 1), try parseFromSliceLeaky(u1, testing.allocator, "1", .{})); | 376 | try testing.expectEqual(@as(u1, 1), try parseFromSliceLeaky(u1, testing.allocator, "1", .{})); |
| ... | @@ -392,8 +389,6 @@ test "parse" { | ... | @@ -392,8 +389,6 @@ test "parse" { |
| 392 | } | 389 | } |
| 393 | 390 | ||
| 394 | test "parse into enum" { | 391 | test "parse into enum" { |
| 395 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 396 | |||
| 397 | const T = enum(u32) { | 392 | const T = enum(u32) { |
| 398 | Foo = 42, | 393 | Foo = 42, |
| 399 | Bar, | 394 | Bar, |
| ... | @@ -407,8 +402,6 @@ test "parse into enum" { | ... | @@ -407,8 +402,6 @@ test "parse into enum" { |
| 407 | } | 402 | } |
| 408 | 403 | ||
| 409 | test "parse into that allocates a slice" { | 404 | test "parse into that allocates a slice" { |
| 410 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 411 | |||
| 412 | { | 405 | { |
| 413 | // string as string | 406 | // string as string |
| 414 | const parsed = try parseFromSlice([]u8, testing.allocator, "\"foo\"", .{}); | 407 | const parsed = try parseFromSlice([]u8, testing.allocator, "\"foo\"", .{}); |
| ... | @@ -429,16 +422,12 @@ test "parse into that allocates a slice" { | ... | @@ -429,16 +422,12 @@ test "parse into that allocates a slice" { |
| 429 | } | 422 | } |
| 430 | 423 | ||
| 431 | test "parse into sentinel slice" { | 424 | test "parse into sentinel slice" { |
| 432 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 433 | |||
| 434 | const parsed = try parseFromSlice([:0]const u8, testing.allocator, "\"\\n\"", .{}); | 425 | const parsed = try parseFromSlice([:0]const u8, testing.allocator, "\"\\n\"", .{}); |
| 435 | defer parsed.deinit(); | 426 | defer parsed.deinit(); |
| 436 | try testing.expect(std.mem.eql(u8, parsed.value, "\n")); | 427 | try testing.expect(std.mem.eql(u8, parsed.value, "\n")); |
| 437 | } | 428 | } |
| 438 | 429 | ||
| 439 | test "parse into tagged union" { | 430 | test "parse into tagged union" { |
| 440 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 441 | |||
| 442 | const T = union(enum) { | 431 | const T = union(enum) { |
| 443 | nothing, | 432 | nothing, |
| 444 | int: i32, | 433 | int: i32, |
| ... | @@ -454,8 +443,6 @@ test "parse into tagged union" { | ... | @@ -454,8 +443,6 @@ test "parse into tagged union" { |
| 454 | } | 443 | } |
| 455 | 444 | ||
| 456 | test "parse into tagged union errors" { | 445 | test "parse into tagged union errors" { |
| 457 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 458 | |||
| 459 | const T = union(enum) { | 446 | const T = union(enum) { |
| 460 | nothing, | 447 | nothing, |
| 461 | int: i32, | 448 | int: i32, |
| ... | @@ -478,8 +465,6 @@ test "parse into tagged union errors" { | ... | @@ -478,8 +465,6 @@ test "parse into tagged union errors" { |
| 478 | } | 465 | } |
| 479 | 466 | ||
| 480 | test "parse into struct with no fields" { | 467 | test "parse into struct with no fields" { |
| 481 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 482 | |||
| 483 | const T = struct {}; | 468 | const T = struct {}; |
| 484 | const parsed = try parseFromSlice(T, testing.allocator, "{}", .{}); | 469 | const parsed = try parseFromSlice(T, testing.allocator, "{}", .{}); |
| 485 | defer parsed.deinit(); | 470 | defer parsed.deinit(); |
| ... | @@ -489,8 +474,6 @@ test "parse into struct with no fields" { | ... | @@ -489,8 +474,6 @@ test "parse into struct with no fields" { |
| 489 | const test_const_value: usize = 123; | 474 | const test_const_value: usize = 123; |
| 490 | 475 | ||
| 491 | test "parse into struct with default const pointer field" { | 476 | test "parse into struct with default const pointer field" { |
| 492 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 493 | |||
| 494 | const T = struct { a: *const usize = &test_const_value }; | 477 | const T = struct { a: *const usize = &test_const_value }; |
| 495 | const parsed = try parseFromSlice(T, testing.allocator, "{}", .{}); | 478 | const parsed = try parseFromSlice(T, testing.allocator, "{}", .{}); |
| 496 | defer parsed.deinit(); | 479 | defer parsed.deinit(); |
| ... | @@ -506,8 +489,6 @@ const test_default_str_slice: [2][]const u8 = [_][]const u8{ | ... | @@ -506,8 +489,6 @@ const test_default_str_slice: [2][]const u8 = [_][]const u8{ |
| 506 | }; | 489 | }; |
| 507 | 490 | ||
| 508 | test "freeing parsed structs with pointers to default values" { | 491 | test "freeing parsed structs with pointers to default values" { |
| 509 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 510 | |||
| 511 | const T = struct { | 492 | const T = struct { |
| 512 | int: *const usize = &test_default_usize, | 493 | int: *const usize = &test_default_usize, |
| 513 | int_ptr: *allowzero align(1) const usize = test_default_usize_ptr, | 494 | int_ptr: *allowzero align(1) const usize = test_default_usize_ptr, |
| ... | @@ -521,15 +502,11 @@ test "freeing parsed structs with pointers to default values" { | ... | @@ -521,15 +502,11 @@ test "freeing parsed structs with pointers to default values" { |
| 521 | } | 502 | } |
| 522 | 503 | ||
| 523 | test "parse into struct where destination and source lengths mismatch" { | 504 | test "parse into struct where destination and source lengths mismatch" { |
| 524 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 525 | |||
| 526 | const T = struct { a: [2]u8 }; | 505 | const T = struct { a: [2]u8 }; |
| 527 | try testing.expectError(error.LengthMismatch, parseFromSlice(T, testing.allocator, "{\"a\": \"bbb\"}", .{})); | 506 | try testing.expectError(error.LengthMismatch, parseFromSlice(T, testing.allocator, "{\"a\": \"bbb\"}", .{})); |
| 528 | } | 507 | } |
| 529 | 508 | ||
| 530 | test "parse into struct with misc fields" { | 509 | test "parse into struct with misc fields" { |
| 531 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 532 | |||
| 533 | const T = struct { | 510 | const T = struct { |
| 534 | int: i64, | 511 | int: i64, |
| 535 | float: f64, | 512 | float: f64, |
| ... | @@ -605,8 +582,6 @@ test "parse into struct with misc fields" { | ... | @@ -605,8 +582,6 @@ test "parse into struct with misc fields" { |
| 605 | } | 582 | } |
| 606 | 583 | ||
| 607 | test "parse into struct with strings and arrays with sentinels" { | 584 | test "parse into struct with strings and arrays with sentinels" { |
| 608 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 609 | |||
| 610 | const T = struct { | 585 | const T = struct { |
| 611 | language: [:0]const u8, | 586 | language: [:0]const u8, |
| 612 | language_without_sentinel: []const u8, | 587 | language_without_sentinel: []const u8, |
| ... | @@ -635,8 +610,6 @@ test "parse into struct with strings and arrays with sentinels" { | ... | @@ -635,8 +610,6 @@ test "parse into struct with strings and arrays with sentinels" { |
| 635 | } | 610 | } |
| 636 | 611 | ||
| 637 | test "parse into struct with duplicate field" { | 612 | test "parse into struct with duplicate field" { |
| 638 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 639 | |||
| 640 | const options_first = ParseOptions{ .duplicate_field_behavior = .use_first }; | 613 | const options_first = ParseOptions{ .duplicate_field_behavior = .use_first }; |
| 641 | const options_last = ParseOptions{ .duplicate_field_behavior = .use_last }; | 614 | const options_last = ParseOptions{ .duplicate_field_behavior = .use_last }; |
| 642 | 615 | ||
| ... | @@ -656,8 +629,6 @@ test "parse into struct with duplicate field" { | ... | @@ -656,8 +629,6 @@ test "parse into struct with duplicate field" { |
| 656 | } | 629 | } |
| 657 | 630 | ||
| 658 | test "parse into struct ignoring unknown fields" { | 631 | test "parse into struct ignoring unknown fields" { |
| 659 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 660 | |||
| 661 | const T = struct { | 632 | const T = struct { |
| 662 | int: i64, | 633 | int: i64, |
| 663 | language: []const u8, | 634 | language: []const u8, |
| ... | @@ -696,8 +667,6 @@ test "parse into struct ignoring unknown fields" { | ... | @@ -696,8 +667,6 @@ test "parse into struct ignoring unknown fields" { |
| 696 | } | 667 | } |
| 697 | 668 | ||
| 698 | test "parse into tuple" { | 669 | test "parse into tuple" { |
| 699 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 700 | |||
| 701 | const Union = union(enum) { | 670 | const Union = union(enum) { |
| 702 | char: u8, | 671 | char: u8, |
| 703 | float: f64, | 672 | float: f64, |
| ... | @@ -753,8 +722,6 @@ const ParseIntoRecursiveUnionDefinitionValue = union(enum) { | ... | @@ -753,8 +722,6 @@ const ParseIntoRecursiveUnionDefinitionValue = union(enum) { |
| 753 | }; | 722 | }; |
| 754 | 723 | ||
| 755 | test "parse into recursive union definition" { | 724 | test "parse into recursive union definition" { |
| 756 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 757 | |||
| 758 | const T = struct { | 725 | const T = struct { |
| 759 | values: ParseIntoRecursiveUnionDefinitionValue, | 726 | values: ParseIntoRecursiveUnionDefinitionValue, |
| 760 | }; | 727 | }; |
| ... | @@ -776,8 +743,6 @@ const ParseIntoDoubleRecursiveUnionValueSecond = union(enum) { | ... | @@ -776,8 +743,6 @@ const ParseIntoDoubleRecursiveUnionValueSecond = union(enum) { |
| 776 | }; | 743 | }; |
| 777 | 744 | ||
| 778 | test "parse into double recursive union definition" { | 745 | test "parse into double recursive union definition" { |
| 779 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 780 | |||
| 781 | const T = struct { | 746 | const T = struct { |
| 782 | values: ParseIntoDoubleRecursiveUnionValueFirst, | 747 | values: ParseIntoDoubleRecursiveUnionValueFirst, |
| 783 | }; | 748 | }; |
| ... | @@ -789,8 +754,6 @@ test "parse into double recursive union definition" { | ... | @@ -789,8 +754,6 @@ test "parse into double recursive union definition" { |
| 789 | } | 754 | } |
| 790 | 755 | ||
| 791 | test "parse exponential into int" { | 756 | test "parse exponential into int" { |
| 792 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 793 | |||
| 794 | const T = struct { int: i64 }; | 757 | const T = struct { int: i64 }; |
| 795 | const r = try parseFromSliceLeaky(T, testing.allocator, "{ \"int\": 4.2e2 }", .{}); | 758 | const r = try parseFromSliceLeaky(T, testing.allocator, "{ \"int\": 4.2e2 }", .{}); |
| 796 | try testing.expectEqual(@as(i64, 420), r.int); | 759 | try testing.expectEqual(@as(i64, 420), r.int); |
| ... | @@ -799,8 +762,6 @@ test "parse exponential into int" { | ... | @@ -799,8 +762,6 @@ test "parse exponential into int" { |
| 799 | } | 762 | } |
| 800 | 763 | ||
| 801 | test "parseFromTokenSource" { | 764 | test "parseFromTokenSource" { |
| 802 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 803 | |||
| 804 | { | 765 | { |
| 805 | var scanner = JsonScanner.initCompleteInput(testing.allocator, "123"); | 766 | var scanner = JsonScanner.initCompleteInput(testing.allocator, "123"); |
| 806 | defer scanner.deinit(); | 767 | defer scanner.deinit(); |
| ... | @@ -820,14 +781,10 @@ test "parseFromTokenSource" { | ... | @@ -820,14 +781,10 @@ test "parseFromTokenSource" { |
| 820 | } | 781 | } |
| 821 | 782 | ||
| 822 | test "max_value_len" { | 783 | test "max_value_len" { |
| 823 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 824 | |||
| 825 | try testing.expectError(error.ValueTooLong, parseFromSlice([]u8, testing.allocator, "\"0123456789\"", .{ .max_value_len = 5 })); | 784 | try testing.expectError(error.ValueTooLong, parseFromSlice([]u8, testing.allocator, "\"0123456789\"", .{ .max_value_len = 5 })); |
| 826 | } | 785 | } |
| 827 | 786 | ||
| 828 | test "parse into vector" { | 787 | test "parse into vector" { |
| 829 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 830 | |||
| 831 | const T = struct { | 788 | const T = struct { |
| 832 | vec_i32: @Vector(4, i32), | 789 | vec_i32: @Vector(4, i32), |
| 833 | vec_f32: @Vector(2, f32), | 790 | vec_f32: @Vector(2, f32), |
| ... | @@ -860,8 +817,6 @@ fn assertKey( | ... | @@ -860,8 +817,6 @@ fn assertKey( |
| 860 | } | 817 | } |
| 861 | } | 818 | } |
| 862 | test "json parse partial" { | 819 | test "json parse partial" { |
| 863 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 864 | |||
| 865 | const Inner = struct { | 820 | const Inner = struct { |
| 866 | num: u32, | 821 | num: u32, |
| 867 | yes: bool, | 822 | yes: bool, |
| ... | @@ -917,8 +872,6 @@ test "json parse partial" { | ... | @@ -917,8 +872,6 @@ test "json parse partial" { |
| 917 | } | 872 | } |
| 918 | 873 | ||
| 919 | test "json parse allocate when streaming" { | 874 | test "json parse allocate when streaming" { |
| 920 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 921 | |||
| 922 | const T = struct { | 875 | const T = struct { |
| 923 | not_const: []u8, | 876 | not_const: []u8, |
| 924 | is_const: []const u8, | 877 | is_const: []const u8, |
| ... | @@ -949,8 +902,6 @@ test "json parse allocate when streaming" { | ... | @@ -949,8 +902,6 @@ test "json parse allocate when streaming" { |
| 949 | } | 902 | } |
| 950 | 903 | ||
| 951 | test "parse at comptime" { | 904 | test "parse at comptime" { |
| 952 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 953 | |||
| 954 | const doc = | 905 | const doc = |
| 955 | \\{ | 906 | \\{ |
| 956 | \\ "vals": { | 907 | \\ "vals": { |
lib/std/json/stringify_test.zig-41| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const mem = std.mem; | 2 | const mem = std.mem; |
| 4 | const testing = std.testing; | 3 | const testing = std.testing; |
| 5 | 4 | ||
| ... | @@ -16,8 +15,6 @@ const writeStreamMaxDepth = @import("stringify.zig").writeStreamMaxDepth; | ... | @@ -16,8 +15,6 @@ const writeStreamMaxDepth = @import("stringify.zig").writeStreamMaxDepth; |
| 16 | const writeStreamArbitraryDepth = @import("stringify.zig").writeStreamArbitraryDepth; | 15 | const writeStreamArbitraryDepth = @import("stringify.zig").writeStreamArbitraryDepth; |
| 17 | 16 | ||
| 18 | test "json write stream" { | 17 | test "json write stream" { |
| 19 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 20 | |||
| 21 | var out_buf: [1024]u8 = undefined; | 18 | var out_buf: [1024]u8 = undefined; |
| 22 | var slice_stream = std.io.fixedBufferStream(&out_buf); | 19 | var slice_stream = std.io.fixedBufferStream(&out_buf); |
| 23 | const out = slice_stream.writer(); | 20 | const out = slice_stream.writer(); |
| ... | @@ -100,8 +97,6 @@ fn getJsonObject(allocator: std.mem.Allocator) !Value { | ... | @@ -100,8 +97,6 @@ fn getJsonObject(allocator: std.mem.Allocator) !Value { |
| 100 | } | 97 | } |
| 101 | 98 | ||
| 102 | test "stringify null optional fields" { | 99 | test "stringify null optional fields" { |
| 103 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 104 | |||
| 105 | const MyStruct = struct { | 100 | const MyStruct = struct { |
| 106 | optional: ?[]const u8 = null, | 101 | optional: ?[]const u8 = null, |
| 107 | required: []const u8 = "something", | 102 | required: []const u8 = "something", |
| ... | @@ -123,8 +118,6 @@ test "stringify null optional fields" { | ... | @@ -123,8 +118,6 @@ test "stringify null optional fields" { |
| 123 | } | 118 | } |
| 124 | 119 | ||
| 125 | test "stringify basic types" { | 120 | test "stringify basic types" { |
| 126 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 127 | |||
| 128 | try testStringify("false", false, .{}); | 121 | try testStringify("false", false, .{}); |
| 129 | try testStringify("true", true, .{}); | 122 | try testStringify("true", true, .{}); |
| 130 | try testStringify("null", @as(?u8, null), .{}); | 123 | try testStringify("null", @as(?u8, null), .{}); |
| ... | @@ -141,8 +134,6 @@ test "stringify basic types" { | ... | @@ -141,8 +134,6 @@ test "stringify basic types" { |
| 141 | } | 134 | } |
| 142 | 135 | ||
| 143 | test "stringify string" { | 136 | test "stringify string" { |
| 144 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 145 | |||
| 146 | try testStringify("\"hello\"", "hello", .{}); | 137 | try testStringify("\"hello\"", "hello", .{}); |
| 147 | try testStringify("\"with\\nescapes\\r\"", "with\nescapes\r", .{}); | 138 | try testStringify("\"with\\nescapes\\r\"", "with\nescapes\r", .{}); |
| 148 | try testStringify("\"with\\nescapes\\r\"", "with\nescapes\r", .{ .escape_unicode = true }); | 139 | try testStringify("\"with\\nescapes\\r\"", "with\nescapes\r", .{ .escape_unicode = true }); |
| ... | @@ -167,16 +158,12 @@ test "stringify string" { | ... | @@ -167,16 +158,12 @@ test "stringify string" { |
| 167 | } | 158 | } |
| 168 | 159 | ||
| 169 | test "stringify many-item sentinel-terminated string" { | 160 | test "stringify many-item sentinel-terminated string" { |
| 170 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 171 | |||
| 172 | try testStringify("\"hello\"", @as([*:0]const u8, "hello"), .{}); | 161 | try testStringify("\"hello\"", @as([*:0]const u8, "hello"), .{}); |
| 173 | try testStringify("\"with\\nescapes\\r\"", @as([*:0]const u8, "with\nescapes\r"), .{ .escape_unicode = true }); | 162 | try testStringify("\"with\\nescapes\\r\"", @as([*:0]const u8, "with\nescapes\r"), .{ .escape_unicode = true }); |
| 174 | try testStringify("\"with unicode\\u0001\"", @as([*:0]const u8, "with unicode\u{1}"), .{ .escape_unicode = true }); | 163 | try testStringify("\"with unicode\\u0001\"", @as([*:0]const u8, "with unicode\u{1}"), .{ .escape_unicode = true }); |
| 175 | } | 164 | } |
| 176 | 165 | ||
| 177 | test "stringify enums" { | 166 | test "stringify enums" { |
| 178 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 179 | |||
| 180 | const E = enum { | 167 | const E = enum { |
| 181 | foo, | 168 | foo, |
| 182 | bar, | 169 | bar, |
| ... | @@ -186,15 +173,11 @@ test "stringify enums" { | ... | @@ -186,15 +173,11 @@ test "stringify enums" { |
| 186 | } | 173 | } |
| 187 | 174 | ||
| 188 | test "stringify enum literals" { | 175 | test "stringify enum literals" { |
| 189 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 190 | |||
| 191 | try testStringify("\"foo\"", .foo, .{}); | 176 | try testStringify("\"foo\"", .foo, .{}); |
| 192 | try testStringify("\"bar\"", .bar, .{}); | 177 | try testStringify("\"bar\"", .bar, .{}); |
| 193 | } | 178 | } |
| 194 | 179 | ||
| 195 | test "stringify tagged unions" { | 180 | test "stringify tagged unions" { |
| 196 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 197 | |||
| 198 | const T = union(enum) { | 181 | const T = union(enum) { |
| 199 | nothing, | 182 | nothing, |
| 200 | foo: u32, | 183 | foo: u32, |
| ... | @@ -206,16 +189,12 @@ test "stringify tagged unions" { | ... | @@ -206,16 +189,12 @@ test "stringify tagged unions" { |
| 206 | } | 189 | } |
| 207 | 190 | ||
| 208 | test "stringify struct" { | 191 | test "stringify struct" { |
| 209 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 210 | |||
| 211 | try testStringify("{\"foo\":42}", struct { | 192 | try testStringify("{\"foo\":42}", struct { |
| 212 | foo: u32, | 193 | foo: u32, |
| 213 | }{ .foo = 42 }, .{}); | 194 | }{ .foo = 42 }, .{}); |
| 214 | } | 195 | } |
| 215 | 196 | ||
| 216 | test "emit_strings_as_arrays" { | 197 | test "emit_strings_as_arrays" { |
| 217 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 218 | |||
| 219 | // Should only affect string values, not object keys. | 198 | // Should only affect string values, not object keys. |
| 220 | try testStringify("{\"foo\":\"bar\"}", .{ .foo = "bar" }, .{}); | 199 | try testStringify("{\"foo\":\"bar\"}", .{ .foo = "bar" }, .{}); |
| 221 | try testStringify("{\"foo\":[98,97,114]}", .{ .foo = "bar" }, .{ .emit_strings_as_arrays = true }); | 200 | try testStringify("{\"foo\":[98,97,114]}", .{ .foo = "bar" }, .{ .emit_strings_as_arrays = true }); |
| ... | @@ -230,8 +209,6 @@ test "emit_strings_as_arrays" { | ... | @@ -230,8 +209,6 @@ test "emit_strings_as_arrays" { |
| 230 | } | 209 | } |
| 231 | 210 | ||
| 232 | test "stringify struct with indentation" { | 211 | test "stringify struct with indentation" { |
| 233 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 234 | |||
| 235 | try testStringify( | 212 | try testStringify( |
| 236 | \\{ | 213 | \\{ |
| 237 | \\ "foo": 42, | 214 | \\ "foo": 42, |
| ... | @@ -277,8 +254,6 @@ test "stringify struct with indentation" { | ... | @@ -277,8 +254,6 @@ test "stringify struct with indentation" { |
| 277 | } | 254 | } |
| 278 | 255 | ||
| 279 | test "stringify struct with void field" { | 256 | test "stringify struct with void field" { |
| 280 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 281 | |||
| 282 | try testStringify("{\"foo\":42}", struct { | 257 | try testStringify("{\"foo\":42}", struct { |
| 283 | foo: u32, | 258 | foo: u32, |
| 284 | bar: void = {}, | 259 | bar: void = {}, |
| ... | @@ -286,8 +261,6 @@ test "stringify struct with void field" { | ... | @@ -286,8 +261,6 @@ test "stringify struct with void field" { |
| 286 | } | 261 | } |
| 287 | 262 | ||
| 288 | test "stringify array of structs" { | 263 | test "stringify array of structs" { |
| 289 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 290 | |||
| 291 | const MyStruct = struct { | 264 | const MyStruct = struct { |
| 292 | foo: u32, | 265 | foo: u32, |
| 293 | }; | 266 | }; |
| ... | @@ -299,8 +272,6 @@ test "stringify array of structs" { | ... | @@ -299,8 +272,6 @@ test "stringify array of structs" { |
| 299 | } | 272 | } |
| 300 | 273 | ||
| 301 | test "stringify struct with custom stringifier" { | 274 | test "stringify struct with custom stringifier" { |
| 302 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 303 | |||
| 304 | try testStringify("[\"something special\",42]", struct { | 275 | try testStringify("[\"something special\",42]", struct { |
| 305 | foo: u32, | 276 | foo: u32, |
| 306 | const Self = @This(); | 277 | const Self = @This(); |
| ... | @@ -315,16 +286,12 @@ test "stringify struct with custom stringifier" { | ... | @@ -315,16 +286,12 @@ test "stringify struct with custom stringifier" { |
| 315 | } | 286 | } |
| 316 | 287 | ||
| 317 | test "stringify vector" { | 288 | test "stringify vector" { |
| 318 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 319 | |||
| 320 | try testStringify("[1,1]", @as(@Vector(2, u32), @splat(1)), .{}); | 289 | try testStringify("[1,1]", @as(@Vector(2, u32), @splat(1)), .{}); |
| 321 | try testStringify("\"AA\"", @as(@Vector(2, u8), @splat('A')), .{}); | 290 | try testStringify("\"AA\"", @as(@Vector(2, u8), @splat('A')), .{}); |
| 322 | try testStringify("[65,65]", @as(@Vector(2, u8), @splat('A')), .{ .emit_strings_as_arrays = true }); | 291 | try testStringify("[65,65]", @as(@Vector(2, u8), @splat('A')), .{ .emit_strings_as_arrays = true }); |
| 323 | } | 292 | } |
| 324 | 293 | ||
| 325 | test "stringify tuple" { | 294 | test "stringify tuple" { |
| 326 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 327 | |||
| 328 | try testStringify("[\"foo\",42]", std.meta.Tuple(&.{ []const u8, usize }){ "foo", 42 }, .{}); | 295 | try testStringify("[\"foo\",42]", std.meta.Tuple(&.{ []const u8, usize }){ "foo", 42 }, .{}); |
| 329 | } | 296 | } |
| 330 | 297 | ||
| ... | @@ -411,8 +378,6 @@ fn testStringifyArbitraryDepth(expected: []const u8, value: anytype, options: St | ... | @@ -411,8 +378,6 @@ fn testStringifyArbitraryDepth(expected: []const u8, value: anytype, options: St |
| 411 | } | 378 | } |
| 412 | 379 | ||
| 413 | test "stringify alloc" { | 380 | test "stringify alloc" { |
| 414 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 415 | |||
| 416 | const allocator = std.testing.allocator; | 381 | const allocator = std.testing.allocator; |
| 417 | const expected = | 382 | const expected = |
| 418 | \\{"foo":"bar","answer":42,"my_friend":"sammy"} | 383 | \\{"foo":"bar","answer":42,"my_friend":"sammy"} |
| ... | @@ -424,8 +389,6 @@ test "stringify alloc" { | ... | @@ -424,8 +389,6 @@ test "stringify alloc" { |
| 424 | } | 389 | } |
| 425 | 390 | ||
| 426 | test "comptime stringify" { | 391 | test "comptime stringify" { |
| 427 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 428 | |||
| 429 | comptime testStringifyMaxDepth("false", false, .{}, null) catch unreachable; | 392 | comptime testStringifyMaxDepth("false", false, .{}, null) catch unreachable; |
| 430 | comptime testStringifyMaxDepth("false", false, .{}, 0) catch unreachable; | 393 | comptime testStringifyMaxDepth("false", false, .{}, 0) catch unreachable; |
| 431 | comptime testStringifyArbitraryDepth("false", false, .{}) catch unreachable; | 394 | comptime testStringifyArbitraryDepth("false", false, .{}) catch unreachable; |
| ... | @@ -446,8 +409,6 @@ test "comptime stringify" { | ... | @@ -446,8 +409,6 @@ test "comptime stringify" { |
| 446 | } | 409 | } |
| 447 | 410 | ||
| 448 | test "print" { | 411 | test "print" { |
| 449 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 450 | |||
| 451 | var out_buf: [1024]u8 = undefined; | 412 | var out_buf: [1024]u8 = undefined; |
| 452 | var slice_stream = std.io.fixedBufferStream(&out_buf); | 413 | var slice_stream = std.io.fixedBufferStream(&out_buf); |
| 453 | const out = slice_stream.writer(); | 414 | const out = slice_stream.writer(); |
| ... | @@ -479,8 +440,6 @@ test "print" { | ... | @@ -479,8 +440,6 @@ test "print" { |
| 479 | } | 440 | } |
| 480 | 441 | ||
| 481 | test "nonportable numbers" { | 442 | test "nonportable numbers" { |
| 482 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 483 | |||
| 484 | try testStringify("9999999999999999", 9999999999999999, .{}); | 443 | try testStringify("9999999999999999", 9999999999999999, .{}); |
| 485 | try testStringify("\"9999999999999999\"", 9999999999999999, .{ .emit_nonportable_numbers_as_strings = true }); | 444 | try testStringify("\"9999999999999999\"", 9999999999999999, .{ .emit_nonportable_numbers_as_strings = true }); |
| 486 | } | 445 | } |
lib/std/json/test.zig-5| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const testing = std.testing; | 2 | const testing = std.testing; |
| 4 | const parseFromSlice = @import("./static.zig").parseFromSlice; | 3 | const parseFromSlice = @import("./static.zig").parseFromSlice; |
| 5 | const validate = @import("./scanner.zig").validate; | 4 | const validate = @import("./scanner.zig").validate; |
| ... | @@ -35,15 +34,11 @@ fn testHighLevelDynamicParser(s: []const u8) !void { | ... | @@ -35,15 +34,11 @@ fn testHighLevelDynamicParser(s: []const u8) !void { |
| 35 | 34 | ||
| 36 | // Additional tests not part of test JSONTestSuite. | 35 | // Additional tests not part of test JSONTestSuite. |
| 37 | test "y_trailing_comma_after_empty" { | 36 | test "y_trailing_comma_after_empty" { |
| 38 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 39 | |||
| 40 | try roundTrip( | 37 | try roundTrip( |
| 41 | \\{"1":[],"2":{},"3":"4"} | 38 | \\{"1":[],"2":{},"3":"4"} |
| 42 | ); | 39 | ); |
| 43 | } | 40 | } |
| 44 | test "n_object_closed_missing_value" { | 41 | test "n_object_closed_missing_value" { |
| 45 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 46 | |||
| 47 | try err( | 42 | try err( |
| 48 | \\{"a":} | 43 | \\{"a":} |
| 49 | ); | 44 | ); |
lib/std/leb128.zig-4| ... | @@ -215,8 +215,6 @@ fn test_read_uleb128_seq(comptime T: type, comptime N: usize, encoded: []const u | ... | @@ -215,8 +215,6 @@ fn test_read_uleb128_seq(comptime T: type, comptime N: usize, encoded: []const u |
| 215 | } | 215 | } |
| 216 | 216 | ||
| 217 | test "deserialize signed LEB128" { | 217 | test "deserialize signed LEB128" { |
| 218 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 219 | |||
| 220 | // Truncated | 218 | // Truncated |
| 221 | try testing.expectError(error.EndOfStream, test_read_stream_ileb128(i64, "\x80")); | 219 | try testing.expectError(error.EndOfStream, test_read_stream_ileb128(i64, "\x80")); |
| 222 | 220 | ||
| ... | @@ -363,8 +361,6 @@ test "serialize unsigned LEB128" { | ... | @@ -363,8 +361,6 @@ test "serialize unsigned LEB128" { |
| 363 | } | 361 | } |
| 364 | 362 | ||
| 365 | test "serialize signed LEB128" { | 363 | test "serialize signed LEB128" { |
| 366 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 367 | |||
| 368 | // explicitly test i0 because starting `t` at 0 | 364 | // explicitly test i0 because starting `t` at 0 |
| 369 | // will break the while loop | 365 | // will break the while loop |
| 370 | try test_write_leb128(@as(i0, 0)); | 366 | try test_write_leb128(@as(i0, 0)); |
lib/std/math.zig-26| ... | @@ -492,13 +492,10 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T { | ... | @@ -492,13 +492,10 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T { |
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | test "shl" { | 494 | test "shl" { |
| 495 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 496 | |||
| 497 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { | 495 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 498 | // https://github.com/ziglang/zig/issues/12012 | 496 | // https://github.com/ziglang/zig/issues/12012 |
| 499 | return error.SkipZigTest; | 497 | return error.SkipZigTest; |
| 500 | } | 498 | } |
| 501 | |||
| 502 | try testing.expect(shl(u8, 0b11111111, @as(usize, 3)) == 0b11111000); | 499 | try testing.expect(shl(u8, 0b11111111, @as(usize, 3)) == 0b11111000); |
| 503 | try testing.expect(shl(u8, 0b11111111, @as(usize, 8)) == 0); | 500 | try testing.expect(shl(u8, 0b11111111, @as(usize, 8)) == 0); |
| 504 | try testing.expect(shl(u8, 0b11111111, @as(usize, 9)) == 0); | 501 | try testing.expect(shl(u8, 0b11111111, @as(usize, 9)) == 0); |
| ... | @@ -539,13 +536,10 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T { | ... | @@ -539,13 +536,10 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T { |
| 539 | } | 536 | } |
| 540 | 537 | ||
| 541 | test "shr" { | 538 | test "shr" { |
| 542 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 543 | |||
| 544 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { | 539 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 545 | // https://github.com/ziglang/zig/issues/12012 | 540 | // https://github.com/ziglang/zig/issues/12012 |
| 546 | return error.SkipZigTest; | 541 | return error.SkipZigTest; |
| 547 | } | 542 | } |
| 548 | |||
| 549 | try testing.expect(shr(u8, 0b11111111, @as(usize, 3)) == 0b00011111); | 543 | try testing.expect(shr(u8, 0b11111111, @as(usize, 3)) == 0b00011111); |
| 550 | try testing.expect(shr(u8, 0b11111111, @as(usize, 8)) == 0); | 544 | try testing.expect(shr(u8, 0b11111111, @as(usize, 8)) == 0); |
| 551 | try testing.expect(shr(u8, 0b11111111, @as(usize, 9)) == 0); | 545 | try testing.expect(shr(u8, 0b11111111, @as(usize, 9)) == 0); |
| ... | @@ -587,13 +581,10 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T { | ... | @@ -587,13 +581,10 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T { |
| 587 | } | 581 | } |
| 588 | 582 | ||
| 589 | test "rotr" { | 583 | test "rotr" { |
| 590 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 591 | |||
| 592 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { | 584 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 593 | // https://github.com/ziglang/zig/issues/12012 | 585 | // https://github.com/ziglang/zig/issues/12012 |
| 594 | return error.SkipZigTest; | 586 | return error.SkipZigTest; |
| 595 | } | 587 | } |
| 596 | |||
| 597 | try testing.expect(rotr(u0, 0b0, @as(usize, 3)) == 0b0); | 588 | try testing.expect(rotr(u0, 0b0, @as(usize, 3)) == 0b0); |
| 598 | try testing.expect(rotr(u5, 0b00001, @as(usize, 0)) == 0b00001); | 589 | try testing.expect(rotr(u5, 0b00001, @as(usize, 0)) == 0b00001); |
| 599 | try testing.expect(rotr(u6, 0b000001, @as(usize, 7)) == 0b100000); | 590 | try testing.expect(rotr(u6, 0b000001, @as(usize, 7)) == 0b100000); |
| ... | @@ -634,13 +625,10 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T { | ... | @@ -634,13 +625,10 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T { |
| 634 | } | 625 | } |
| 635 | 626 | ||
| 636 | test "rotl" { | 627 | test "rotl" { |
| 637 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 638 | |||
| 639 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { | 628 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 640 | // https://github.com/ziglang/zig/issues/12012 | 629 | // https://github.com/ziglang/zig/issues/12012 |
| 641 | return error.SkipZigTest; | 630 | return error.SkipZigTest; |
| 642 | } | 631 | } |
| 643 | |||
| 644 | try testing.expect(rotl(u0, 0b0, @as(usize, 3)) == 0b0); | 632 | try testing.expect(rotl(u0, 0b0, @as(usize, 3)) == 0b0); |
| 645 | try testing.expect(rotl(u5, 0b00001, @as(usize, 0)) == 0b00001); | 633 | try testing.expect(rotl(u5, 0b00001, @as(usize, 0)) == 0b00001); |
| 646 | try testing.expect(rotl(u6, 0b000001, @as(usize, 7)) == 0b000010); | 634 | try testing.expect(rotl(u6, 0b000001, @as(usize, 7)) == 0b000010); |
| ... | @@ -764,8 +752,6 @@ pub fn divTrunc(comptime T: type, numerator: T, denominator: T) !T { | ... | @@ -764,8 +752,6 @@ pub fn divTrunc(comptime T: type, numerator: T, denominator: T) !T { |
| 764 | } | 752 | } |
| 765 | 753 | ||
| 766 | test "divTrunc" { | 754 | test "divTrunc" { |
| 767 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 768 | |||
| 769 | try testDivTrunc(); | 755 | try testDivTrunc(); |
| 770 | try comptime testDivTrunc(); | 756 | try comptime testDivTrunc(); |
| 771 | } | 757 | } |
| ... | @@ -790,8 +776,6 @@ pub fn divFloor(comptime T: type, numerator: T, denominator: T) !T { | ... | @@ -790,8 +776,6 @@ pub fn divFloor(comptime T: type, numerator: T, denominator: T) !T { |
| 790 | } | 776 | } |
| 791 | 777 | ||
| 792 | test "divFloor" { | 778 | test "divFloor" { |
| 793 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 794 | |||
| 795 | try testDivFloor(); | 779 | try testDivFloor(); |
| 796 | try comptime testDivFloor(); | 780 | try comptime testDivFloor(); |
| 797 | } | 781 | } |
| ... | @@ -829,8 +813,6 @@ pub fn divCeil(comptime T: type, numerator: T, denominator: T) !T { | ... | @@ -829,8 +813,6 @@ pub fn divCeil(comptime T: type, numerator: T, denominator: T) !T { |
| 829 | } | 813 | } |
| 830 | 814 | ||
| 831 | test "divCeil" { | 815 | test "divCeil" { |
| 832 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 833 | |||
| 834 | try testDivCeil(); | 816 | try testDivCeil(); |
| 835 | try comptime testDivCeil(); | 817 | try comptime testDivCeil(); |
| 836 | } | 818 | } |
| ... | @@ -875,8 +857,6 @@ pub fn divExact(comptime T: type, numerator: T, denominator: T) !T { | ... | @@ -875,8 +857,6 @@ pub fn divExact(comptime T: type, numerator: T, denominator: T) !T { |
| 875 | } | 857 | } |
| 876 | 858 | ||
| 877 | test "divExact" { | 859 | test "divExact" { |
| 878 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 879 | |||
| 880 | try testDivExact(); | 860 | try testDivExact(); |
| 881 | try comptime testDivExact(); | 861 | try comptime testDivExact(); |
| 882 | } | 862 | } |
| ... | @@ -907,8 +887,6 @@ test "mod" { | ... | @@ -907,8 +887,6 @@ test "mod" { |
| 907 | try comptime testMod(); | 887 | try comptime testMod(); |
| 908 | } | 888 | } |
| 909 | fn testMod() !void { | 889 | fn testMod() !void { |
| 910 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 911 | |||
| 912 | try testing.expect((mod(i32, -5, 3) catch unreachable) == 1); | 890 | try testing.expect((mod(i32, -5, 3) catch unreachable) == 1); |
| 913 | try testing.expect((mod(i32, 5, 3) catch unreachable) == 2); | 891 | try testing.expect((mod(i32, 5, 3) catch unreachable) == 2); |
| 914 | try testing.expectError(error.NegativeDenominator, mod(i32, 10, -1)); | 892 | try testing.expectError(error.NegativeDenominator, mod(i32, 10, -1)); |
| ... | @@ -931,8 +909,6 @@ pub fn rem(comptime T: type, numerator: T, denominator: T) !T { | ... | @@ -931,8 +909,6 @@ pub fn rem(comptime T: type, numerator: T, denominator: T) !T { |
| 931 | } | 909 | } |
| 932 | 910 | ||
| 933 | test "rem" { | 911 | test "rem" { |
| 934 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 935 | |||
| 936 | try testRem(); | 912 | try testRem(); |
| 937 | try comptime testRem(); | 913 | try comptime testRem(); |
| 938 | } | 914 | } |
| ... | @@ -1285,8 +1261,6 @@ pub fn lerp(a: anytype, b: anytype, t: anytype) @TypeOf(a, b, t) { | ... | @@ -1285,8 +1261,6 @@ pub fn lerp(a: anytype, b: anytype, t: anytype) @TypeOf(a, b, t) { |
| 1285 | } | 1261 | } |
| 1286 | 1262 | ||
| 1287 | test "lerp" { | 1263 | test "lerp" { |
| 1288 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1289 | |||
| 1290 | try testing.expectEqual(@as(f64, 75), lerp(50, 100, 0.5)); | 1264 | try testing.expectEqual(@as(f64, 75), lerp(50, 100, 0.5)); |
| 1291 | try testing.expectEqual(@as(f32, 43.75), lerp(50, 25, 0.25)); | 1265 | try testing.expectEqual(@as(f32, 43.75), lerp(50, 25, 0.25)); |
| 1292 | try testing.expectEqual(@as(f64, -31.25), lerp(-50, 25, 0.25)); | 1266 | try testing.expectEqual(@as(f64, -31.25), lerp(-50, 25, 0.25)); |
lib/std/math/big/int_test.zig+13-160| ... | @@ -71,8 +71,6 @@ test "big.int set negative minimum" { | ... | @@ -71,8 +71,6 @@ test "big.int set negative minimum" { |
| 71 | } | 71 | } |
| 72 | 72 | ||
| 73 | test "big.int set double-width maximum then zero" { | 73 | test "big.int set double-width maximum then zero" { |
| 74 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 75 | |||
| 76 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); | 74 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); |
| 77 | defer a.deinit(); | 75 | defer a.deinit(); |
| 78 | try a.set(@as(DoubleLimb, 0)); | 76 | try a.set(@as(DoubleLimb, 0)); |
| ... | @@ -246,8 +244,6 @@ test "big.int fits" { | ... | @@ -246,8 +244,6 @@ test "big.int fits" { |
| 246 | } | 244 | } |
| 247 | 245 | ||
| 248 | test "big.int string set" { | 246 | test "big.int string set" { |
| 249 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 250 | |||
| 251 | var a = try Managed.init(testing.allocator); | 247 | var a = try Managed.init(testing.allocator); |
| 252 | defer a.deinit(); | 248 | defer a.deinit(); |
| 253 | 249 | ||
| ... | @@ -264,8 +260,6 @@ test "big.int string negative" { | ... | @@ -264,8 +260,6 @@ test "big.int string negative" { |
| 264 | } | 260 | } |
| 265 | 261 | ||
| 266 | test "big.int string set number with underscores" { | 262 | test "big.int string set number with underscores" { |
| 267 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 268 | |||
| 269 | var a = try Managed.init(testing.allocator); | 263 | var a = try Managed.init(testing.allocator); |
| 270 | defer a.deinit(); | 264 | defer a.deinit(); |
| 271 | 265 | ||
| ... | @@ -274,8 +268,6 @@ test "big.int string set number with underscores" { | ... | @@ -274,8 +268,6 @@ test "big.int string set number with underscores" { |
| 274 | } | 268 | } |
| 275 | 269 | ||
| 276 | test "big.int string set case insensitive number" { | 270 | test "big.int string set case insensitive number" { |
| 277 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 278 | |||
| 279 | var a = try Managed.init(testing.allocator); | 271 | var a = try Managed.init(testing.allocator); |
| 280 | defer a.deinit(); | 272 | defer a.deinit(); |
| 281 | 273 | ||
| ... | @@ -326,8 +318,6 @@ test "big.int twos complement limit set" { | ... | @@ -326,8 +318,6 @@ test "big.int twos complement limit set" { |
| 326 | } | 318 | } |
| 327 | 319 | ||
| 328 | test "big.int string to" { | 320 | test "big.int string to" { |
| 329 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 330 | |||
| 331 | var a = try Managed.initSet(testing.allocator, 120317241209124781241290847124); | 321 | var a = try Managed.initSet(testing.allocator, 120317241209124781241290847124); |
| 332 | defer a.deinit(); | 322 | defer a.deinit(); |
| 333 | 323 | ||
| ... | @@ -368,8 +358,6 @@ test "big.int string to base 16" { | ... | @@ -368,8 +358,6 @@ test "big.int string to base 16" { |
| 368 | } | 358 | } |
| 369 | 359 | ||
| 370 | test "big.int neg string to" { | 360 | test "big.int neg string to" { |
| 371 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 372 | |||
| 373 | var a = try Managed.initSet(testing.allocator, -123907434); | 361 | var a = try Managed.initSet(testing.allocator, -123907434); |
| 374 | defer a.deinit(); | 362 | defer a.deinit(); |
| 375 | 363 | ||
| ... | @@ -392,8 +380,6 @@ test "big.int zero string to" { | ... | @@ -392,8 +380,6 @@ test "big.int zero string to" { |
| 392 | } | 380 | } |
| 393 | 381 | ||
| 394 | test "big.int clone" { | 382 | test "big.int clone" { |
| 395 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 396 | |||
| 397 | var a = try Managed.initSet(testing.allocator, 1234); | 383 | var a = try Managed.initSet(testing.allocator, 1234); |
| 398 | defer a.deinit(); | 384 | defer a.deinit(); |
| 399 | var b = try a.clone(); | 385 | var b = try a.clone(); |
| ... | @@ -531,8 +517,6 @@ test "big.int add multi-single" { | ... | @@ -531,8 +517,6 @@ test "big.int add multi-single" { |
| 531 | } | 517 | } |
| 532 | 518 | ||
| 533 | test "big.int add multi-multi" { | 519 | test "big.int add multi-multi" { |
| 534 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 535 | |||
| 536 | var op1: u128 = 0xefefefef7f7f7f7f; | 520 | var op1: u128 = 0xefefefef7f7f7f7f; |
| 537 | var op2: u128 = 0xfefefefe9f9f9f9f; | 521 | var op2: u128 = 0xfefefefe9f9f9f9f; |
| 538 | var a = try Managed.initSet(testing.allocator, op1); | 522 | var a = try Managed.initSet(testing.allocator, op1); |
| ... | @@ -634,8 +618,6 @@ test "big.int addWrap single-single, unsigned" { | ... | @@ -634,8 +618,6 @@ test "big.int addWrap single-single, unsigned" { |
| 634 | } | 618 | } |
| 635 | 619 | ||
| 636 | test "big.int subWrap single-single, unsigned" { | 620 | test "big.int subWrap single-single, unsigned" { |
| 637 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 638 | |||
| 639 | var a = try Managed.initSet(testing.allocator, 0); | 621 | var a = try Managed.initSet(testing.allocator, 0); |
| 640 | defer a.deinit(); | 622 | defer a.deinit(); |
| 641 | 623 | ||
| ... | @@ -649,8 +631,6 @@ test "big.int subWrap single-single, unsigned" { | ... | @@ -649,8 +631,6 @@ test "big.int subWrap single-single, unsigned" { |
| 649 | } | 631 | } |
| 650 | 632 | ||
| 651 | test "big.int addWrap multi-multi, unsigned, limb aligned" { | 633 | test "big.int addWrap multi-multi, unsigned, limb aligned" { |
| 652 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 653 | |||
| 654 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); | 634 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); |
| 655 | defer a.deinit(); | 635 | defer a.deinit(); |
| 656 | 636 | ||
| ... | @@ -703,8 +683,6 @@ test "big.int subWrap single-single, signed" { | ... | @@ -703,8 +683,6 @@ test "big.int subWrap single-single, signed" { |
| 703 | } | 683 | } |
| 704 | 684 | ||
| 705 | test "big.int addWrap multi-multi, signed, limb aligned" { | 685 | test "big.int addWrap multi-multi, signed, limb aligned" { |
| 706 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 707 | |||
| 708 | var a = try Managed.initSet(testing.allocator, maxInt(SignedDoubleLimb)); | 686 | var a = try Managed.initSet(testing.allocator, maxInt(SignedDoubleLimb)); |
| 709 | defer a.deinit(); | 687 | defer a.deinit(); |
| 710 | 688 | ||
| ... | @@ -755,8 +733,6 @@ test "big.int subSat single-single, unsigned" { | ... | @@ -755,8 +733,6 @@ test "big.int subSat single-single, unsigned" { |
| 755 | } | 733 | } |
| 756 | 734 | ||
| 757 | test "big.int addSat multi-multi, unsigned, limb aligned" { | 735 | test "big.int addSat multi-multi, unsigned, limb aligned" { |
| 758 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 759 | |||
| 760 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); | 736 | var a = try Managed.initSet(testing.allocator, maxInt(DoubleLimb)); |
| 761 | defer a.deinit(); | 737 | defer a.deinit(); |
| 762 | 738 | ||
| ... | @@ -842,8 +818,6 @@ test "big.int sub single-single" { | ... | @@ -842,8 +818,6 @@ test "big.int sub single-single" { |
| 842 | } | 818 | } |
| 843 | 819 | ||
| 844 | test "big.int sub multi-single" { | 820 | test "big.int sub multi-single" { |
| 845 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 846 | |||
| 847 | var a = try Managed.initSet(testing.allocator, maxInt(Limb) + 1); | 821 | var a = try Managed.initSet(testing.allocator, maxInt(Limb) + 1); |
| 848 | defer a.deinit(); | 822 | defer a.deinit(); |
| 849 | var b = try Managed.initSet(testing.allocator, 1); | 823 | var b = try Managed.initSet(testing.allocator, 1); |
| ... | @@ -857,8 +831,6 @@ test "big.int sub multi-single" { | ... | @@ -857,8 +831,6 @@ test "big.int sub multi-single" { |
| 857 | } | 831 | } |
| 858 | 832 | ||
| 859 | test "big.int sub multi-multi" { | 833 | test "big.int sub multi-multi" { |
| 860 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 861 | |||
| 862 | var op1: u128 = 0xefefefefefefefefefefefef; | 834 | var op1: u128 = 0xefefefefefefefefefefefef; |
| 863 | var op2: u128 = 0xabababababababababababab; | 835 | var op2: u128 = 0xabababababababababababab; |
| 864 | 836 | ||
| ... | @@ -943,10 +915,7 @@ test "big.int mul multi-single" { | ... | @@ -943,10 +915,7 @@ test "big.int mul multi-single" { |
| 943 | } | 915 | } |
| 944 | 916 | ||
| 945 | test "big.int mul multi-multi" { | 917 | test "big.int mul multi-multi" { |
| 946 | switch (builtin.zig_backend) { | 918 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 947 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 948 | else => {}, | ||
| 949 | } | ||
| 950 | 919 | ||
| 951 | var op1: u256 = 0x998888efefefefefefefef; | 920 | var op1: u256 = 0x998888efefefefefefefef; |
| 952 | var op2: u256 = 0x333000abababababababab; | 921 | var op2: u256 = 0x333000abababababababab; |
| ... | @@ -963,8 +932,6 @@ test "big.int mul multi-multi" { | ... | @@ -963,8 +932,6 @@ test "big.int mul multi-multi" { |
| 963 | } | 932 | } |
| 964 | 933 | ||
| 965 | test "big.int mul alias r with a" { | 934 | test "big.int mul alias r with a" { |
| 966 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 967 | |||
| 968 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); | 935 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); |
| 969 | defer a.deinit(); | 936 | defer a.deinit(); |
| 970 | var b = try Managed.initSet(testing.allocator, 2); | 937 | var b = try Managed.initSet(testing.allocator, 2); |
| ... | @@ -976,8 +943,6 @@ test "big.int mul alias r with a" { | ... | @@ -976,8 +943,6 @@ test "big.int mul alias r with a" { |
| 976 | } | 943 | } |
| 977 | 944 | ||
| 978 | test "big.int mul alias r with b" { | 945 | test "big.int mul alias r with b" { |
| 979 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 980 | |||
| 981 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); | 946 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); |
| 982 | defer a.deinit(); | 947 | defer a.deinit(); |
| 983 | var b = try Managed.initSet(testing.allocator, 2); | 948 | var b = try Managed.initSet(testing.allocator, 2); |
| ... | @@ -989,8 +954,6 @@ test "big.int mul alias r with b" { | ... | @@ -989,8 +954,6 @@ test "big.int mul alias r with b" { |
| 989 | } | 954 | } |
| 990 | 955 | ||
| 991 | test "big.int mul alias r with a and b" { | 956 | test "big.int mul alias r with a and b" { |
| 992 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 993 | |||
| 994 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); | 957 | var a = try Managed.initSet(testing.allocator, maxInt(Limb)); |
| 995 | defer a.deinit(); | 958 | defer a.deinit(); |
| 996 | 959 | ||
| ... | @@ -1026,8 +989,6 @@ test "big.int mul 0*0" { | ... | @@ -1026,8 +989,6 @@ test "big.int mul 0*0" { |
| 1026 | } | 989 | } |
| 1027 | 990 | ||
| 1028 | test "big.int mul large" { | 991 | test "big.int mul large" { |
| 1029 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1030 | |||
| 1031 | var a = try Managed.initCapacity(testing.allocator, 50); | 992 | var a = try Managed.initCapacity(testing.allocator, 50); |
| 1032 | defer a.deinit(); | 993 | defer a.deinit(); |
| 1033 | var b = try Managed.initCapacity(testing.allocator, 100); | 994 | var b = try Managed.initCapacity(testing.allocator, 100); |
| ... | @@ -1075,10 +1036,7 @@ test "big.int mulWrap single-single signed" { | ... | @@ -1075,10 +1036,7 @@ test "big.int mulWrap single-single signed" { |
| 1075 | } | 1036 | } |
| 1076 | 1037 | ||
| 1077 | test "big.int mulWrap multi-multi unsigned" { | 1038 | test "big.int mulWrap multi-multi unsigned" { |
| 1078 | switch (builtin.zig_backend) { | 1039 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1079 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1080 | else => {}, | ||
| 1081 | } | ||
| 1082 | 1040 | ||
| 1083 | var op1: u256 = 0x998888efefefefefefefef; | 1041 | var op1: u256 = 0x998888efefefefefefefef; |
| 1084 | var op2: u256 = 0x333000abababababababab; | 1042 | var op2: u256 = 0x333000abababababababab; |
| ... | @@ -1095,10 +1053,7 @@ test "big.int mulWrap multi-multi unsigned" { | ... | @@ -1095,10 +1053,7 @@ test "big.int mulWrap multi-multi unsigned" { |
| 1095 | } | 1053 | } |
| 1096 | 1054 | ||
| 1097 | test "big.int mulWrap multi-multi signed" { | 1055 | test "big.int mulWrap multi-multi signed" { |
| 1098 | switch (builtin.zig_backend) { | 1056 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1099 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1100 | else => {}, | ||
| 1101 | } | ||
| 1102 | 1057 | ||
| 1103 | var a = try Managed.initSet(testing.allocator, maxInt(SignedDoubleLimb) - 1); | 1058 | var a = try Managed.initSet(testing.allocator, maxInt(SignedDoubleLimb) - 1); |
| 1104 | defer a.deinit(); | 1059 | defer a.deinit(); |
| ... | @@ -1113,8 +1068,6 @@ test "big.int mulWrap multi-multi signed" { | ... | @@ -1113,8 +1068,6 @@ test "big.int mulWrap multi-multi signed" { |
| 1113 | } | 1068 | } |
| 1114 | 1069 | ||
| 1115 | test "big.int mulWrap large" { | 1070 | test "big.int mulWrap large" { |
| 1116 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1117 | |||
| 1118 | var a = try Managed.initCapacity(testing.allocator, 50); | 1071 | var a = try Managed.initCapacity(testing.allocator, 50); |
| 1119 | defer a.deinit(); | 1072 | defer a.deinit(); |
| 1120 | var b = try Managed.initCapacity(testing.allocator, 100); | 1073 | var b = try Managed.initCapacity(testing.allocator, 100); |
| ... | @@ -1171,8 +1124,6 @@ test "big.int div single-half with rem" { | ... | @@ -1171,8 +1124,6 @@ test "big.int div single-half with rem" { |
| 1171 | } | 1124 | } |
| 1172 | 1125 | ||
| 1173 | test "big.int div single-single no rem" { | 1126 | test "big.int div single-single no rem" { |
| 1174 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1175 | |||
| 1176 | // assumes usize is <= 64 bits. | 1127 | // assumes usize is <= 64 bits. |
| 1177 | var a = try Managed.initSet(testing.allocator, 1 << 52); | 1128 | var a = try Managed.initSet(testing.allocator, 1 << 52); |
| 1178 | defer a.deinit(); | 1129 | defer a.deinit(); |
| ... | @@ -1190,8 +1141,6 @@ test "big.int div single-single no rem" { | ... | @@ -1190,8 +1141,6 @@ test "big.int div single-single no rem" { |
| 1190 | } | 1141 | } |
| 1191 | 1142 | ||
| 1192 | test "big.int div single-single with rem" { | 1143 | test "big.int div single-single with rem" { |
| 1193 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1194 | |||
| 1195 | var a = try Managed.initSet(testing.allocator, (1 << 52) | (1 << 33)); | 1144 | var a = try Managed.initSet(testing.allocator, (1 << 52) | (1 << 33)); |
| 1196 | defer a.deinit(); | 1145 | defer a.deinit(); |
| 1197 | var b = try Managed.initSet(testing.allocator, (1 << 35)); | 1146 | var b = try Managed.initSet(testing.allocator, (1 << 35)); |
| ... | @@ -1208,8 +1157,6 @@ test "big.int div single-single with rem" { | ... | @@ -1208,8 +1157,6 @@ test "big.int div single-single with rem" { |
| 1208 | } | 1157 | } |
| 1209 | 1158 | ||
| 1210 | test "big.int div multi-single no rem" { | 1159 | test "big.int div multi-single no rem" { |
| 1211 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1212 | |||
| 1213 | var op1: u128 = 0xffffeeeeddddcccc; | 1160 | var op1: u128 = 0xffffeeeeddddcccc; |
| 1214 | var op2: u128 = 34; | 1161 | var op2: u128 = 34; |
| 1215 | 1162 | ||
| ... | @@ -1229,8 +1176,6 @@ test "big.int div multi-single no rem" { | ... | @@ -1229,8 +1176,6 @@ test "big.int div multi-single no rem" { |
| 1229 | } | 1176 | } |
| 1230 | 1177 | ||
| 1231 | test "big.int div multi-single with rem" { | 1178 | test "big.int div multi-single with rem" { |
| 1232 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1233 | |||
| 1234 | var op1: u128 = 0xffffeeeeddddcccf; | 1179 | var op1: u128 = 0xffffeeeeddddcccf; |
| 1235 | var op2: u128 = 34; | 1180 | var op2: u128 = 34; |
| 1236 | 1181 | ||
| ... | @@ -1250,8 +1195,6 @@ test "big.int div multi-single with rem" { | ... | @@ -1250,8 +1195,6 @@ test "big.int div multi-single with rem" { |
| 1250 | } | 1195 | } |
| 1251 | 1196 | ||
| 1252 | test "big.int div multi>2-single" { | 1197 | test "big.int div multi>2-single" { |
| 1253 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1254 | |||
| 1255 | var op1: u128 = 0xfefefefefefefefefefefefefefefefe; | 1198 | var op1: u128 = 0xfefefefefefefefefefefefefefefefe; |
| 1256 | var op2: u128 = 0xefab8; | 1199 | var op2: u128 = 0xefab8; |
| 1257 | 1200 | ||
| ... | @@ -1271,8 +1214,6 @@ test "big.int div multi>2-single" { | ... | @@ -1271,8 +1214,6 @@ test "big.int div multi>2-single" { |
| 1271 | } | 1214 | } |
| 1272 | 1215 | ||
| 1273 | test "big.int div single-single q < r" { | 1216 | test "big.int div single-single q < r" { |
| 1274 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1275 | |||
| 1276 | var a = try Managed.initSet(testing.allocator, 0x0078f432); | 1217 | var a = try Managed.initSet(testing.allocator, 0x0078f432); |
| 1277 | defer a.deinit(); | 1218 | defer a.deinit(); |
| 1278 | var b = try Managed.initSet(testing.allocator, 0x01000000); | 1219 | var b = try Managed.initSet(testing.allocator, 0x01000000); |
| ... | @@ -1317,10 +1258,7 @@ test "big.int div q=0 alias" { | ... | @@ -1317,10 +1258,7 @@ test "big.int div q=0 alias" { |
| 1317 | } | 1258 | } |
| 1318 | 1259 | ||
| 1319 | test "big.int div multi-multi q < r" { | 1260 | test "big.int div multi-multi q < r" { |
| 1320 | switch (builtin.zig_backend) { | 1261 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1321 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1322 | else => {}, | ||
| 1323 | } | ||
| 1324 | 1262 | ||
| 1325 | const op1 = 0x1ffffffff0078f432; | 1263 | const op1 = 0x1ffffffff0078f432; |
| 1326 | const op2 = 0x1ffffffff01000000; | 1264 | const op2 = 0x1ffffffff01000000; |
| ... | @@ -1436,8 +1374,6 @@ test "big.int div trunc single-single -/-" { | ... | @@ -1436,8 +1374,6 @@ test "big.int div trunc single-single -/-" { |
| 1436 | } | 1374 | } |
| 1437 | 1375 | ||
| 1438 | test "big.int divTrunc #15535" { | 1376 | test "big.int divTrunc #15535" { |
| 1439 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1440 | |||
| 1441 | var one = try Managed.initSet(testing.allocator, 1); | 1377 | var one = try Managed.initSet(testing.allocator, 1); |
| 1442 | defer one.deinit(); | 1378 | defer one.deinit(); |
| 1443 | var x = try Managed.initSet(testing.allocator, std.math.pow(u128, 2, 64)); | 1379 | var x = try Managed.initSet(testing.allocator, std.math.pow(u128, 2, 64)); |
| ... | @@ -1451,8 +1387,6 @@ test "big.int divTrunc #15535" { | ... | @@ -1451,8 +1387,6 @@ test "big.int divTrunc #15535" { |
| 1451 | } | 1387 | } |
| 1452 | 1388 | ||
| 1453 | test "big.int divFloor #10932" { | 1389 | test "big.int divFloor #10932" { |
| 1454 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1455 | |||
| 1456 | var a = try Managed.init(testing.allocator); | 1390 | var a = try Managed.init(testing.allocator); |
| 1457 | defer a.deinit(); | 1391 | defer a.deinit(); |
| 1458 | 1392 | ||
| ... | @@ -1477,8 +1411,6 @@ test "big.int divFloor #10932" { | ... | @@ -1477,8 +1411,6 @@ test "big.int divFloor #10932" { |
| 1477 | } | 1411 | } |
| 1478 | 1412 | ||
| 1479 | test "big.int divFloor #11166" { | 1413 | test "big.int divFloor #11166" { |
| 1480 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1481 | |||
| 1482 | var a = try Managed.init(testing.allocator); | 1414 | var a = try Managed.init(testing.allocator); |
| 1483 | defer a.deinit(); | 1415 | defer a.deinit(); |
| 1484 | 1416 | ||
| ... | @@ -1506,8 +1438,6 @@ test "big.int divFloor #11166" { | ... | @@ -1506,8 +1438,6 @@ test "big.int divFloor #11166" { |
| 1506 | } | 1438 | } |
| 1507 | 1439 | ||
| 1508 | test "big.int gcd #10932" { | 1440 | test "big.int gcd #10932" { |
| 1509 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1510 | |||
| 1511 | var a = try Managed.init(testing.allocator); | 1441 | var a = try Managed.init(testing.allocator); |
| 1512 | defer a.deinit(); | 1442 | defer a.deinit(); |
| 1513 | 1443 | ||
| ... | @@ -1642,8 +1572,6 @@ test "big.int div floor single-single -/-" { | ... | @@ -1642,8 +1572,6 @@ test "big.int div floor single-single -/-" { |
| 1642 | } | 1572 | } |
| 1643 | 1573 | ||
| 1644 | test "big.int div floor no remainder negative quotient" { | 1574 | test "big.int div floor no remainder negative quotient" { |
| 1645 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1646 | |||
| 1647 | const u: i32 = -0x80000000; | 1575 | const u: i32 = -0x80000000; |
| 1648 | const v: i32 = 1; | 1576 | const v: i32 = 1; |
| 1649 | 1577 | ||
| ... | @@ -1701,10 +1629,7 @@ test "big.int div floor positive close to zero" { | ... | @@ -1701,10 +1629,7 @@ test "big.int div floor positive close to zero" { |
| 1701 | } | 1629 | } |
| 1702 | 1630 | ||
| 1703 | test "big.int div multi-multi with rem" { | 1631 | test "big.int div multi-multi with rem" { |
| 1704 | switch (builtin.zig_backend) { | 1632 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1705 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1706 | else => {}, | ||
| 1707 | } | ||
| 1708 | 1633 | ||
| 1709 | var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeeddddccccbbbbaaaa9999); | 1634 | var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeeddddccccbbbbaaaa9999); |
| 1710 | defer a.deinit(); | 1635 | defer a.deinit(); |
| ... | @@ -1722,10 +1647,7 @@ test "big.int div multi-multi with rem" { | ... | @@ -1722,10 +1647,7 @@ test "big.int div multi-multi with rem" { |
| 1722 | } | 1647 | } |
| 1723 | 1648 | ||
| 1724 | test "big.int div multi-multi no rem" { | 1649 | test "big.int div multi-multi no rem" { |
| 1725 | switch (builtin.zig_backend) { | 1650 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1726 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1727 | else => {}, | ||
| 1728 | } | ||
| 1729 | 1651 | ||
| 1730 | var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeedb4fec200ee3a4286361); | 1652 | var a = try Managed.initSet(testing.allocator, 0x8888999911110000ffffeeeedb4fec200ee3a4286361); |
| 1731 | defer a.deinit(); | 1653 | defer a.deinit(); |
| ... | @@ -1743,10 +1665,7 @@ test "big.int div multi-multi no rem" { | ... | @@ -1743,10 +1665,7 @@ test "big.int div multi-multi no rem" { |
| 1743 | } | 1665 | } |
| 1744 | 1666 | ||
| 1745 | test "big.int div multi-multi (2 branch)" { | 1667 | test "big.int div multi-multi (2 branch)" { |
| 1746 | switch (builtin.zig_backend) { | 1668 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1747 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1748 | else => {}, | ||
| 1749 | } | ||
| 1750 | 1669 | ||
| 1751 | var a = try Managed.initSet(testing.allocator, 0x866666665555555588888887777777761111111111111111); | 1670 | var a = try Managed.initSet(testing.allocator, 0x866666665555555588888887777777761111111111111111); |
| 1752 | defer a.deinit(); | 1671 | defer a.deinit(); |
| ... | @@ -1764,10 +1683,7 @@ test "big.int div multi-multi (2 branch)" { | ... | @@ -1764,10 +1683,7 @@ test "big.int div multi-multi (2 branch)" { |
| 1764 | } | 1683 | } |
| 1765 | 1684 | ||
| 1766 | test "big.int div multi-multi (3.1/3.3 branch)" { | 1685 | test "big.int div multi-multi (3.1/3.3 branch)" { |
| 1767 | switch (builtin.zig_backend) { | 1686 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1768 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1769 | else => {}, | ||
| 1770 | } | ||
| 1771 | 1687 | ||
| 1772 | var a = try Managed.initSet(testing.allocator, 0x11111111111111111111111111111111111111111111111111111111111111); | 1688 | var a = try Managed.initSet(testing.allocator, 0x11111111111111111111111111111111111111111111111111111111111111); |
| 1773 | defer a.deinit(); | 1689 | defer a.deinit(); |
| ... | @@ -1785,10 +1701,7 @@ test "big.int div multi-multi (3.1/3.3 branch)" { | ... | @@ -1785,10 +1701,7 @@ test "big.int div multi-multi (3.1/3.3 branch)" { |
| 1785 | } | 1701 | } |
| 1786 | 1702 | ||
| 1787 | test "big.int div multi-single zero-limb trailing" { | 1703 | test "big.int div multi-single zero-limb trailing" { |
| 1788 | switch (builtin.zig_backend) { | 1704 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1789 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1790 | else => {}, | ||
| 1791 | } | ||
| 1792 | 1705 | ||
| 1793 | var a = try Managed.initSet(testing.allocator, 0x60000000000000000000000000000000000000000000000000000000000000000); | 1706 | var a = try Managed.initSet(testing.allocator, 0x60000000000000000000000000000000000000000000000000000000000000000); |
| 1794 | defer a.deinit(); | 1707 | defer a.deinit(); |
| ... | @@ -1808,10 +1721,7 @@ test "big.int div multi-single zero-limb trailing" { | ... | @@ -1808,10 +1721,7 @@ test "big.int div multi-single zero-limb trailing" { |
| 1808 | } | 1721 | } |
| 1809 | 1722 | ||
| 1810 | test "big.int div multi-multi zero-limb trailing (with rem)" { | 1723 | test "big.int div multi-multi zero-limb trailing (with rem)" { |
| 1811 | switch (builtin.zig_backend) { | 1724 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1812 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1813 | else => {}, | ||
| 1814 | } | ||
| 1815 | 1725 | ||
| 1816 | var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000); | 1726 | var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000); |
| 1817 | defer a.deinit(); | 1727 | defer a.deinit(); |
| ... | @@ -1832,10 +1742,7 @@ test "big.int div multi-multi zero-limb trailing (with rem)" { | ... | @@ -1832,10 +1742,7 @@ test "big.int div multi-multi zero-limb trailing (with rem)" { |
| 1832 | } | 1742 | } |
| 1833 | 1743 | ||
| 1834 | test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count > divisor zero-limb count" { | 1744 | test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count > divisor zero-limb count" { |
| 1835 | switch (builtin.zig_backend) { | 1745 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1836 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1837 | else => {}, | ||
| 1838 | } | ||
| 1839 | 1746 | ||
| 1840 | var a = try Managed.initSet(testing.allocator, 0x8666666655555555888888877777777611111111111111110000000000000000); | 1747 | var a = try Managed.initSet(testing.allocator, 0x8666666655555555888888877777777611111111111111110000000000000000); |
| 1841 | defer a.deinit(); | 1748 | defer a.deinit(); |
| ... | @@ -1856,10 +1763,7 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li | ... | @@ -1856,10 +1763,7 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li |
| 1856 | } | 1763 | } |
| 1857 | 1764 | ||
| 1858 | test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count < divisor zero-limb count" { | 1765 | test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-limb count < divisor zero-limb count" { |
| 1859 | switch (builtin.zig_backend) { | 1766 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1860 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1861 | else => {}, | ||
| 1862 | } | ||
| 1863 | 1767 | ||
| 1864 | var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000); | 1768 | var a = try Managed.initSet(testing.allocator, 0x86666666555555558888888777777776111111111111111100000000000000000000000000000000); |
| 1865 | defer a.deinit(); | 1769 | defer a.deinit(); |
| ... | @@ -1882,8 +1786,6 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li | ... | @@ -1882,8 +1786,6 @@ test "big.int div multi-multi zero-limb trailing (with rem) and dividend zero-li |
| 1882 | } | 1786 | } |
| 1883 | 1787 | ||
| 1884 | test "big.int div multi-multi fuzz case #1" { | 1788 | test "big.int div multi-multi fuzz case #1" { |
| 1885 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1886 | |||
| 1887 | var a = try Managed.init(testing.allocator); | 1789 | var a = try Managed.init(testing.allocator); |
| 1888 | defer a.deinit(); | 1790 | defer a.deinit(); |
| 1889 | var b = try Managed.init(testing.allocator); | 1791 | var b = try Managed.init(testing.allocator); |
| ... | @@ -1908,8 +1810,6 @@ test "big.int div multi-multi fuzz case #1" { | ... | @@ -1908,8 +1810,6 @@ test "big.int div multi-multi fuzz case #1" { |
| 1908 | } | 1810 | } |
| 1909 | 1811 | ||
| 1910 | test "big.int div multi-multi fuzz case #2" { | 1812 | test "big.int div multi-multi fuzz case #2" { |
| 1911 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1912 | |||
| 1913 | var a = try Managed.init(testing.allocator); | 1813 | var a = try Managed.init(testing.allocator); |
| 1914 | defer a.deinit(); | 1814 | defer a.deinit(); |
| 1915 | var b = try Managed.init(testing.allocator); | 1815 | var b = try Managed.init(testing.allocator); |
| ... | @@ -1982,8 +1882,6 @@ test "big.int truncate multi to multi unsigned" { | ... | @@ -1982,8 +1882,6 @@ test "big.int truncate multi to multi unsigned" { |
| 1982 | } | 1882 | } |
| 1983 | 1883 | ||
| 1984 | test "big.int truncate multi to multi signed" { | 1884 | test "big.int truncate multi to multi signed" { |
| 1985 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1986 | |||
| 1987 | var a = try Managed.initSet(testing.allocator, 3 << @bitSizeOf(Limb)); | 1885 | var a = try Managed.initSet(testing.allocator, 3 << @bitSizeOf(Limb)); |
| 1988 | defer a.deinit(); | 1886 | defer a.deinit(); |
| 1989 | 1887 | ||
| ... | @@ -1993,8 +1891,6 @@ test "big.int truncate multi to multi signed" { | ... | @@ -1993,8 +1891,6 @@ test "big.int truncate multi to multi signed" { |
| 1993 | } | 1891 | } |
| 1994 | 1892 | ||
| 1995 | test "big.int truncate negative multi to single" { | 1893 | test "big.int truncate negative multi to single" { |
| 1996 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1997 | |||
| 1998 | var a = try Managed.initSet(testing.allocator, -@as(SignedDoubleLimb, maxInt(Limb) + 1)); | 1894 | var a = try Managed.initSet(testing.allocator, -@as(SignedDoubleLimb, maxInt(Limb) + 1)); |
| 1999 | defer a.deinit(); | 1895 | defer a.deinit(); |
| 2000 | 1896 | ||
| ... | @@ -2101,8 +1997,6 @@ test "big.int shift-right multi" { | ... | @@ -2101,8 +1997,6 @@ test "big.int shift-right multi" { |
| 2101 | } | 1997 | } |
| 2102 | 1998 | ||
| 2103 | test "big.int shift-left single" { | 1999 | test "big.int shift-left single" { |
| 2104 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2105 | |||
| 2106 | var a = try Managed.initSet(testing.allocator, 0xffff); | 2000 | var a = try Managed.initSet(testing.allocator, 0xffff); |
| 2107 | defer a.deinit(); | 2001 | defer a.deinit(); |
| 2108 | try a.shiftLeft(&a, 16); | 2002 | try a.shiftLeft(&a, 16); |
| ... | @@ -2147,8 +2041,6 @@ test "big.int sat shift-left simple unsigned" { | ... | @@ -2147,8 +2041,6 @@ test "big.int sat shift-left simple unsigned" { |
| 2147 | } | 2041 | } |
| 2148 | 2042 | ||
| 2149 | test "big.int sat shift-left simple unsigned no sat" { | 2043 | test "big.int sat shift-left simple unsigned no sat" { |
| 2150 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2151 | |||
| 2152 | var a = try Managed.initSet(testing.allocator, 1); | 2044 | var a = try Managed.initSet(testing.allocator, 1); |
| 2153 | defer a.deinit(); | 2045 | defer a.deinit(); |
| 2154 | try a.shiftLeftSat(&a, 16, .unsigned, 21); | 2046 | try a.shiftLeftSat(&a, 16, .unsigned, 21); |
| ... | @@ -2205,8 +2097,6 @@ test "big.int sat shift-left signed simple positive" { | ... | @@ -2205,8 +2097,6 @@ test "big.int sat shift-left signed simple positive" { |
| 2205 | } | 2097 | } |
| 2206 | 2098 | ||
| 2207 | test "big.int sat shift-left signed multi positive" { | 2099 | test "big.int sat shift-left signed multi positive" { |
| 2208 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2209 | |||
| 2210 | var x: SignedDoubleLimb = 1; | 2100 | var x: SignedDoubleLimb = 1; |
| 2211 | const shift = @bitSizeOf(SignedDoubleLimb) - 1; | 2101 | const shift = @bitSizeOf(SignedDoubleLimb) - 1; |
| 2212 | 2102 | ||
| ... | @@ -2218,8 +2108,6 @@ test "big.int sat shift-left signed multi positive" { | ... | @@ -2218,8 +2108,6 @@ test "big.int sat shift-left signed multi positive" { |
| 2218 | } | 2108 | } |
| 2219 | 2109 | ||
| 2220 | test "big.int sat shift-left signed multi negative" { | 2110 | test "big.int sat shift-left signed multi negative" { |
| 2221 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2222 | |||
| 2223 | var x: SignedDoubleLimb = -1; | 2111 | var x: SignedDoubleLimb = -1; |
| 2224 | const shift = @bitSizeOf(SignedDoubleLimb) - 1; | 2112 | const shift = @bitSizeOf(SignedDoubleLimb) - 1; |
| 2225 | 2113 | ||
| ... | @@ -2406,8 +2294,6 @@ test "big.int bitwise xor simple" { | ... | @@ -2406,8 +2294,6 @@ test "big.int bitwise xor simple" { |
| 2406 | } | 2294 | } |
| 2407 | 2295 | ||
| 2408 | test "big.int bitwise xor multi-limb" { | 2296 | test "big.int bitwise xor multi-limb" { |
| 2409 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2410 | |||
| 2411 | var x: DoubleLimb = maxInt(Limb) + 1; | 2297 | var x: DoubleLimb = maxInt(Limb) + 1; |
| 2412 | var y: DoubleLimb = maxInt(Limb); | 2298 | var y: DoubleLimb = maxInt(Limb); |
| 2413 | var a = try Managed.initSet(testing.allocator, x); | 2299 | var a = try Managed.initSet(testing.allocator, x); |
| ... | @@ -2582,8 +2468,6 @@ test "big.int var args" { | ... | @@ -2582,8 +2468,6 @@ test "big.int var args" { |
| 2582 | } | 2468 | } |
| 2583 | 2469 | ||
| 2584 | test "big.int gcd non-one small" { | 2470 | test "big.int gcd non-one small" { |
| 2585 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2586 | |||
| 2587 | var a = try Managed.initSet(testing.allocator, 17); | 2471 | var a = try Managed.initSet(testing.allocator, 17); |
| 2588 | defer a.deinit(); | 2472 | defer a.deinit(); |
| 2589 | var b = try Managed.initSet(testing.allocator, 97); | 2473 | var b = try Managed.initSet(testing.allocator, 97); |
| ... | @@ -2597,8 +2481,6 @@ test "big.int gcd non-one small" { | ... | @@ -2597,8 +2481,6 @@ test "big.int gcd non-one small" { |
| 2597 | } | 2481 | } |
| 2598 | 2482 | ||
| 2599 | test "big.int gcd non-one medium" { | 2483 | test "big.int gcd non-one medium" { |
| 2600 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2601 | |||
| 2602 | var a = try Managed.initSet(testing.allocator, 4864); | 2484 | var a = try Managed.initSet(testing.allocator, 4864); |
| 2603 | defer a.deinit(); | 2485 | defer a.deinit(); |
| 2604 | var b = try Managed.initSet(testing.allocator, 3458); | 2486 | var b = try Managed.initSet(testing.allocator, 3458); |
| ... | @@ -2612,8 +2494,6 @@ test "big.int gcd non-one medium" { | ... | @@ -2612,8 +2494,6 @@ test "big.int gcd non-one medium" { |
| 2612 | } | 2494 | } |
| 2613 | 2495 | ||
| 2614 | test "big.int gcd non-one large" { | 2496 | test "big.int gcd non-one large" { |
| 2615 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2616 | |||
| 2617 | var a = try Managed.initSet(testing.allocator, 0xffffffffffffffff); | 2497 | var a = try Managed.initSet(testing.allocator, 0xffffffffffffffff); |
| 2618 | defer a.deinit(); | 2498 | defer a.deinit(); |
| 2619 | var b = try Managed.initSet(testing.allocator, 0xffffffffffffffff7777); | 2499 | var b = try Managed.initSet(testing.allocator, 0xffffffffffffffff7777); |
| ... | @@ -2627,10 +2507,7 @@ test "big.int gcd non-one large" { | ... | @@ -2627,10 +2507,7 @@ test "big.int gcd non-one large" { |
| 2627 | } | 2507 | } |
| 2628 | 2508 | ||
| 2629 | test "big.int gcd large multi-limb result" { | 2509 | test "big.int gcd large multi-limb result" { |
| 2630 | switch (builtin.zig_backend) { | 2510 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 2631 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 2632 | else => {}, | ||
| 2633 | } | ||
| 2634 | 2511 | ||
| 2635 | var a = try Managed.initSet(testing.allocator, 0x12345678123456781234567812345678123456781234567812345678); | 2512 | var a = try Managed.initSet(testing.allocator, 0x12345678123456781234567812345678123456781234567812345678); |
| 2636 | defer a.deinit(); | 2513 | defer a.deinit(); |
| ... | @@ -2646,8 +2523,6 @@ test "big.int gcd large multi-limb result" { | ... | @@ -2646,8 +2523,6 @@ test "big.int gcd large multi-limb result" { |
| 2646 | } | 2523 | } |
| 2647 | 2524 | ||
| 2648 | test "big.int gcd one large" { | 2525 | test "big.int gcd one large" { |
| 2649 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2650 | |||
| 2651 | var a = try Managed.initSet(testing.allocator, 1897056385327307); | 2526 | var a = try Managed.initSet(testing.allocator, 1897056385327307); |
| 2652 | defer a.deinit(); | 2527 | defer a.deinit(); |
| 2653 | var b = try Managed.initSet(testing.allocator, 2251799813685248); | 2528 | var b = try Managed.initSet(testing.allocator, 2251799813685248); |
| ... | @@ -2672,8 +2547,6 @@ test "big.int mutable to managed" { | ... | @@ -2672,8 +2547,6 @@ test "big.int mutable to managed" { |
| 2672 | } | 2547 | } |
| 2673 | 2548 | ||
| 2674 | test "big.int const to managed" { | 2549 | test "big.int const to managed" { |
| 2675 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2676 | |||
| 2677 | var a = try Managed.initSet(testing.allocator, 123423453456); | 2550 | var a = try Managed.initSet(testing.allocator, 123423453456); |
| 2678 | defer a.deinit(); | 2551 | defer a.deinit(); |
| 2679 | 2552 | ||
| ... | @@ -2684,8 +2557,6 @@ test "big.int const to managed" { | ... | @@ -2684,8 +2557,6 @@ test "big.int const to managed" { |
| 2684 | } | 2557 | } |
| 2685 | 2558 | ||
| 2686 | test "big.int pow" { | 2559 | test "big.int pow" { |
| 2687 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2688 | |||
| 2689 | { | 2560 | { |
| 2690 | var a = try Managed.initSet(testing.allocator, -3); | 2561 | var a = try Managed.initSet(testing.allocator, -3); |
| 2691 | defer a.deinit(); | 2562 | defer a.deinit(); |
| ... | @@ -2741,8 +2612,6 @@ test "big.int pow" { | ... | @@ -2741,8 +2612,6 @@ test "big.int pow" { |
| 2741 | } | 2612 | } |
| 2742 | 2613 | ||
| 2743 | test "big.int sqrt" { | 2614 | test "big.int sqrt" { |
| 2744 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2745 | |||
| 2746 | var r = try Managed.init(testing.allocator); | 2615 | var r = try Managed.init(testing.allocator); |
| 2747 | defer r.deinit(); | 2616 | defer r.deinit(); |
| 2748 | var a = try Managed.init(testing.allocator); | 2617 | var a = try Managed.init(testing.allocator); |
| ... | @@ -2773,8 +2642,6 @@ test "big.int sqrt" { | ... | @@ -2773,8 +2642,6 @@ test "big.int sqrt" { |
| 2773 | } | 2642 | } |
| 2774 | 2643 | ||
| 2775 | test "big.int regression test for 1 limb overflow with alias" { | 2644 | test "big.int regression test for 1 limb overflow with alias" { |
| 2776 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2777 | |||
| 2778 | // Note these happen to be two consecutive Fibonacci sequence numbers, the | 2645 | // Note these happen to be two consecutive Fibonacci sequence numbers, the |
| 2779 | // first two whose sum exceeds 2**64. | 2646 | // first two whose sum exceeds 2**64. |
| 2780 | var a = try Managed.initSet(testing.allocator, 7540113804746346429); | 2647 | var a = try Managed.initSet(testing.allocator, 7540113804746346429); |
| ... | @@ -2789,8 +2656,6 @@ test "big.int regression test for 1 limb overflow with alias" { | ... | @@ -2789,8 +2656,6 @@ test "big.int regression test for 1 limb overflow with alias" { |
| 2789 | } | 2656 | } |
| 2790 | 2657 | ||
| 2791 | test "big.int regression test for realloc with alias" { | 2658 | test "big.int regression test for realloc with alias" { |
| 2792 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2793 | |||
| 2794 | // Note these happen to be two consecutive Fibonacci sequence numbers, the | 2659 | // Note these happen to be two consecutive Fibonacci sequence numbers, the |
| 2795 | // second of which is the first such number to exceed 2**192. | 2660 | // second of which is the first such number to exceed 2**192. |
| 2796 | var a = try Managed.initSet(testing.allocator, 5611500259351924431073312796924978741056961814867751431689); | 2661 | var a = try Managed.initSet(testing.allocator, 5611500259351924431073312796924978741056961814867751431689); |
| ... | @@ -2805,8 +2670,6 @@ test "big.int regression test for realloc with alias" { | ... | @@ -2805,8 +2670,6 @@ test "big.int regression test for realloc with alias" { |
| 2805 | } | 2670 | } |
| 2806 | 2671 | ||
| 2807 | test "big int popcount" { | 2672 | test "big int popcount" { |
| 2808 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2809 | |||
| 2810 | var a = try Managed.init(testing.allocator); | 2673 | var a = try Managed.init(testing.allocator); |
| 2811 | defer a.deinit(); | 2674 | defer a.deinit(); |
| 2812 | 2675 | ||
| ... | @@ -2887,8 +2750,6 @@ fn popCountTest(val: *const Managed, bit_count: usize, expected: usize) !void { | ... | @@ -2887,8 +2750,6 @@ fn popCountTest(val: *const Managed, bit_count: usize, expected: usize) !void { |
| 2887 | } | 2750 | } |
| 2888 | 2751 | ||
| 2889 | test "big int conversion read/write twos complement" { | 2752 | test "big int conversion read/write twos complement" { |
| 2890 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2891 | |||
| 2892 | var a = try Managed.initSet(testing.allocator, (1 << 493) - 1); | 2753 | var a = try Managed.initSet(testing.allocator, (1 << 493) - 1); |
| 2893 | defer a.deinit(); | 2754 | defer a.deinit(); |
| 2894 | var b = try Managed.initSet(testing.allocator, (1 << 493) - 1); | 2755 | var b = try Managed.initSet(testing.allocator, (1 << 493) - 1); |
| ... | @@ -2987,8 +2848,6 @@ test "big int write twos complement +/- zero" { | ... | @@ -2987,8 +2848,6 @@ test "big int write twos complement +/- zero" { |
| 2987 | } | 2848 | } |
| 2988 | 2849 | ||
| 2989 | test "big int conversion write twos complement with padding" { | 2850 | test "big int conversion write twos complement with padding" { |
| 2990 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2991 | |||
| 2992 | var a = try Managed.initSet(testing.allocator, 0x01_ffffffff_ffffffff_ffffffff); | 2851 | var a = try Managed.initSet(testing.allocator, 0x01_ffffffff_ffffffff_ffffffff); |
| 2993 | defer a.deinit(); | 2852 | defer a.deinit(); |
| 2994 | 2853 | ||
| ... | @@ -3172,8 +3031,6 @@ fn byteSwapTest(comptime T: type, comptime input: comptime_int, comptime expecte | ... | @@ -3172,8 +3031,6 @@ fn byteSwapTest(comptime T: type, comptime input: comptime_int, comptime expecte |
| 3172 | } | 3031 | } |
| 3173 | 3032 | ||
| 3174 | test "big int byte swap" { | 3033 | test "big int byte swap" { |
| 3175 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 3176 | |||
| 3177 | var a = try Managed.initSet(testing.allocator, 0x01_ffffffff_ffffffff_ffffffff); | 3034 | var a = try Managed.initSet(testing.allocator, 0x01_ffffffff_ffffffff_ffffffff); |
| 3178 | defer a.deinit(); | 3035 | defer a.deinit(); |
| 3179 | 3036 | ||
| ... | @@ -3218,8 +3075,6 @@ test "big int byte swap" { | ... | @@ -3218,8 +3075,6 @@ test "big int byte swap" { |
| 3218 | } | 3075 | } |
| 3219 | 3076 | ||
| 3220 | test "big.int mul multi-multi alias r with a and b" { | 3077 | test "big.int mul multi-multi alias r with a and b" { |
| 3221 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 3222 | |||
| 3223 | var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb)); | 3078 | var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb)); |
| 3224 | defer a.deinit(); | 3079 | defer a.deinit(); |
| 3225 | 3080 | ||
| ... | @@ -3236,8 +3091,6 @@ test "big.int mul multi-multi alias r with a and b" { | ... | @@ -3236,8 +3091,6 @@ test "big.int mul multi-multi alias r with a and b" { |
| 3236 | } | 3091 | } |
| 3237 | 3092 | ||
| 3238 | test "big.int sqr multi alias r with a" { | 3093 | test "big.int sqr multi alias r with a" { |
| 3239 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 3240 | |||
| 3241 | var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb)); | 3094 | var a = try Managed.initSet(testing.allocator, 2 * maxInt(Limb)); |
| 3242 | defer a.deinit(); | 3095 | defer a.deinit(); |
| 3243 | 3096 |
lib/std/math/big/rational.zig-35| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("../../std.zig"); | 1 | const std = @import("../../std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const debug = std.debug; | 2 | const debug = std.debug; |
| 4 | const math = std.math; | 3 | const math = std.math; |
| 5 | const mem = std.mem; | 4 | const mem = std.mem; |
| ... | @@ -494,8 +493,6 @@ fn extractLowBits(a: Int, comptime T: type) T { | ... | @@ -494,8 +493,6 @@ fn extractLowBits(a: Int, comptime T: type) T { |
| 494 | } | 493 | } |
| 495 | 494 | ||
| 496 | test "big.rational extractLowBits" { | 495 | test "big.rational extractLowBits" { |
| 497 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 498 | |||
| 499 | var a = try Int.initSet(testing.allocator, 0x11112222333344441234567887654321); | 496 | var a = try Int.initSet(testing.allocator, 0x11112222333344441234567887654321); |
| 500 | defer a.deinit(); | 497 | defer a.deinit(); |
| 501 | 498 | ||
| ... | @@ -516,8 +513,6 @@ test "big.rational extractLowBits" { | ... | @@ -516,8 +513,6 @@ test "big.rational extractLowBits" { |
| 516 | } | 513 | } |
| 517 | 514 | ||
| 518 | test "big.rational set" { | 515 | test "big.rational set" { |
| 519 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 520 | |||
| 521 | var a = try Rational.init(testing.allocator); | 516 | var a = try Rational.init(testing.allocator); |
| 522 | defer a.deinit(); | 517 | defer a.deinit(); |
| 523 | 518 | ||
| ... | @@ -547,8 +542,6 @@ test "big.rational set" { | ... | @@ -547,8 +542,6 @@ test "big.rational set" { |
| 547 | } | 542 | } |
| 548 | 543 | ||
| 549 | test "big.rational setFloat" { | 544 | test "big.rational setFloat" { |
| 550 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 551 | |||
| 552 | var a = try Rational.init(testing.allocator); | 545 | var a = try Rational.init(testing.allocator); |
| 553 | defer a.deinit(); | 546 | defer a.deinit(); |
| 554 | 547 | ||
| ... | @@ -574,8 +567,6 @@ test "big.rational setFloat" { | ... | @@ -574,8 +567,6 @@ test "big.rational setFloat" { |
| 574 | } | 567 | } |
| 575 | 568 | ||
| 576 | test "big.rational setFloatString" { | 569 | test "big.rational setFloatString" { |
| 577 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 578 | |||
| 579 | var a = try Rational.init(testing.allocator); | 570 | var a = try Rational.init(testing.allocator); |
| 580 | defer a.deinit(); | 571 | defer a.deinit(); |
| 581 | 572 | ||
| ... | @@ -587,8 +578,6 @@ test "big.rational setFloatString" { | ... | @@ -587,8 +578,6 @@ test "big.rational setFloatString" { |
| 587 | } | 578 | } |
| 588 | 579 | ||
| 589 | test "big.rational toFloat" { | 580 | test "big.rational toFloat" { |
| 590 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 591 | |||
| 592 | var a = try Rational.init(testing.allocator); | 581 | var a = try Rational.init(testing.allocator); |
| 593 | defer a.deinit(); | 582 | defer a.deinit(); |
| 594 | 583 | ||
| ... | @@ -602,8 +591,6 @@ test "big.rational toFloat" { | ... | @@ -602,8 +591,6 @@ test "big.rational toFloat" { |
| 602 | } | 591 | } |
| 603 | 592 | ||
| 604 | test "big.rational set/to Float round-trip" { | 593 | test "big.rational set/to Float round-trip" { |
| 605 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 606 | |||
| 607 | var a = try Rational.init(testing.allocator); | 594 | var a = try Rational.init(testing.allocator); |
| 608 | defer a.deinit(); | 595 | defer a.deinit(); |
| 609 | var prng = std.rand.DefaultPrng.init(0x5EED); | 596 | var prng = std.rand.DefaultPrng.init(0x5EED); |
| ... | @@ -617,8 +604,6 @@ test "big.rational set/to Float round-trip" { | ... | @@ -617,8 +604,6 @@ test "big.rational set/to Float round-trip" { |
| 617 | } | 604 | } |
| 618 | 605 | ||
| 619 | test "big.rational copy" { | 606 | test "big.rational copy" { |
| 620 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 621 | |||
| 622 | var a = try Rational.init(testing.allocator); | 607 | var a = try Rational.init(testing.allocator); |
| 623 | defer a.deinit(); | 608 | defer a.deinit(); |
| 624 | 609 | ||
| ... | @@ -649,8 +634,6 @@ test "big.rational copy" { | ... | @@ -649,8 +634,6 @@ test "big.rational copy" { |
| 649 | } | 634 | } |
| 650 | 635 | ||
| 651 | test "big.rational negate" { | 636 | test "big.rational negate" { |
| 652 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 653 | |||
| 654 | var a = try Rational.init(testing.allocator); | 637 | var a = try Rational.init(testing.allocator); |
| 655 | defer a.deinit(); | 638 | defer a.deinit(); |
| 656 | 639 | ||
| ... | @@ -668,8 +651,6 @@ test "big.rational negate" { | ... | @@ -668,8 +651,6 @@ test "big.rational negate" { |
| 668 | } | 651 | } |
| 669 | 652 | ||
| 670 | test "big.rational abs" { | 653 | test "big.rational abs" { |
| 671 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 672 | |||
| 673 | var a = try Rational.init(testing.allocator); | 654 | var a = try Rational.init(testing.allocator); |
| 674 | defer a.deinit(); | 655 | defer a.deinit(); |
| 675 | 656 | ||
| ... | @@ -687,8 +668,6 @@ test "big.rational abs" { | ... | @@ -687,8 +668,6 @@ test "big.rational abs" { |
| 687 | } | 668 | } |
| 688 | 669 | ||
| 689 | test "big.rational swap" { | 670 | test "big.rational swap" { |
| 690 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 691 | |||
| 692 | var a = try Rational.init(testing.allocator); | 671 | var a = try Rational.init(testing.allocator); |
| 693 | defer a.deinit(); | 672 | defer a.deinit(); |
| 694 | var b = try Rational.init(testing.allocator); | 673 | var b = try Rational.init(testing.allocator); |
| ... | @@ -713,8 +692,6 @@ test "big.rational swap" { | ... | @@ -713,8 +692,6 @@ test "big.rational swap" { |
| 713 | } | 692 | } |
| 714 | 693 | ||
| 715 | test "big.rational order" { | 694 | test "big.rational order" { |
| 716 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 717 | |||
| 718 | var a = try Rational.init(testing.allocator); | 695 | var a = try Rational.init(testing.allocator); |
| 719 | defer a.deinit(); | 696 | defer a.deinit(); |
| 720 | var b = try Rational.init(testing.allocator); | 697 | var b = try Rational.init(testing.allocator); |
| ... | @@ -730,8 +707,6 @@ test "big.rational order" { | ... | @@ -730,8 +707,6 @@ test "big.rational order" { |
| 730 | } | 707 | } |
| 731 | 708 | ||
| 732 | test "big.rational order/orderAbs with negative" { | 709 | test "big.rational order/orderAbs with negative" { |
| 733 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 734 | |||
| 735 | var a = try Rational.init(testing.allocator); | 710 | var a = try Rational.init(testing.allocator); |
| 736 | defer a.deinit(); | 711 | defer a.deinit(); |
| 737 | var b = try Rational.init(testing.allocator); | 712 | var b = try Rational.init(testing.allocator); |
| ... | @@ -744,8 +719,6 @@ test "big.rational order/orderAbs with negative" { | ... | @@ -744,8 +719,6 @@ test "big.rational order/orderAbs with negative" { |
| 744 | } | 719 | } |
| 745 | 720 | ||
| 746 | test "big.rational add single-limb" { | 721 | test "big.rational add single-limb" { |
| 747 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 748 | |||
| 749 | var a = try Rational.init(testing.allocator); | 722 | var a = try Rational.init(testing.allocator); |
| 750 | defer a.deinit(); | 723 | defer a.deinit(); |
| 751 | var b = try Rational.init(testing.allocator); | 724 | var b = try Rational.init(testing.allocator); |
| ... | @@ -761,8 +734,6 @@ test "big.rational add single-limb" { | ... | @@ -761,8 +734,6 @@ test "big.rational add single-limb" { |
| 761 | } | 734 | } |
| 762 | 735 | ||
| 763 | test "big.rational add" { | 736 | test "big.rational add" { |
| 764 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 765 | |||
| 766 | var a = try Rational.init(testing.allocator); | 737 | var a = try Rational.init(testing.allocator); |
| 767 | defer a.deinit(); | 738 | defer a.deinit(); |
| 768 | var b = try Rational.init(testing.allocator); | 739 | var b = try Rational.init(testing.allocator); |
| ... | @@ -779,8 +750,6 @@ test "big.rational add" { | ... | @@ -779,8 +750,6 @@ test "big.rational add" { |
| 779 | } | 750 | } |
| 780 | 751 | ||
| 781 | test "big.rational sub" { | 752 | test "big.rational sub" { |
| 782 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 783 | |||
| 784 | var a = try Rational.init(testing.allocator); | 753 | var a = try Rational.init(testing.allocator); |
| 785 | defer a.deinit(); | 754 | defer a.deinit(); |
| 786 | var b = try Rational.init(testing.allocator); | 755 | var b = try Rational.init(testing.allocator); |
| ... | @@ -797,8 +766,6 @@ test "big.rational sub" { | ... | @@ -797,8 +766,6 @@ test "big.rational sub" { |
| 797 | } | 766 | } |
| 798 | 767 | ||
| 799 | test "big.rational mul" { | 768 | test "big.rational mul" { |
| 800 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 801 | |||
| 802 | var a = try Rational.init(testing.allocator); | 769 | var a = try Rational.init(testing.allocator); |
| 803 | defer a.deinit(); | 770 | defer a.deinit(); |
| 804 | var b = try Rational.init(testing.allocator); | 771 | var b = try Rational.init(testing.allocator); |
| ... | @@ -815,8 +782,6 @@ test "big.rational mul" { | ... | @@ -815,8 +782,6 @@ test "big.rational mul" { |
| 815 | } | 782 | } |
| 816 | 783 | ||
| 817 | test "big.rational div" { | 784 | test "big.rational div" { |
| 818 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 819 | |||
| 820 | { | 785 | { |
| 821 | var a = try Rational.init(testing.allocator); | 786 | var a = try Rational.init(testing.allocator); |
| 822 | defer a.deinit(); | 787 | defer a.deinit(); |
lib/std/math/ilogb.zig-9| ... | @@ -6,7 +6,6 @@ | ... | @@ -6,7 +6,6 @@ |
| 6 | // https://git.musl-libc.org/cgit/musl/tree/src/math/ilogb.c | 6 | // https://git.musl-libc.org/cgit/musl/tree/src/math/ilogb.c |
| 7 | 7 | ||
| 8 | const std = @import("../std.zig"); | 8 | const std = @import("../std.zig"); |
| 9 | const builtin = @import("builtin"); | ||
| 10 | const math = std.math; | 9 | const math = std.math; |
| 11 | const expect = std.testing.expect; | 10 | const expect = std.testing.expect; |
| 12 | const maxInt = std.math.maxInt; | 11 | const maxInt = std.math.maxInt; |
| ... | @@ -109,8 +108,6 @@ test "64" { | ... | @@ -109,8 +108,6 @@ test "64" { |
| 109 | } | 108 | } |
| 110 | 109 | ||
| 111 | test "80" { | 110 | test "80" { |
| 112 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 113 | |||
| 114 | try expect(ilogbX(f80, 0.0) == fp_ilogb0); | 111 | try expect(ilogbX(f80, 0.0) == fp_ilogb0); |
| 115 | try expect(ilogbX(f80, 0.5) == -1); | 112 | try expect(ilogbX(f80, 0.5) == -1); |
| 116 | try expect(ilogbX(f80, 0.8923) == -1); | 113 | try expect(ilogbX(f80, 0.8923) == -1); |
| ... | @@ -125,8 +122,6 @@ test "80" { | ... | @@ -125,8 +122,6 @@ test "80" { |
| 125 | } | 122 | } |
| 126 | 123 | ||
| 127 | test "128" { | 124 | test "128" { |
| 128 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 129 | |||
| 130 | try expect(ilogbX(f128, 0.0) == fp_ilogb0); | 125 | try expect(ilogbX(f128, 0.0) == fp_ilogb0); |
| 131 | try expect(ilogbX(f128, 0.5) == -1); | 126 | try expect(ilogbX(f128, 0.5) == -1); |
| 132 | try expect(ilogbX(f128, 0.8923) == -1); | 127 | try expect(ilogbX(f128, 0.8923) == -1); |
| ... | @@ -162,8 +157,6 @@ test "64 special" { | ... | @@ -162,8 +157,6 @@ test "64 special" { |
| 162 | } | 157 | } |
| 163 | 158 | ||
| 164 | test "80 special" { | 159 | test "80 special" { |
| 165 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 166 | |||
| 167 | try expect(ilogbX(f80, math.inf(f80)) == maxInt(i32)); | 160 | try expect(ilogbX(f80, math.inf(f80)) == maxInt(i32)); |
| 168 | try expect(ilogbX(f80, -math.inf(f80)) == maxInt(i32)); | 161 | try expect(ilogbX(f80, -math.inf(f80)) == maxInt(i32)); |
| 169 | try expect(ilogbX(f80, 0.0) == minInt(i32)); | 162 | try expect(ilogbX(f80, 0.0) == minInt(i32)); |
| ... | @@ -171,8 +164,6 @@ test "80 special" { | ... | @@ -171,8 +164,6 @@ test "80 special" { |
| 171 | } | 164 | } |
| 172 | 165 | ||
| 173 | test "128 special" { | 166 | test "128 special" { |
| 174 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 175 | |||
| 176 | try expect(ilogbX(f128, math.inf(f128)) == maxInt(i32)); | 167 | try expect(ilogbX(f128, math.inf(f128)) == maxInt(i32)); |
| 177 | try expect(ilogbX(f128, -math.inf(f128)) == maxInt(i32)); | 168 | try expect(ilogbX(f128, -math.inf(f128)) == maxInt(i32)); |
| 178 | try expect(ilogbX(f128, 0.0) == minInt(i32)); | 169 | try expect(ilogbX(f128, 0.0) == minInt(i32)); |
lib/std/math/ldexp.zig-1| ... | @@ -67,7 +67,6 @@ pub fn ldexp(x: anytype, n: i32) @TypeOf(x) { | ... | @@ -67,7 +67,6 @@ pub fn ldexp(x: anytype, n: i32) @TypeOf(x) { |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | test "math.ldexp" { | 69 | test "math.ldexp" { |
| 70 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 71 | 70 | ||
| 72 | // subnormals | 71 | // subnormals |
| 73 | try expect(ldexp(@as(f16, 0x1.1FFp14), -14 - 9 - 15) == math.floatTrueMin(f16)); | 72 | try expect(ldexp(@as(f16, 0x1.1FFp14), -14 - 9 - 15) == math.floatTrueMin(f16)); |
lib/std/math/log10.zig+1-1| ... | @@ -170,11 +170,11 @@ test "log10_int vs old implementation" { | ... | @@ -170,11 +170,11 @@ test "log10_int vs old implementation" { |
| 170 | test "log10_int close to powers of 10" { | 170 | test "log10_int close to powers of 10" { |
| 171 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 171 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 172 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 172 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 173 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 173 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 174 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 174 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 175 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 175 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 176 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 176 | if (builtin.zig_backend == .stage2_llvm and comptime builtin.target.isWasm()) return error.SkipZigTest; // TODO | 177 | if (builtin.zig_backend == .stage2_llvm and comptime builtin.target.isWasm()) return error.SkipZigTest; // TODO |
| 177 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 178 | 178 | ||
| 179 | const int_types = .{ u8, u16, u32, u64, u128, u256, u512 }; | 179 | const int_types = .{ u8, u16, u32, u64, u128, u256, u512 }; |
| 180 | const max_log_values: [7]usize = .{ 2, 4, 9, 19, 38, 77, 154 }; | 180 | const max_log_values: [7]usize = .{ 2, 4, 9, 19, 38, 77, 154 }; |
lib/std/math/log_int.zig-2| ... | @@ -56,8 +56,6 @@ pub fn log_int(comptime T: type, base: T, x: T) Log2Int(T) { | ... | @@ -56,8 +56,6 @@ pub fn log_int(comptime T: type, base: T, x: T) Log2Int(T) { |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | test "math.log_int" { | 58 | test "math.log_int" { |
| 59 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 60 | |||
| 61 | // Test all unsigned integers with 2, 3, ..., 64 bits. | 59 | // Test all unsigned integers with 2, 3, ..., 64 bits. |
| 62 | // We cannot test 0 or 1 bits since base must be > 1. | 60 | // We cannot test 0 or 1 bits since base must be > 1. |
| 63 | inline for (2..64 + 1) |bits| { | 61 | inline for (2..64 + 1) |bits| { |
lib/std/math/nextafter.zig-2| ... | @@ -103,8 +103,6 @@ fn nextAfterFloat(comptime T: type, x: T, y: T) T { | ... | @@ -103,8 +103,6 @@ fn nextAfterFloat(comptime T: type, x: T, y: T) T { |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | test "math.nextAfter.int" { | 105 | test "math.nextAfter.int" { |
| 106 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 107 | |||
| 108 | try expect(nextAfter(i0, 0, 0) == 0); | 106 | try expect(nextAfter(i0, 0, 0) == 0); |
| 109 | try expect(nextAfter(u0, 0, 0) == 0); | 107 | try expect(nextAfter(u0, 0, 0) == 0); |
| 110 | try expect(nextAfter(i1, 0, 0) == 0); | 108 | try expect(nextAfter(i1, 0, 0) == 0); |
lib/std/math/scalbn.zig-2| ... | @@ -7,8 +7,6 @@ const expect = std.testing.expect; | ... | @@ -7,8 +7,6 @@ const expect = std.testing.expect; |
| 7 | pub const scalbn = @import("ldexp.zig").ldexp; | 7 | pub const scalbn = @import("ldexp.zig").ldexp; |
| 8 | 8 | ||
| 9 | test "math.scalbn" { | 9 | test "math.scalbn" { |
| 10 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 11 | |||
| 12 | // Verify we are using base 2. | 10 | // Verify we are using base 2. |
| 13 | try expect(scalbn(@as(f16, 1.5), 4) == 24.0); | 11 | try expect(scalbn(@as(f16, 1.5), 4) == 24.0); |
| 14 | try expect(scalbn(@as(f32, 1.5), 4) == 24.0); | 12 | try expect(scalbn(@as(f32, 1.5), 4) == 24.0); |
lib/std/mem.zig+4-20| ... | @@ -315,8 +315,6 @@ pub fn zeroes(comptime T: type) T { | ... | @@ -315,8 +315,6 @@ pub fn zeroes(comptime T: type) T { |
| 315 | } | 315 | } |
| 316 | 316 | ||
| 317 | test "zeroes" { | 317 | test "zeroes" { |
| 318 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 319 | |||
| 320 | const C_struct = extern struct { | 318 | const C_struct = extern struct { |
| 321 | x: u32, | 319 | x: u32, |
| 322 | y: u32 align(128), | 320 | y: u32 align(128), |
| ... | @@ -1025,8 +1023,6 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co | ... | @@ -1025,8 +1023,6 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co |
| 1025 | } | 1023 | } |
| 1026 | 1024 | ||
| 1027 | test "indexOfSentinel vector paths" { | 1025 | test "indexOfSentinel vector paths" { |
| 1028 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1029 | |||
| 1030 | const Types = [_]type{ u8, u16, u32, u64 }; | 1026 | const Types = [_]type{ u8, u16, u32, u64 }; |
| 1031 | const allocator = std.testing.allocator; | 1027 | const allocator = std.testing.allocator; |
| 1032 | 1028 | ||
| ... | @@ -1741,8 +1737,6 @@ pub fn readIntSlice(comptime T: type, bytes: []const u8, endian: Endian) T { | ... | @@ -1741,8 +1737,6 @@ pub fn readIntSlice(comptime T: type, bytes: []const u8, endian: Endian) T { |
| 1741 | } | 1737 | } |
| 1742 | 1738 | ||
| 1743 | test "comptime read/write int" { | 1739 | test "comptime read/write int" { |
| 1744 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1745 | |||
| 1746 | comptime { | 1740 | comptime { |
| 1747 | var bytes: [2]u8 = undefined; | 1741 | var bytes: [2]u8 = undefined; |
| 1748 | writeIntLittle(u16, &bytes, 0x1234); | 1742 | writeIntLittle(u16, &bytes, 0x1234); |
| ... | @@ -1758,10 +1752,7 @@ test "comptime read/write int" { | ... | @@ -1758,10 +1752,7 @@ test "comptime read/write int" { |
| 1758 | } | 1752 | } |
| 1759 | 1753 | ||
| 1760 | test "readIntBig and readIntLittle" { | 1754 | test "readIntBig and readIntLittle" { |
| 1761 | switch (builtin.zig_backend) { | 1755 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 1762 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 1763 | else => {}, | ||
| 1764 | } | ||
| 1765 | 1756 | ||
| 1766 | try testing.expect(readIntSliceBig(u0, &[_]u8{}) == 0x0); | 1757 | try testing.expect(readIntSliceBig(u0, &[_]u8{}) == 0x0); |
| 1767 | try testing.expect(readIntSliceLittle(u0, &[_]u8{}) == 0x0); | 1758 | try testing.expect(readIntSliceLittle(u0, &[_]u8{}) == 0x0); |
| ... | @@ -2062,10 +2053,7 @@ pub fn writeVarPackedInt(bytes: []u8, bit_offset: usize, bit_count: usize, value | ... | @@ -2062,10 +2053,7 @@ pub fn writeVarPackedInt(bytes: []u8, bit_offset: usize, bit_count: usize, value |
| 2062 | } | 2053 | } |
| 2063 | 2054 | ||
| 2064 | test "writeIntBig and writeIntLittle" { | 2055 | test "writeIntBig and writeIntLittle" { |
| 2065 | switch (builtin.zig_backend) { | 2056 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 2066 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 2067 | else => {}, | ||
| 2068 | } | ||
| 2069 | 2057 | ||
| 2070 | var buf0: [0]u8 = undefined; | 2058 | var buf0: [0]u8 = undefined; |
| 2071 | var buf1: [1]u8 = undefined; | 2059 | var buf1: [1]u8 = undefined; |
| ... | @@ -3309,8 +3297,6 @@ test "testStringEquality" { | ... | @@ -3309,8 +3297,6 @@ test "testStringEquality" { |
| 3309 | } | 3297 | } |
| 3310 | 3298 | ||
| 3311 | test "testReadInt" { | 3299 | test "testReadInt" { |
| 3312 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 3313 | |||
| 3314 | try testReadIntImpl(); | 3300 | try testReadIntImpl(); |
| 3315 | try comptime testReadIntImpl(); | 3301 | try comptime testReadIntImpl(); |
| 3316 | } | 3302 | } |
| ... | @@ -4664,10 +4650,8 @@ pub fn alignInSlice(slice: anytype, comptime new_alignment: usize) ?AlignedSlice | ... | @@ -4664,10 +4650,8 @@ pub fn alignInSlice(slice: anytype, comptime new_alignment: usize) ?AlignedSlice |
| 4664 | } | 4650 | } |
| 4665 | 4651 | ||
| 4666 | test "read/write(Var)PackedInt" { | 4652 | test "read/write(Var)PackedInt" { |
| 4667 | switch (builtin.zig_backend) { | 4653 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; |
| 4668 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | 4654 | |
| 4669 | else => {}, | ||
| 4670 | } | ||
| 4671 | switch (builtin.cpu.arch) { | 4655 | switch (builtin.cpu.arch) { |
| 4672 | // This test generates too much code to execute on WASI. | 4656 | // This test generates too much code to execute on WASI. |
| 4673 | // LLVM backend fails with "too many locals: locals exceed maximum" | 4657 | // LLVM backend fails with "too many locals: locals exceed maximum" |
lib/std/multi_array_list.zig-16| ... | @@ -583,8 +583,6 @@ pub fn MultiArrayList(comptime T: type) type { | ... | @@ -583,8 +583,6 @@ pub fn MultiArrayList(comptime T: type) type { |
| 583 | } | 583 | } |
| 584 | 584 | ||
| 585 | test "basic usage" { | 585 | test "basic usage" { |
| 586 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 587 | |||
| 588 | const ally = testing.allocator; | 586 | const ally = testing.allocator; |
| 589 | 587 | ||
| 590 | const Foo = struct { | 588 | const Foo = struct { |
| ... | @@ -679,8 +677,6 @@ test "basic usage" { | ... | @@ -679,8 +677,6 @@ test "basic usage" { |
| 679 | // This was observed to fail on aarch64 with LLVM 11, when the capacityInBytes | 677 | // This was observed to fail on aarch64 with LLVM 11, when the capacityInBytes |
| 680 | // function used the @reduce code path. | 678 | // function used the @reduce code path. |
| 681 | test "regression test for @reduce bug" { | 679 | test "regression test for @reduce bug" { |
| 682 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 683 | |||
| 684 | const ally = testing.allocator; | 680 | const ally = testing.allocator; |
| 685 | var list = MultiArrayList(struct { | 681 | var list = MultiArrayList(struct { |
| 686 | tag: std.zig.Token.Tag, | 682 | tag: std.zig.Token.Tag, |
| ... | @@ -758,8 +754,6 @@ test "regression test for @reduce bug" { | ... | @@ -758,8 +754,6 @@ test "regression test for @reduce bug" { |
| 758 | } | 754 | } |
| 759 | 755 | ||
| 760 | test "ensure capacity on empty list" { | 756 | test "ensure capacity on empty list" { |
| 761 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 762 | |||
| 763 | const ally = testing.allocator; | 757 | const ally = testing.allocator; |
| 764 | 758 | ||
| 765 | const Foo = struct { | 759 | const Foo = struct { |
| ... | @@ -795,8 +789,6 @@ test "ensure capacity on empty list" { | ... | @@ -795,8 +789,6 @@ test "ensure capacity on empty list" { |
| 795 | } | 789 | } |
| 796 | 790 | ||
| 797 | test "insert elements" { | 791 | test "insert elements" { |
| 798 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 799 | |||
| 800 | const ally = testing.allocator; | 792 | const ally = testing.allocator; |
| 801 | 793 | ||
| 802 | const Foo = struct { | 794 | const Foo = struct { |
| ... | @@ -816,8 +808,6 @@ test "insert elements" { | ... | @@ -816,8 +808,6 @@ test "insert elements" { |
| 816 | } | 808 | } |
| 817 | 809 | ||
| 818 | test "union" { | 810 | test "union" { |
| 819 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 820 | |||
| 821 | const ally = testing.allocator; | 811 | const ally = testing.allocator; |
| 822 | 812 | ||
| 823 | const Foo = union(enum) { | 813 | const Foo = union(enum) { |
| ... | @@ -873,8 +863,6 @@ test "union" { | ... | @@ -873,8 +863,6 @@ test "union" { |
| 873 | } | 863 | } |
| 874 | 864 | ||
| 875 | test "sorting a span" { | 865 | test "sorting a span" { |
| 876 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 877 | |||
| 878 | var list: MultiArrayList(struct { score: u32, chr: u8 }) = .{}; | 866 | var list: MultiArrayList(struct { score: u32, chr: u8 }) = .{}; |
| 879 | defer list.deinit(testing.allocator); | 867 | defer list.deinit(testing.allocator); |
| 880 | 868 | ||
| ... | @@ -915,8 +903,6 @@ test "sorting a span" { | ... | @@ -915,8 +903,6 @@ test "sorting a span" { |
| 915 | } | 903 | } |
| 916 | 904 | ||
| 917 | test "0 sized struct field" { | 905 | test "0 sized struct field" { |
| 918 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 919 | |||
| 920 | const ally = testing.allocator; | 906 | const ally = testing.allocator; |
| 921 | 907 | ||
| 922 | const Foo = struct { | 908 | const Foo = struct { |
| ... | @@ -944,8 +930,6 @@ test "0 sized struct field" { | ... | @@ -944,8 +930,6 @@ test "0 sized struct field" { |
| 944 | } | 930 | } |
| 945 | 931 | ||
| 946 | test "0 sized struct" { | 932 | test "0 sized struct" { |
| 947 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 948 | |||
| 949 | const ally = testing.allocator; | 933 | const ally = testing.allocator; |
| 950 | 934 | ||
| 951 | const Foo = struct { | 935 | const Foo = struct { |
lib/std/net/test.zig-6| ... | @@ -5,7 +5,6 @@ const mem = std.mem; | ... | @@ -5,7 +5,6 @@ const mem = std.mem; |
| 5 | const testing = std.testing; | 5 | const testing = std.testing; |
| 6 | 6 | ||
| 7 | test "parse and render IPv6 addresses" { | 7 | test "parse and render IPv6 addresses" { |
| 8 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 9 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 8 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 10 | 9 | ||
| 11 | var buffer: [100]u8 = undefined; | 10 | var buffer: [100]u8 = undefined; |
| ... | @@ -71,7 +70,6 @@ test "invalid but parseable IPv6 scope ids" { | ... | @@ -71,7 +70,6 @@ test "invalid but parseable IPv6 scope ids" { |
| 71 | } | 70 | } |
| 72 | 71 | ||
| 73 | test "parse and render IPv4 addresses" { | 72 | test "parse and render IPv4 addresses" { |
| 74 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 75 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 73 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 76 | 74 | ||
| 77 | var buffer: [18]u8 = undefined; | 75 | var buffer: [18]u8 = undefined; |
| ... | @@ -111,8 +109,6 @@ test "parse and render UNIX addresses" { | ... | @@ -111,8 +109,6 @@ test "parse and render UNIX addresses" { |
| 111 | test "resolve DNS" { | 109 | test "resolve DNS" { |
| 112 | if (builtin.os.tag == .wasi) return error.SkipZigTest; | 110 | if (builtin.os.tag == .wasi) return error.SkipZigTest; |
| 113 | 111 | ||
| 114 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 115 | |||
| 116 | if (builtin.os.tag == .windows) { | 112 | if (builtin.os.tag == .windows) { |
| 117 | _ = try std.os.windows.WSAStartup(2, 2); | 113 | _ = try std.os.windows.WSAStartup(2, 2); |
| 118 | } | 114 | } |
| ... | @@ -295,8 +291,6 @@ test "listen on a unix socket, send bytes, receive bytes" { | ... | @@ -295,8 +291,6 @@ test "listen on a unix socket, send bytes, receive bytes" { |
| 295 | if (builtin.single_threaded) return error.SkipZigTest; | 291 | if (builtin.single_threaded) return error.SkipZigTest; |
| 296 | if (!net.has_unix_sockets) return error.SkipZigTest; | 292 | if (!net.has_unix_sockets) return error.SkipZigTest; |
| 297 | 293 | ||
| 298 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 299 | |||
| 300 | if (builtin.os.tag == .windows) { | 294 | if (builtin.os.tag == .windows) { |
| 301 | _ = try std.os.windows.WSAStartup(2, 2); | 295 | _ = try std.os.windows.WSAStartup(2, 2); |
| 302 | } | 296 | } |
lib/std/once.zig-2| ... | @@ -46,8 +46,6 @@ fn incr() void { | ... | @@ -46,8 +46,6 @@ fn incr() void { |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | test "Once executes its function just once" { | 48 | test "Once executes its function just once" { |
| 49 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 50 | |||
| 51 | if (builtin.single_threaded) { | 49 | if (builtin.single_threaded) { |
| 52 | global_once.call(); | 50 | global_once.call(); |
| 53 | global_once.call(); | 51 | global_once.call(); |
lib/std/os/linux/io_uring.zig-30| ... | @@ -1741,8 +1741,6 @@ test "readv" { | ... | @@ -1741,8 +1741,6 @@ test "readv" { |
| 1741 | test "writev/fsync/readv" { | 1741 | test "writev/fsync/readv" { |
| 1742 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 1742 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 1743 | 1743 | ||
| 1744 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1745 | |||
| 1746 | var ring = IO_Uring.init(4, 0) catch |err| switch (err) { | 1744 | var ring = IO_Uring.init(4, 0) catch |err| switch (err) { |
| 1747 | error.SystemOutdated => return error.SkipZigTest, | 1745 | error.SystemOutdated => return error.SkipZigTest, |
| 1748 | error.PermissionDenied => return error.SkipZigTest, | 1746 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -1813,8 +1811,6 @@ test "writev/fsync/readv" { | ... | @@ -1813,8 +1811,6 @@ test "writev/fsync/readv" { |
| 1813 | test "write/read" { | 1811 | test "write/read" { |
| 1814 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 1812 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 1815 | 1813 | ||
| 1816 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1817 | |||
| 1818 | var ring = IO_Uring.init(2, 0) catch |err| switch (err) { | 1814 | var ring = IO_Uring.init(2, 0) catch |err| switch (err) { |
| 1819 | error.SystemOutdated => return error.SkipZigTest, | 1815 | error.SystemOutdated => return error.SkipZigTest, |
| 1820 | error.PermissionDenied => return error.SkipZigTest, | 1816 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -1862,8 +1858,6 @@ test "write/read" { | ... | @@ -1862,8 +1858,6 @@ test "write/read" { |
| 1862 | test "splice/read" { | 1858 | test "splice/read" { |
| 1863 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 1859 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 1864 | 1860 | ||
| 1865 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1866 | |||
| 1867 | var ring = IO_Uring.init(4, 0) catch |err| switch (err) { | 1861 | var ring = IO_Uring.init(4, 0) catch |err| switch (err) { |
| 1868 | error.SystemOutdated => return error.SkipZigTest, | 1862 | error.SystemOutdated => return error.SkipZigTest, |
| 1869 | error.PermissionDenied => return error.SkipZigTest, | 1863 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -1935,8 +1929,6 @@ test "splice/read" { | ... | @@ -1935,8 +1929,6 @@ test "splice/read" { |
| 1935 | test "write_fixed/read_fixed" { | 1929 | test "write_fixed/read_fixed" { |
| 1936 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 1930 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 1937 | 1931 | ||
| 1938 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1939 | |||
| 1940 | var ring = IO_Uring.init(2, 0) catch |err| switch (err) { | 1932 | var ring = IO_Uring.init(2, 0) catch |err| switch (err) { |
| 1941 | error.SystemOutdated => return error.SkipZigTest, | 1933 | error.SystemOutdated => return error.SkipZigTest, |
| 1942 | error.PermissionDenied => return error.SkipZigTest, | 1934 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2002,8 +1994,6 @@ test "write_fixed/read_fixed" { | ... | @@ -2002,8 +1994,6 @@ test "write_fixed/read_fixed" { |
| 2002 | test "openat" { | 1994 | test "openat" { |
| 2003 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 1995 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2004 | 1996 | ||
| 2005 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2006 | |||
| 2007 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 1997 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2008 | error.SystemOutdated => return error.SkipZigTest, | 1998 | error.SystemOutdated => return error.SkipZigTest, |
| 2009 | error.PermissionDenied => return error.SkipZigTest, | 1999 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2055,8 +2045,6 @@ test "openat" { | ... | @@ -2055,8 +2045,6 @@ test "openat" { |
| 2055 | test "close" { | 2045 | test "close" { |
| 2056 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2046 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2057 | 2047 | ||
| 2058 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2059 | |||
| 2060 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 2048 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2061 | error.SystemOutdated => return error.SkipZigTest, | 2049 | error.SystemOutdated => return error.SkipZigTest, |
| 2062 | error.PermissionDenied => return error.SkipZigTest, | 2050 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2216,8 +2204,6 @@ test "sendmsg/recvmsg" { | ... | @@ -2216,8 +2204,6 @@ test "sendmsg/recvmsg" { |
| 2216 | test "timeout (after a relative time)" { | 2204 | test "timeout (after a relative time)" { |
| 2217 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2205 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2218 | 2206 | ||
| 2219 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2220 | |||
| 2221 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 2207 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2222 | error.SystemOutdated => return error.SkipZigTest, | 2208 | error.SystemOutdated => return error.SkipZigTest, |
| 2223 | error.PermissionDenied => return error.SkipZigTest, | 2209 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2282,8 +2268,6 @@ test "timeout (after a number of completions)" { | ... | @@ -2282,8 +2268,6 @@ test "timeout (after a number of completions)" { |
| 2282 | test "timeout_remove" { | 2268 | test "timeout_remove" { |
| 2283 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2269 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2284 | 2270 | ||
| 2285 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2286 | |||
| 2287 | var ring = IO_Uring.init(2, 0) catch |err| switch (err) { | 2271 | var ring = IO_Uring.init(2, 0) catch |err| switch (err) { |
| 2288 | error.SystemOutdated => return error.SkipZigTest, | 2272 | error.SystemOutdated => return error.SkipZigTest, |
| 2289 | error.PermissionDenied => return error.SkipZigTest, | 2273 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2392,8 +2376,6 @@ test "accept/connect/recv/link_timeout" { | ... | @@ -2392,8 +2376,6 @@ test "accept/connect/recv/link_timeout" { |
| 2392 | test "fallocate" { | 2376 | test "fallocate" { |
| 2393 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2377 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2394 | 2378 | ||
| 2395 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2396 | |||
| 2397 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 2379 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2398 | error.SystemOutdated => return error.SkipZigTest, | 2380 | error.SystemOutdated => return error.SkipZigTest, |
| 2399 | error.PermissionDenied => return error.SkipZigTest, | 2381 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2440,8 +2422,6 @@ test "fallocate" { | ... | @@ -2440,8 +2422,6 @@ test "fallocate" { |
| 2440 | test "statx" { | 2422 | test "statx" { |
| 2441 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2423 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2442 | 2424 | ||
| 2443 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2444 | |||
| 2445 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 2425 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2446 | error.SystemOutdated => return error.SkipZigTest, | 2426 | error.SystemOutdated => return error.SkipZigTest, |
| 2447 | error.PermissionDenied => return error.SkipZigTest, | 2427 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2698,8 +2678,6 @@ test "shutdown" { | ... | @@ -2698,8 +2678,6 @@ test "shutdown" { |
| 2698 | test "renameat" { | 2678 | test "renameat" { |
| 2699 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2679 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2700 | 2680 | ||
| 2701 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2702 | |||
| 2703 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 2681 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2704 | error.SystemOutdated => return error.SkipZigTest, | 2682 | error.SystemOutdated => return error.SkipZigTest, |
| 2705 | error.PermissionDenied => return error.SkipZigTest, | 2683 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2769,8 +2747,6 @@ test "renameat" { | ... | @@ -2769,8 +2747,6 @@ test "renameat" { |
| 2769 | test "unlinkat" { | 2747 | test "unlinkat" { |
| 2770 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2748 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2771 | 2749 | ||
| 2772 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2773 | |||
| 2774 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 2750 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2775 | error.SystemOutdated => return error.SkipZigTest, | 2751 | error.SystemOutdated => return error.SkipZigTest, |
| 2776 | error.PermissionDenied => return error.SkipZigTest, | 2752 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2823,8 +2799,6 @@ test "unlinkat" { | ... | @@ -2823,8 +2799,6 @@ test "unlinkat" { |
| 2823 | test "mkdirat" { | 2799 | test "mkdirat" { |
| 2824 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2800 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2825 | 2801 | ||
| 2826 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2827 | |||
| 2828 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 2802 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2829 | error.SystemOutdated => return error.SkipZigTest, | 2803 | error.SystemOutdated => return error.SkipZigTest, |
| 2830 | error.PermissionDenied => return error.SkipZigTest, | 2804 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2869,8 +2843,6 @@ test "mkdirat" { | ... | @@ -2869,8 +2843,6 @@ test "mkdirat" { |
| 2869 | test "symlinkat" { | 2843 | test "symlinkat" { |
| 2870 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2844 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2871 | 2845 | ||
| 2872 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2873 | |||
| 2874 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 2846 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2875 | error.SystemOutdated => return error.SkipZigTest, | 2847 | error.SystemOutdated => return error.SkipZigTest, |
| 2876 | error.PermissionDenied => return error.SkipZigTest, | 2848 | error.PermissionDenied => return error.SkipZigTest, |
| ... | @@ -2919,8 +2891,6 @@ test "symlinkat" { | ... | @@ -2919,8 +2891,6 @@ test "symlinkat" { |
| 2919 | test "linkat" { | 2891 | test "linkat" { |
| 2920 | if (builtin.os.tag != .linux) return error.SkipZigTest; | 2892 | if (builtin.os.tag != .linux) return error.SkipZigTest; |
| 2921 | 2893 | ||
| 2922 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2923 | |||
| 2924 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { | 2894 | var ring = IO_Uring.init(1, 0) catch |err| switch (err) { |
| 2925 | error.SystemOutdated => return error.SkipZigTest, | 2895 | error.SystemOutdated => return error.SkipZigTest, |
| 2926 | error.PermissionDenied => return error.SkipZigTest, | 2896 | error.PermissionDenied => return error.SkipZigTest, |
lib/std/os/linux/test.zig-6| ... | @@ -8,8 +8,6 @@ const expectEqual = std.testing.expectEqual; | ... | @@ -8,8 +8,6 @@ const expectEqual = std.testing.expectEqual; |
| 8 | const fs = std.fs; | 8 | const fs = std.fs; |
| 9 | 9 | ||
| 10 | test "fallocate" { | 10 | test "fallocate" { |
| 11 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 12 | |||
| 13 | var tmp = std.testing.tmpDir(.{}); | 11 | var tmp = std.testing.tmpDir(.{}); |
| 14 | defer tmp.cleanup(); | 12 | defer tmp.cleanup(); |
| 15 | 13 | ||
| ... | @@ -71,8 +69,6 @@ test "timer" { | ... | @@ -71,8 +69,6 @@ test "timer" { |
| 71 | } | 69 | } |
| 72 | 70 | ||
| 73 | test "statx" { | 71 | test "statx" { |
| 74 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 75 | |||
| 76 | var tmp = std.testing.tmpDir(.{}); | 72 | var tmp = std.testing.tmpDir(.{}); |
| 77 | defer tmp.cleanup(); | 73 | defer tmp.cleanup(); |
| 78 | 74 | ||
| ... | @@ -111,8 +107,6 @@ test "user and group ids" { | ... | @@ -111,8 +107,6 @@ test "user and group ids" { |
| 111 | } | 107 | } |
| 112 | 108 | ||
| 113 | test "fadvise" { | 109 | test "fadvise" { |
| 114 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 115 | |||
| 116 | var tmp = std.testing.tmpDir(.{}); | 110 | var tmp = std.testing.tmpDir(.{}); |
| 117 | defer tmp.cleanup(); | 111 | defer tmp.cleanup(); |
| 118 | 112 |
lib/std/os/test.zig-51| ... | @@ -88,8 +88,6 @@ test "chdir smoke test" { | ... | @@ -88,8 +88,6 @@ test "chdir smoke test" { |
| 88 | test "open smoke test" { | 88 | test "open smoke test" { |
| 89 | if (native_os == .wasi) return error.SkipZigTest; | 89 | if (native_os == .wasi) return error.SkipZigTest; |
| 90 | 90 | ||
| 91 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 92 | |||
| 93 | // TODO verify file attributes using `fstat` | 91 | // TODO verify file attributes using `fstat` |
| 94 | 92 | ||
| 95 | var tmp = tmpDir(.{}); | 93 | var tmp = tmpDir(.{}); |
| ... | @@ -144,8 +142,6 @@ test "open smoke test" { | ... | @@ -144,8 +142,6 @@ test "open smoke test" { |
| 144 | test "openat smoke test" { | 142 | test "openat smoke test" { |
| 145 | if (native_os == .wasi and builtin.link_libc) return error.SkipZigTest; | 143 | if (native_os == .wasi and builtin.link_libc) return error.SkipZigTest; |
| 146 | 144 | ||
| 147 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 148 | |||
| 149 | // TODO verify file attributes using `fstatat` | 145 | // TODO verify file attributes using `fstatat` |
| 150 | 146 | ||
| 151 | var tmp = tmpDir(.{}); | 147 | var tmp = tmpDir(.{}); |
| ... | @@ -280,8 +276,6 @@ test "link with relative paths" { | ... | @@ -280,8 +276,6 @@ test "link with relative paths" { |
| 280 | test "linkat with different directories" { | 276 | test "linkat with different directories" { |
| 281 | if (native_os == .wasi and builtin.link_libc) return error.SkipZigTest; | 277 | if (native_os == .wasi and builtin.link_libc) return error.SkipZigTest; |
| 282 | 278 | ||
| 283 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 284 | |||
| 285 | switch (native_os) { | 279 | switch (native_os) { |
| 286 | .wasi, .linux, .solaris, .illumos => {}, | 280 | .wasi, .linux, .solaris, .illumos => {}, |
| 287 | else => return error.SkipZigTest, | 281 | else => return error.SkipZigTest, |
| ... | @@ -327,8 +321,6 @@ test "fstatat" { | ... | @@ -327,8 +321,6 @@ test "fstatat" { |
| 327 | // enable when `fstat` and `fstatat` are implemented on Windows | 321 | // enable when `fstat` and `fstatat` are implemented on Windows |
| 328 | if (native_os == .windows) return error.SkipZigTest; | 322 | if (native_os == .windows) return error.SkipZigTest; |
| 329 | 323 | ||
| 330 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 331 | |||
| 332 | var tmp = tmpDir(.{}); | 324 | var tmp = tmpDir(.{}); |
| 333 | defer tmp.cleanup(); | 325 | defer tmp.cleanup(); |
| 334 | 326 | ||
| ... | @@ -348,8 +340,6 @@ test "fstatat" { | ... | @@ -348,8 +340,6 @@ test "fstatat" { |
| 348 | } | 340 | } |
| 349 | 341 | ||
| 350 | test "readlinkat" { | 342 | test "readlinkat" { |
| 351 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 352 | |||
| 353 | var tmp = tmpDir(.{}); | 343 | var tmp = tmpDir(.{}); |
| 354 | defer tmp.cleanup(); | 344 | defer tmp.cleanup(); |
| 355 | 345 | ||
| ... | @@ -385,8 +375,6 @@ fn testThreadIdFn(thread_id: *Thread.Id) void { | ... | @@ -385,8 +375,6 @@ fn testThreadIdFn(thread_id: *Thread.Id) void { |
| 385 | test "std.Thread.getCurrentId" { | 375 | test "std.Thread.getCurrentId" { |
| 386 | if (builtin.single_threaded) return error.SkipZigTest; | 376 | if (builtin.single_threaded) return error.SkipZigTest; |
| 387 | 377 | ||
| 388 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 389 | |||
| 390 | var thread_current_id: Thread.Id = undefined; | 378 | var thread_current_id: Thread.Id = undefined; |
| 391 | const thread = try Thread.spawn(.{}, testThreadIdFn, .{&thread_current_id}); | 379 | const thread = try Thread.spawn(.{}, testThreadIdFn, .{&thread_current_id}); |
| 392 | thread.join(); | 380 | thread.join(); |
| ... | @@ -429,9 +417,6 @@ test "cpu count" { | ... | @@ -429,9 +417,6 @@ test "cpu count" { |
| 429 | 417 | ||
| 430 | test "thread local storage" { | 418 | test "thread local storage" { |
| 431 | if (builtin.single_threaded) return error.SkipZigTest; | 419 | if (builtin.single_threaded) return error.SkipZigTest; |
| 432 | |||
| 433 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 434 | |||
| 435 | const thread1 = try Thread.spawn(.{}, testTls, .{}); | 420 | const thread1 = try Thread.spawn(.{}, testTls, .{}); |
| 436 | const thread2 = try Thread.spawn(.{}, testTls, .{}); | 421 | const thread2 = try Thread.spawn(.{}, testTls, .{}); |
| 437 | try testTls(); | 422 | try testTls(); |
| ... | @@ -519,8 +504,6 @@ fn iter_fn(info: *dl_phdr_info, size: usize, counter: *usize) IterFnError!void { | ... | @@ -519,8 +504,6 @@ fn iter_fn(info: *dl_phdr_info, size: usize, counter: *usize) IterFnError!void { |
| 519 | test "dl_iterate_phdr" { | 504 | test "dl_iterate_phdr" { |
| 520 | if (builtin.object_format != .elf) return error.SkipZigTest; | 505 | if (builtin.object_format != .elf) return error.SkipZigTest; |
| 521 | 506 | ||
| 522 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 523 | |||
| 524 | var counter: usize = 0; | 507 | var counter: usize = 0; |
| 525 | try os.dl_iterate_phdr(&counter, IterFnError, iter_fn); | 508 | try os.dl_iterate_phdr(&counter, IterFnError, iter_fn); |
| 526 | try expect(counter != 0); | 509 | try expect(counter != 0); |
| ... | @@ -583,8 +566,6 @@ test "mmap" { | ... | @@ -583,8 +566,6 @@ test "mmap" { |
| 583 | if (native_os == .windows or native_os == .wasi) | 566 | if (native_os == .windows or native_os == .wasi) |
| 584 | return error.SkipZigTest; | 567 | return error.SkipZigTest; |
| 585 | 568 | ||
| 586 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 587 | |||
| 588 | var tmp = tmpDir(.{}); | 569 | var tmp = tmpDir(.{}); |
| 589 | defer tmp.cleanup(); | 570 | defer tmp.cleanup(); |
| 590 | 571 | ||
| ... | @@ -695,8 +676,6 @@ test "fcntl" { | ... | @@ -695,8 +676,6 @@ test "fcntl" { |
| 695 | if (native_os == .windows or native_os == .wasi) | 676 | if (native_os == .windows or native_os == .wasi) |
| 696 | return error.SkipZigTest; | 677 | return error.SkipZigTest; |
| 697 | 678 | ||
| 698 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 699 | |||
| 700 | var tmp = tmpDir(.{}); | 679 | var tmp = tmpDir(.{}); |
| 701 | defer tmp.cleanup(); | 680 | defer tmp.cleanup(); |
| 702 | 681 | ||
| ... | @@ -737,8 +716,6 @@ test "sync" { | ... | @@ -737,8 +716,6 @@ test "sync" { |
| 737 | if (native_os != .linux) | 716 | if (native_os != .linux) |
| 738 | return error.SkipZigTest; | 717 | return error.SkipZigTest; |
| 739 | 718 | ||
| 740 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 741 | |||
| 742 | var tmp = tmpDir(.{}); | 719 | var tmp = tmpDir(.{}); |
| 743 | defer tmp.cleanup(); | 720 | defer tmp.cleanup(); |
| 744 | 721 | ||
| ... | @@ -759,8 +736,6 @@ test "fsync" { | ... | @@ -759,8 +736,6 @@ test "fsync" { |
| 759 | else => return error.SkipZigTest, | 736 | else => return error.SkipZigTest, |
| 760 | } | 737 | } |
| 761 | 738 | ||
| 762 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 763 | |||
| 764 | var tmp = tmpDir(.{}); | 739 | var tmp = tmpDir(.{}); |
| 765 | defer tmp.cleanup(); | 740 | defer tmp.cleanup(); |
| 766 | 741 | ||
| ... | @@ -780,8 +755,6 @@ test "getrlimit and setrlimit" { | ... | @@ -780,8 +755,6 @@ test "getrlimit and setrlimit" { |
| 780 | return error.SkipZigTest; | 755 | return error.SkipZigTest; |
| 781 | } | 756 | } |
| 782 | 757 | ||
| 783 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 784 | |||
| 785 | inline for (std.meta.fields(os.rlimit_resource)) |field| { | 758 | inline for (std.meta.fields(os.rlimit_resource)) |field| { |
| 786 | const resource = @as(os.rlimit_resource, @enumFromInt(field.value)); | 759 | const resource = @as(os.rlimit_resource, @enumFromInt(field.value)); |
| 787 | const limit = try os.getrlimit(resource); | 760 | const limit = try os.getrlimit(resource); |
| ... | @@ -824,8 +797,6 @@ test "sigaction" { | ... | @@ -824,8 +797,6 @@ test "sigaction" { |
| 824 | if (native_os == .wasi or native_os == .windows) | 797 | if (native_os == .wasi or native_os == .windows) |
| 825 | return error.SkipZigTest; | 798 | return error.SkipZigTest; |
| 826 | 799 | ||
| 827 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 828 | |||
| 829 | // https://github.com/ziglang/zig/issues/7427 | 800 | // https://github.com/ziglang/zig/issues/7427 |
| 830 | if (native_os == .linux and builtin.target.cpu.arch == .x86) | 801 | if (native_os == .linux and builtin.target.cpu.arch == .x86) |
| 831 | return error.SkipZigTest; | 802 | return error.SkipZigTest; |
| ... | @@ -903,8 +874,6 @@ test "dup & dup2" { | ... | @@ -903,8 +874,6 @@ test "dup & dup2" { |
| 903 | else => return error.SkipZigTest, | 874 | else => return error.SkipZigTest, |
| 904 | } | 875 | } |
| 905 | 876 | ||
| 906 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 907 | |||
| 908 | var tmp = tmpDir(.{}); | 877 | var tmp = tmpDir(.{}); |
| 909 | defer tmp.cleanup(); | 878 | defer tmp.cleanup(); |
| 910 | 879 | ||
| ... | @@ -934,8 +903,6 @@ test "dup & dup2" { | ... | @@ -934,8 +903,6 @@ test "dup & dup2" { |
| 934 | test "writev longer than IOV_MAX" { | 903 | test "writev longer than IOV_MAX" { |
| 935 | if (native_os == .windows or native_os == .wasi) return error.SkipZigTest; | 904 | if (native_os == .windows or native_os == .wasi) return error.SkipZigTest; |
| 936 | 905 | ||
| 937 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 938 | |||
| 939 | var tmp = tmpDir(.{}); | 906 | var tmp = tmpDir(.{}); |
| 940 | defer tmp.cleanup(); | 907 | defer tmp.cleanup(); |
| 941 | 908 | ||
| ... | @@ -953,8 +920,6 @@ test "POSIX file locking with fcntl" { | ... | @@ -953,8 +920,6 @@ test "POSIX file locking with fcntl" { |
| 953 | return error.SkipZigTest; | 920 | return error.SkipZigTest; |
| 954 | } | 921 | } |
| 955 | 922 | ||
| 956 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 957 | |||
| 958 | if (true) { | 923 | if (true) { |
| 959 | // https://github.com/ziglang/zig/issues/11074 | 924 | // https://github.com/ziglang/zig/issues/11074 |
| 960 | return error.SkipZigTest; | 925 | return error.SkipZigTest; |
| ... | @@ -1017,8 +982,6 @@ test "POSIX file locking with fcntl" { | ... | @@ -1017,8 +982,6 @@ test "POSIX file locking with fcntl" { |
| 1017 | test "rename smoke test" { | 982 | test "rename smoke test" { |
| 1018 | if (native_os == .wasi) return error.SkipZigTest; | 983 | if (native_os == .wasi) return error.SkipZigTest; |
| 1019 | 984 | ||
| 1020 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1021 | |||
| 1022 | var tmp = tmpDir(.{}); | 985 | var tmp = tmpDir(.{}); |
| 1023 | defer tmp.cleanup(); | 986 | defer tmp.cleanup(); |
| 1024 | 987 | ||
| ... | @@ -1075,8 +1038,6 @@ test "rename smoke test" { | ... | @@ -1075,8 +1038,6 @@ test "rename smoke test" { |
| 1075 | test "access smoke test" { | 1038 | test "access smoke test" { |
| 1076 | if (native_os == .wasi) return error.SkipZigTest; | 1039 | if (native_os == .wasi) return error.SkipZigTest; |
| 1077 | 1040 | ||
| 1078 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1079 | |||
| 1080 | var tmp = tmpDir(.{}); | 1041 | var tmp = tmpDir(.{}); |
| 1081 | defer tmp.cleanup(); | 1042 | defer tmp.cleanup(); |
| 1082 | 1043 | ||
| ... | @@ -1141,8 +1102,6 @@ test "timerfd" { | ... | @@ -1141,8 +1102,6 @@ test "timerfd" { |
| 1141 | } | 1102 | } |
| 1142 | 1103 | ||
| 1143 | test "isatty" { | 1104 | test "isatty" { |
| 1144 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1145 | |||
| 1146 | var tmp = tmpDir(.{}); | 1105 | var tmp = tmpDir(.{}); |
| 1147 | defer tmp.cleanup(); | 1106 | defer tmp.cleanup(); |
| 1148 | 1107 | ||
| ... | @@ -1155,8 +1114,6 @@ test "isatty" { | ... | @@ -1155,8 +1114,6 @@ test "isatty" { |
| 1155 | test "read with empty buffer" { | 1114 | test "read with empty buffer" { |
| 1156 | if (native_os == .wasi) return error.SkipZigTest; | 1115 | if (native_os == .wasi) return error.SkipZigTest; |
| 1157 | 1116 | ||
| 1158 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1159 | |||
| 1160 | var tmp = tmpDir(.{}); | 1117 | var tmp = tmpDir(.{}); |
| 1161 | defer tmp.cleanup(); | 1118 | defer tmp.cleanup(); |
| 1162 | 1119 | ||
| ... | @@ -1182,8 +1139,6 @@ test "read with empty buffer" { | ... | @@ -1182,8 +1139,6 @@ test "read with empty buffer" { |
| 1182 | test "pread with empty buffer" { | 1139 | test "pread with empty buffer" { |
| 1183 | if (native_os == .wasi) return error.SkipZigTest; | 1140 | if (native_os == .wasi) return error.SkipZigTest; |
| 1184 | 1141 | ||
| 1185 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1186 | |||
| 1187 | var tmp = tmpDir(.{}); | 1142 | var tmp = tmpDir(.{}); |
| 1188 | defer tmp.cleanup(); | 1143 | defer tmp.cleanup(); |
| 1189 | 1144 | ||
| ... | @@ -1209,8 +1164,6 @@ test "pread with empty buffer" { | ... | @@ -1209,8 +1164,6 @@ test "pread with empty buffer" { |
| 1209 | test "write with empty buffer" { | 1164 | test "write with empty buffer" { |
| 1210 | if (native_os == .wasi) return error.SkipZigTest; | 1165 | if (native_os == .wasi) return error.SkipZigTest; |
| 1211 | 1166 | ||
| 1212 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1213 | |||
| 1214 | var tmp = tmpDir(.{}); | 1167 | var tmp = tmpDir(.{}); |
| 1215 | defer tmp.cleanup(); | 1168 | defer tmp.cleanup(); |
| 1216 | 1169 | ||
| ... | @@ -1236,8 +1189,6 @@ test "write with empty buffer" { | ... | @@ -1236,8 +1189,6 @@ test "write with empty buffer" { |
| 1236 | test "pwrite with empty buffer" { | 1189 | test "pwrite with empty buffer" { |
| 1237 | if (native_os == .wasi) return error.SkipZigTest; | 1190 | if (native_os == .wasi) return error.SkipZigTest; |
| 1238 | 1191 | ||
| 1239 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1240 | |||
| 1241 | var tmp = tmpDir(.{}); | 1192 | var tmp = tmpDir(.{}); |
| 1242 | defer tmp.cleanup(); | 1193 | defer tmp.cleanup(); |
| 1243 | 1194 | ||
| ... | @@ -1263,8 +1214,6 @@ test "pwrite with empty buffer" { | ... | @@ -1263,8 +1214,6 @@ test "pwrite with empty buffer" { |
| 1263 | test "fchmodat smoke test" { | 1214 | test "fchmodat smoke test" { |
| 1264 | if (!std.fs.has_executable_bit) return error.SkipZigTest; | 1215 | if (!std.fs.has_executable_bit) return error.SkipZigTest; |
| 1265 | 1216 | ||
| 1266 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1267 | |||
| 1268 | var tmp = tmpDir(.{}); | 1217 | var tmp = tmpDir(.{}); |
| 1269 | defer tmp.cleanup(); | 1218 | defer tmp.cleanup(); |
| 1270 | 1219 |
lib/std/os/windows.zig-2| ... | @@ -2491,8 +2491,6 @@ pub fn ntToWin32Namespace(path: []const u16) !PathSpace { | ... | @@ -2491,8 +2491,6 @@ pub fn ntToWin32Namespace(path: []const u16) !PathSpace { |
| 2491 | } | 2491 | } |
| 2492 | 2492 | ||
| 2493 | test "ntToWin32Namespace" { | 2493 | test "ntToWin32Namespace" { |
| 2494 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2495 | |||
| 2496 | const L = std.unicode.utf8ToUtf16LeStringLiteral; | 2494 | const L = std.unicode.utf8ToUtf16LeStringLiteral; |
| 2497 | 2495 | ||
| 2498 | try testNtToWin32Namespace(L("UNC"), L("\\??\\UNC")); | 2496 | try testNtToWin32Namespace(L("UNC"), L("\\??\\UNC")); |
lib/std/priority_dequeue.zig-2| ... | @@ -705,8 +705,6 @@ test "std.PriorityDequeue: fromOwnedSlice trivial case 1" { | ... | @@ -705,8 +705,6 @@ test "std.PriorityDequeue: fromOwnedSlice trivial case 1" { |
| 705 | } | 705 | } |
| 706 | 706 | ||
| 707 | test "std.PriorityDequeue: fromOwnedSlice" { | 707 | test "std.PriorityDequeue: fromOwnedSlice" { |
| 708 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 709 | |||
| 710 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; | 708 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; |
| 711 | const queue_items = try testing.allocator.dupe(u32, items[0..]); | 709 | const queue_items = try testing.allocator.dupe(u32, items[0..]); |
| 712 | var queue = PDQ.fromOwnedSlice(testing.allocator, queue_items[0..], {}); | 710 | var queue = PDQ.fromOwnedSlice(testing.allocator, queue_items[0..], {}); |
lib/std/priority_queue.zig-2| ... | @@ -385,8 +385,6 @@ test "std.PriorityQueue: fromOwnedSlice trivial case 1" { | ... | @@ -385,8 +385,6 @@ test "std.PriorityQueue: fromOwnedSlice trivial case 1" { |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | test "std.PriorityQueue: fromOwnedSlice" { | 387 | test "std.PriorityQueue: fromOwnedSlice" { |
| 388 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 389 | |||
| 390 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; | 388 | const items = [_]u32{ 15, 7, 21, 14, 13, 22, 12, 6, 7, 25, 5, 24, 11, 16, 15, 24, 2, 1 }; |
| 391 | const heap_items = try testing.allocator.dupe(u32, items[0..]); | 389 | const heap_items = try testing.allocator.dupe(u32, items[0..]); |
| 392 | var queue = PQlt.fromOwnedSlice(testing.allocator, heap_items[0..], {}); | 390 | var queue = PQlt.fromOwnedSlice(testing.allocator, heap_items[0..], {}); |
lib/std/rand/Xoshiro256.zig+1-4| ... | @@ -90,10 +90,7 @@ pub fn fill(self: *Xoshiro256, buf: []u8) void { | ... | @@ -90,10 +90,7 @@ pub fn fill(self: *Xoshiro256, buf: []u8) void { |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | test "xoroshiro sequence" { | 92 | test "xoroshiro sequence" { |
| 93 | switch (@import("builtin").zig_backend) { | 93 | if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest; |
| 94 | .stage2_c, .stage2_x86_64 => return error.SkipZigTest, | ||
| 95 | else => {}, | ||
| 96 | } | ||
| 97 | 94 | ||
| 98 | var r = Xoshiro256.init(0); | 95 | var r = Xoshiro256.init(0); |
| 99 | 96 |
lib/std/rand/test.zig-11| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("../std.zig"); | 1 | const std = @import("../std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const math = std.math; | 2 | const math = std.math; |
| 4 | const DefaultPrng = std.rand.DefaultPrng; | 3 | const DefaultPrng = std.rand.DefaultPrng; |
| 5 | const Random = std.rand.Random; | 4 | const Random = std.rand.Random; |
| ... | @@ -158,8 +157,6 @@ fn testRandomEnumValue() !void { | ... | @@ -158,8 +157,6 @@ fn testRandomEnumValue() !void { |
| 158 | } | 157 | } |
| 159 | 158 | ||
| 160 | test "Random intLessThan" { | 159 | test "Random intLessThan" { |
| 161 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 162 | |||
| 163 | @setEvalBranchQuota(10000); | 160 | @setEvalBranchQuota(10000); |
| 164 | try testRandomIntLessThan(); | 161 | try testRandomIntLessThan(); |
| 165 | try comptime testRandomIntLessThan(); | 162 | try comptime testRandomIntLessThan(); |
| ... | @@ -202,8 +199,6 @@ fn testRandomIntLessThan() !void { | ... | @@ -202,8 +199,6 @@ fn testRandomIntLessThan() !void { |
| 202 | } | 199 | } |
| 203 | 200 | ||
| 204 | test "Random intAtMost" { | 201 | test "Random intAtMost" { |
| 205 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 206 | |||
| 207 | @setEvalBranchQuota(10000); | 202 | @setEvalBranchQuota(10000); |
| 208 | try testRandomIntAtMost(); | 203 | try testRandomIntAtMost(); |
| 209 | try comptime testRandomIntAtMost(); | 204 | try comptime testRandomIntAtMost(); |
| ... | @@ -244,8 +239,6 @@ fn testRandomIntAtMost() !void { | ... | @@ -244,8 +239,6 @@ fn testRandomIntAtMost() !void { |
| 244 | } | 239 | } |
| 245 | 240 | ||
| 246 | test "Random Biased" { | 241 | test "Random Biased" { |
| 247 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 248 | |||
| 249 | var prng = DefaultPrng.init(0); | 242 | var prng = DefaultPrng.init(0); |
| 250 | const random = prng.random(); | 243 | const random = prng.random(); |
| 251 | // Not thoroughly checking the logic here. | 244 | // Not thoroughly checking the logic here. |
| ... | @@ -443,8 +436,6 @@ fn testRangeBias(r: Random, start: i8, end: i8, biased: bool) !void { | ... | @@ -443,8 +436,6 @@ fn testRangeBias(r: Random, start: i8, end: i8, biased: bool) !void { |
| 443 | } | 436 | } |
| 444 | 437 | ||
| 445 | test "CSPRNG" { | 438 | test "CSPRNG" { |
| 446 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 447 | |||
| 448 | var secret_seed: [DefaultCsprng.secret_seed_length]u8 = undefined; | 439 | var secret_seed: [DefaultCsprng.secret_seed_length]u8 = undefined; |
| 449 | std.crypto.random.bytes(&secret_seed); | 440 | std.crypto.random.bytes(&secret_seed); |
| 450 | var csprng = DefaultCsprng.init(secret_seed); | 441 | var csprng = DefaultCsprng.init(secret_seed); |
| ... | @@ -456,8 +447,6 @@ test "CSPRNG" { | ... | @@ -456,8 +447,6 @@ test "CSPRNG" { |
| 456 | } | 447 | } |
| 457 | 448 | ||
| 458 | test "Random weightedIndex" { | 449 | test "Random weightedIndex" { |
| 459 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 460 | |||
| 461 | // Make sure weightedIndex works for various integers and floats | 450 | // Make sure weightedIndex works for various integers and floats |
| 462 | inline for (.{ u64, i4, f32, f64 }) |T| { | 451 | inline for (.{ u64, i4, f32, f64 }) |T| { |
| 463 | var prng = DefaultPrng.init(0); | 452 | var prng = DefaultPrng.init(0); |
lib/std/segmented_list.zig-2| ... | @@ -409,8 +409,6 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type | ... | @@ -409,8 +409,6 @@ pub fn SegmentedList(comptime T: type, comptime prealloc_item_count: usize) type |
| 409 | } | 409 | } |
| 410 | 410 | ||
| 411 | test "SegmentedList basic usage" { | 411 | test "SegmentedList basic usage" { |
| 412 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 413 | |||
| 414 | try testSegmentedList(0); | 412 | try testSegmentedList(0); |
| 415 | try testSegmentedList(1); | 413 | try testSegmentedList(1); |
| 416 | try testSegmentedList(2); | 414 | try testSegmentedList(2); |
lib/std/simd.zig-9| ... | @@ -196,13 +196,10 @@ pub fn extract( | ... | @@ -196,13 +196,10 @@ pub fn extract( |
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | test "vector patterns" { | 198 | test "vector patterns" { |
| 199 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 200 | |||
| 201 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { | 199 | if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { |
| 202 | // https://github.com/ziglang/zig/issues/12012 | 200 | // https://github.com/ziglang/zig/issues/12012 |
| 203 | return error.SkipZigTest; | 201 | return error.SkipZigTest; |
| 204 | } | 202 | } |
| 205 | |||
| 206 | const base = @Vector(4, u32){ 10, 20, 30, 40 }; | 203 | const base = @Vector(4, u32){ 10, 20, 30, 40 }; |
| 207 | const other_base = @Vector(4, u32){ 55, 66, 77, 88 }; | 204 | const other_base = @Vector(4, u32){ 55, 66, 77, 88 }; |
| 208 | 205 | ||
| ... | @@ -272,8 +269,6 @@ pub fn reverseOrder(vec: anytype) @TypeOf(vec) { | ... | @@ -272,8 +269,6 @@ pub fn reverseOrder(vec: anytype) @TypeOf(vec) { |
| 272 | } | 269 | } |
| 273 | 270 | ||
| 274 | test "vector shifting" { | 271 | test "vector shifting" { |
| 275 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 276 | |||
| 277 | const base = @Vector(4, u32){ 10, 20, 30, 40 }; | 272 | const base = @Vector(4, u32){ 10, 20, 30, 40 }; |
| 278 | 273 | ||
| 279 | try std.testing.expectEqual([4]u32{ 30, 40, 999, 999 }, shiftElementsLeft(base, 2, 999)); | 274 | try std.testing.expectEqual([4]u32{ 30, 40, 999, 999 }, shiftElementsLeft(base, 2, 999)); |
| ... | @@ -338,8 +333,6 @@ pub fn countElementsWithValue(vec: anytype, value: std.meta.Child(@TypeOf(vec))) | ... | @@ -338,8 +333,6 @@ pub fn countElementsWithValue(vec: anytype, value: std.meta.Child(@TypeOf(vec))) |
| 338 | } | 333 | } |
| 339 | 334 | ||
| 340 | test "vector searching" { | 335 | test "vector searching" { |
| 341 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 342 | |||
| 343 | const base = @Vector(8, u32){ 6, 4, 7, 4, 4, 2, 3, 7 }; | 336 | const base = @Vector(8, u32){ 6, 4, 7, 4, 4, 2, 3, 7 }; |
| 344 | 337 | ||
| 345 | try std.testing.expectEqual(@as(?u3, 1), firstIndexOfValue(base, 4)); | 338 | try std.testing.expectEqual(@as(?u3, 1), firstIndexOfValue(base, 4)); |
| ... | @@ -431,8 +424,6 @@ pub fn prefixScan(comptime op: std.builtin.ReduceOp, comptime hop: isize, vec: a | ... | @@ -431,8 +424,6 @@ pub fn prefixScan(comptime op: std.builtin.ReduceOp, comptime hop: isize, vec: a |
| 431 | } | 424 | } |
| 432 | 425 | ||
| 433 | test "vector prefix scan" { | 426 | test "vector prefix scan" { |
| 434 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 435 | |||
| 436 | if (comptime builtin.cpu.arch.isMIPS()) { | 427 | if (comptime builtin.cpu.arch.isMIPS()) { |
| 437 | return error.SkipZigTest; | 428 | return error.SkipZigTest; |
| 438 | } | 429 | } |
lib/std/sort.zig-11| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | const std = @import("std.zig"); | 1 | const std = @import("std.zig"); |
| 2 | const assert = std.debug.assert; | 2 | const assert = std.debug.assert; |
| 3 | const builtin = @import("builtin"); | ||
| 4 | const testing = std.testing; | 3 | const testing = std.testing; |
| 5 | const mem = std.mem; | 4 | const mem = std.mem; |
| 6 | const math = std.math; | 5 | const math = std.math; |
| ... | @@ -177,8 +176,6 @@ const IdAndValue = struct { | ... | @@ -177,8 +176,6 @@ const IdAndValue = struct { |
| 177 | }; | 176 | }; |
| 178 | 177 | ||
| 179 | test "stable sort" { | 178 | test "stable sort" { |
| 180 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 181 | |||
| 182 | const expected = [_]IdAndValue{ | 179 | const expected = [_]IdAndValue{ |
| 183 | IdAndValue{ .id = 0, .value = 0 }, | 180 | IdAndValue{ .id = 0, .value = 0 }, |
| 184 | IdAndValue{ .id = 1, .value = 0 }, | 181 | IdAndValue{ .id = 1, .value = 0 }, |
| ... | @@ -226,8 +223,6 @@ test "stable sort" { | ... | @@ -226,8 +223,6 @@ test "stable sort" { |
| 226 | } | 223 | } |
| 227 | 224 | ||
| 228 | test "sort" { | 225 | test "sort" { |
| 229 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 230 | |||
| 231 | const u8cases = [_][]const []const u8{ | 226 | const u8cases = [_][]const []const u8{ |
| 232 | &[_][]const u8{ | 227 | &[_][]const u8{ |
| 233 | "", | 228 | "", |
| ... | @@ -306,8 +301,6 @@ test "sort" { | ... | @@ -306,8 +301,6 @@ test "sort" { |
| 306 | } | 301 | } |
| 307 | 302 | ||
| 308 | test "sort descending" { | 303 | test "sort descending" { |
| 309 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 310 | |||
| 311 | const rev_cases = [_][]const []const i32{ | 304 | const rev_cases = [_][]const []const i32{ |
| 312 | &[_][]const i32{ | 305 | &[_][]const i32{ |
| 313 | &[_]i32{}, | 306 | &[_]i32{}, |
| ... | @@ -347,8 +340,6 @@ test "sort descending" { | ... | @@ -347,8 +340,6 @@ test "sort descending" { |
| 347 | } | 340 | } |
| 348 | 341 | ||
| 349 | test "sort with context in the middle of a slice" { | 342 | test "sort with context in the middle of a slice" { |
| 350 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 351 | |||
| 352 | const Context = struct { | 343 | const Context = struct { |
| 353 | items: []i32, | 344 | items: []i32, |
| 354 | 345 | ||
| ... | @@ -388,8 +379,6 @@ test "sort with context in the middle of a slice" { | ... | @@ -388,8 +379,6 @@ test "sort with context in the middle of a slice" { |
| 388 | } | 379 | } |
| 389 | 380 | ||
| 390 | test "sort fuzz testing" { | 381 | test "sort fuzz testing" { |
| 391 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 392 | |||
| 393 | var prng = std.rand.DefaultPrng.init(0x12345678); | 382 | var prng = std.rand.DefaultPrng.init(0x12345678); |
| 394 | const random = prng.random(); | 383 | const random = prng.random(); |
| 395 | const test_case_count = 10; | 384 | const test_case_count = 10; |
lib/std/time.zig-4| ... | @@ -122,8 +122,6 @@ pub fn nanoTimestamp() i128 { | ... | @@ -122,8 +122,6 @@ pub fn nanoTimestamp() i128 { |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | test "timestamp" { | 124 | test "timestamp" { |
| 125 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 126 | |||
| 127 | const margin = ns_per_ms * 50; | 125 | const margin = ns_per_ms * 50; |
| 128 | 126 | ||
| 129 | const time_0 = milliTimestamp(); | 127 | const time_0 = milliTimestamp(); |
| ... | @@ -321,8 +319,6 @@ pub const Timer = struct { | ... | @@ -321,8 +319,6 @@ pub const Timer = struct { |
| 321 | }; | 319 | }; |
| 322 | 320 | ||
| 323 | test "Timer + Instant" { | 321 | test "Timer + Instant" { |
| 324 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 325 | |||
| 326 | const margin = ns_per_ms * 150; | 322 | const margin = ns_per_ms * 150; |
| 327 | 323 | ||
| 328 | var timer = try Timer.start(); | 324 | var timer = try Timer.start(); |
lib/std/treap.zig-2| ... | @@ -350,8 +350,6 @@ const TestTreap = Treap(u64, std.math.order); | ... | @@ -350,8 +350,6 @@ const TestTreap = Treap(u64, std.math.order); |
| 350 | const TestNode = TestTreap.Node; | 350 | const TestNode = TestTreap.Node; |
| 351 | 351 | ||
| 352 | test "std.Treap: insert, find, replace, remove" { | 352 | test "std.Treap: insert, find, replace, remove" { |
| 353 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 354 | |||
| 355 | var treap = TestTreap{}; | 353 | var treap = TestTreap{}; |
| 356 | var nodes: [10]TestNode = undefined; | 354 | var nodes: [10]TestNode = undefined; |
| 357 | 355 |
lib/std/unicode.zig-41| ... | @@ -1,6 +1,5 @@ | ... | @@ -1,6 +1,5 @@ |
| 1 | const std = @import("./std.zig"); | 1 | const std = @import("./std.zig"); |
| 2 | const assert = std.debug.assert; | 2 | const assert = std.debug.assert; |
| 3 | const builtin = @import("builtin"); | ||
| 4 | const testing = std.testing; | 3 | const testing = std.testing; |
| 5 | const mem = std.mem; | 4 | const mem = std.mem; |
| 6 | 5 | ||
| ... | @@ -497,15 +496,11 @@ fn testUtf16CountCodepoints() !void { | ... | @@ -497,15 +496,11 @@ fn testUtf16CountCodepoints() !void { |
| 497 | } | 496 | } |
| 498 | 497 | ||
| 499 | test "utf16 count codepoints" { | 498 | test "utf16 count codepoints" { |
| 500 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 501 | |||
| 502 | try testUtf16CountCodepoints(); | 499 | try testUtf16CountCodepoints(); |
| 503 | try comptime testUtf16CountCodepoints(); | 500 | try comptime testUtf16CountCodepoints(); |
| 504 | } | 501 | } |
| 505 | 502 | ||
| 506 | test "utf8 encode" { | 503 | test "utf8 encode" { |
| 507 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 508 | |||
| 509 | try comptime testUtf8Encode(); | 504 | try comptime testUtf8Encode(); |
| 510 | try testUtf8Encode(); | 505 | try testUtf8Encode(); |
| 511 | } | 506 | } |
| ... | @@ -532,8 +527,6 @@ fn testUtf8Encode() !void { | ... | @@ -532,8 +527,6 @@ fn testUtf8Encode() !void { |
| 532 | } | 527 | } |
| 533 | 528 | ||
| 534 | test "utf8 encode error" { | 529 | test "utf8 encode error" { |
| 535 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 536 | |||
| 537 | try comptime testUtf8EncodeError(); | 530 | try comptime testUtf8EncodeError(); |
| 538 | try testUtf8EncodeError(); | 531 | try testUtf8EncodeError(); |
| 539 | } | 532 | } |
| ... | @@ -550,8 +543,6 @@ fn testErrorEncode(codePoint: u21, array: []u8, expectedErr: anyerror) !void { | ... | @@ -550,8 +543,6 @@ fn testErrorEncode(codePoint: u21, array: []u8, expectedErr: anyerror) !void { |
| 550 | } | 543 | } |
| 551 | 544 | ||
| 552 | test "utf8 iterator on ascii" { | 545 | test "utf8 iterator on ascii" { |
| 553 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 554 | |||
| 555 | try comptime testUtf8IteratorOnAscii(); | 546 | try comptime testUtf8IteratorOnAscii(); |
| 556 | try testUtf8IteratorOnAscii(); | 547 | try testUtf8IteratorOnAscii(); |
| 557 | } | 548 | } |
| ... | @@ -572,8 +563,6 @@ fn testUtf8IteratorOnAscii() !void { | ... | @@ -572,8 +563,6 @@ fn testUtf8IteratorOnAscii() !void { |
| 572 | } | 563 | } |
| 573 | 564 | ||
| 574 | test "utf8 view bad" { | 565 | test "utf8 view bad" { |
| 575 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 576 | |||
| 577 | try comptime testUtf8ViewBad(); | 566 | try comptime testUtf8ViewBad(); |
| 578 | try testUtf8ViewBad(); | 567 | try testUtf8ViewBad(); |
| 579 | } | 568 | } |
| ... | @@ -584,8 +573,6 @@ fn testUtf8ViewBad() !void { | ... | @@ -584,8 +573,6 @@ fn testUtf8ViewBad() !void { |
| 584 | } | 573 | } |
| 585 | 574 | ||
| 586 | test "utf8 view ok" { | 575 | test "utf8 view ok" { |
| 587 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 588 | |||
| 589 | try comptime testUtf8ViewOk(); | 576 | try comptime testUtf8ViewOk(); |
| 590 | try testUtf8ViewOk(); | 577 | try testUtf8ViewOk(); |
| 591 | } | 578 | } |
| ... | @@ -606,8 +593,6 @@ fn testUtf8ViewOk() !void { | ... | @@ -606,8 +593,6 @@ fn testUtf8ViewOk() !void { |
| 606 | } | 593 | } |
| 607 | 594 | ||
| 608 | test "validate slice" { | 595 | test "validate slice" { |
| 609 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 610 | |||
| 611 | try comptime testValidateSlice(); | 596 | try comptime testValidateSlice(); |
| 612 | try testValidateSlice(); | 597 | try testValidateSlice(); |
| 613 | 598 | ||
| ... | @@ -648,8 +633,6 @@ fn testValidateSlice() !void { | ... | @@ -648,8 +633,6 @@ fn testValidateSlice() !void { |
| 648 | } | 633 | } |
| 649 | 634 | ||
| 650 | test "valid utf8" { | 635 | test "valid utf8" { |
| 651 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 652 | |||
| 653 | try comptime testValidUtf8(); | 636 | try comptime testValidUtf8(); |
| 654 | try testValidUtf8(); | 637 | try testValidUtf8(); |
| 655 | } | 638 | } |
| ... | @@ -669,8 +652,6 @@ fn testValidUtf8() !void { | ... | @@ -669,8 +652,6 @@ fn testValidUtf8() !void { |
| 669 | } | 652 | } |
| 670 | 653 | ||
| 671 | test "invalid utf8 continuation bytes" { | 654 | test "invalid utf8 continuation bytes" { |
| 672 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 673 | |||
| 674 | try comptime testInvalidUtf8ContinuationBytes(); | 655 | try comptime testInvalidUtf8ContinuationBytes(); |
| 675 | try testInvalidUtf8ContinuationBytes(); | 656 | try testInvalidUtf8ContinuationBytes(); |
| 676 | } | 657 | } |
| ... | @@ -703,8 +684,6 @@ fn testInvalidUtf8ContinuationBytes() !void { | ... | @@ -703,8 +684,6 @@ fn testInvalidUtf8ContinuationBytes() !void { |
| 703 | } | 684 | } |
| 704 | 685 | ||
| 705 | test "overlong utf8 codepoint" { | 686 | test "overlong utf8 codepoint" { |
| 706 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 707 | |||
| 708 | try comptime testOverlongUtf8Codepoint(); | 687 | try comptime testOverlongUtf8Codepoint(); |
| 709 | try testOverlongUtf8Codepoint(); | 688 | try testOverlongUtf8Codepoint(); |
| 710 | } | 689 | } |
| ... | @@ -718,8 +697,6 @@ fn testOverlongUtf8Codepoint() !void { | ... | @@ -718,8 +697,6 @@ fn testOverlongUtf8Codepoint() !void { |
| 718 | } | 697 | } |
| 719 | 698 | ||
| 720 | test "misc invalid utf8" { | 699 | test "misc invalid utf8" { |
| 721 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 722 | |||
| 723 | try comptime testMiscInvalidUtf8(); | 700 | try comptime testMiscInvalidUtf8(); |
| 724 | try testMiscInvalidUtf8(); | 701 | try testMiscInvalidUtf8(); |
| 725 | } | 702 | } |
| ... | @@ -735,8 +712,6 @@ fn testMiscInvalidUtf8() !void { | ... | @@ -735,8 +712,6 @@ fn testMiscInvalidUtf8() !void { |
| 735 | } | 712 | } |
| 736 | 713 | ||
| 737 | test "utf8 iterator peeking" { | 714 | test "utf8 iterator peeking" { |
| 738 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 739 | |||
| 740 | try comptime testUtf8Peeking(); | 715 | try comptime testUtf8Peeking(); |
| 741 | try testUtf8Peeking(); | 716 | try testUtf8Peeking(); |
| 742 | } | 717 | } |
| ... | @@ -821,8 +796,6 @@ pub fn utf16leToUtf8(utf8: []u8, utf16le: []const u16) !usize { | ... | @@ -821,8 +796,6 @@ pub fn utf16leToUtf8(utf8: []u8, utf16le: []const u16) !usize { |
| 821 | } | 796 | } |
| 822 | 797 | ||
| 823 | test "utf16leToUtf8" { | 798 | test "utf16leToUtf8" { |
| 824 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 825 | |||
| 826 | var utf16le: [2]u16 = undefined; | 799 | var utf16le: [2]u16 = undefined; |
| 827 | const utf16le_as_bytes = mem.sliceAsBytes(utf16le[0..]); | 800 | const utf16le_as_bytes = mem.sliceAsBytes(utf16le[0..]); |
| 828 | 801 | ||
| ... | @@ -935,8 +908,6 @@ pub fn utf8ToUtf16Le(utf16le: []u16, utf8: []const u8) !usize { | ... | @@ -935,8 +908,6 @@ pub fn utf8ToUtf16Le(utf16le: []u16, utf8: []const u8) !usize { |
| 935 | } | 908 | } |
| 936 | 909 | ||
| 937 | test "utf8ToUtf16Le" { | 910 | test "utf8ToUtf16Le" { |
| 938 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 939 | |||
| 940 | var utf16le: [2]u16 = [_]u16{0} ** 2; | 911 | var utf16le: [2]u16 = [_]u16{0} ** 2; |
| 941 | { | 912 | { |
| 942 | const length = try utf8ToUtf16Le(utf16le[0..], "𐐷"); | 913 | const length = try utf8ToUtf16Le(utf16le[0..], "𐐷"); |
| ... | @@ -955,8 +926,6 @@ test "utf8ToUtf16Le" { | ... | @@ -955,8 +926,6 @@ test "utf8ToUtf16Le" { |
| 955 | } | 926 | } |
| 956 | 927 | ||
| 957 | test "utf8ToUtf16LeWithNull" { | 928 | test "utf8ToUtf16LeWithNull" { |
| 958 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 959 | |||
| 960 | { | 929 | { |
| 961 | const utf16 = try utf8ToUtf16LeWithNull(testing.allocator, "𐐷"); | 930 | const utf16 = try utf8ToUtf16LeWithNull(testing.allocator, "𐐷"); |
| 962 | defer testing.allocator.free(utf16); | 931 | defer testing.allocator.free(utf16); |
| ... | @@ -1015,8 +984,6 @@ fn testCalcUtf16LeLen() !void { | ... | @@ -1015,8 +984,6 @@ fn testCalcUtf16LeLen() !void { |
| 1015 | } | 984 | } |
| 1016 | 985 | ||
| 1017 | test "calculate utf16 string length of given utf8 string in u16" { | 986 | test "calculate utf16 string length of given utf8 string in u16" { |
| 1018 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1019 | |||
| 1020 | try testCalcUtf16LeLen(); | 987 | try testCalcUtf16LeLen(); |
| 1021 | try comptime testCalcUtf16LeLen(); | 988 | try comptime testCalcUtf16LeLen(); |
| 1022 | } | 989 | } |
| ... | @@ -1050,8 +1017,6 @@ pub fn fmtUtf16le(utf16le: []const u16) std.fmt.Formatter(formatUtf16le) { | ... | @@ -1050,8 +1017,6 @@ pub fn fmtUtf16le(utf16le: []const u16) std.fmt.Formatter(formatUtf16le) { |
| 1050 | } | 1017 | } |
| 1051 | 1018 | ||
| 1052 | test "fmtUtf16le" { | 1019 | test "fmtUtf16le" { |
| 1053 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1054 | |||
| 1055 | const expectFmt = std.testing.expectFmt; | 1020 | const expectFmt = std.testing.expectFmt; |
| 1056 | try expectFmt("", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral(""))}); | 1021 | try expectFmt("", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral(""))}); |
| 1057 | try expectFmt("foo", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral("foo"))}); | 1022 | try expectFmt("foo", "{}", .{fmtUtf16le(utf8ToUtf16LeStringLiteral("foo"))}); |
| ... | @@ -1065,8 +1030,6 @@ test "fmtUtf16le" { | ... | @@ -1065,8 +1030,6 @@ test "fmtUtf16le" { |
| 1065 | } | 1030 | } |
| 1066 | 1031 | ||
| 1067 | test "utf8ToUtf16LeStringLiteral" { | 1032 | test "utf8ToUtf16LeStringLiteral" { |
| 1068 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1069 | |||
| 1070 | { | 1033 | { |
| 1071 | const bytes = [_:0]u16{ | 1034 | const bytes = [_:0]u16{ |
| 1072 | mem.nativeToLittle(u16, 0x41), | 1035 | mem.nativeToLittle(u16, 0x41), |
| ... | @@ -1127,8 +1090,6 @@ fn testUtf8CountCodepoints() !void { | ... | @@ -1127,8 +1090,6 @@ fn testUtf8CountCodepoints() !void { |
| 1127 | } | 1090 | } |
| 1128 | 1091 | ||
| 1129 | test "utf8 count codepoints" { | 1092 | test "utf8 count codepoints" { |
| 1130 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1131 | |||
| 1132 | try testUtf8CountCodepoints(); | 1093 | try testUtf8CountCodepoints(); |
| 1133 | try comptime testUtf8CountCodepoints(); | 1094 | try comptime testUtf8CountCodepoints(); |
| 1134 | } | 1095 | } |
| ... | @@ -1145,8 +1106,6 @@ fn testUtf8ValidCodepoint() !void { | ... | @@ -1145,8 +1106,6 @@ fn testUtf8ValidCodepoint() !void { |
| 1145 | } | 1106 | } |
| 1146 | 1107 | ||
| 1147 | test "utf8 valid codepoint" { | 1108 | test "utf8 valid codepoint" { |
| 1148 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1149 | |||
| 1150 | try testUtf8ValidCodepoint(); | 1109 | try testUtf8ValidCodepoint(); |
| 1151 | try comptime testUtf8ValidCodepoint(); | 1110 | try comptime testUtf8ValidCodepoint(); |
| 1152 | } | 1111 | } |
lib/std/zig/CrossTarget.zig-2| ... | @@ -785,8 +785,6 @@ fn parseOs(result: *CrossTarget, diags: *ParseOptions.Diagnostics, text: []const | ... | @@ -785,8 +785,6 @@ fn parseOs(result: *CrossTarget, diags: *ParseOptions.Diagnostics, text: []const |
| 785 | } | 785 | } |
| 786 | 786 | ||
| 787 | test "CrossTarget.parse" { | 787 | test "CrossTarget.parse" { |
| 788 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 789 | |||
| 790 | if (builtin.target.isGnuLibC()) { | 788 | if (builtin.target.isGnuLibC()) { |
| 791 | var cross_target = try CrossTarget.parse(.{}); | 789 | var cross_target = try CrossTarget.parse(.{}); |
| 792 | cross_target.setGnuLibCVersion(2, 1, 1); | 790 | cross_target.setGnuLibCVersion(2, 1, 1); |
lib/std/zig/Parse.zig-2| ... | @@ -4102,7 +4102,5 @@ const TokenIndex = Ast.TokenIndex; | ... | @@ -4102,7 +4102,5 @@ const TokenIndex = Ast.TokenIndex; |
| 4102 | const Token = std.zig.Token; | 4102 | const Token = std.zig.Token; |
| 4103 | 4103 | ||
| 4104 | test { | 4104 | test { |
| 4105 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 4106 | |||
| 4107 | _ = @import("parser_test.zig"); | 4105 | _ = @import("parser_test.zig"); |
| 4108 | } | 4106 | } |
lib/std/zig/fmt.zig-3| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("std"); | 1 | const std = @import("std"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | const mem = std.mem; | 2 | const mem = std.mem; |
| 4 | 3 | ||
| 5 | /// Print the string as a Zig identifier escaping it with @"" syntax if needed. | 4 | /// Print the string as a Zig identifier escaping it with @"" syntax if needed. |
| ... | @@ -96,8 +95,6 @@ pub fn fmtEscapes(bytes: []const u8) std.fmt.Formatter(stringEscape) { | ... | @@ -96,8 +95,6 @@ pub fn fmtEscapes(bytes: []const u8) std.fmt.Formatter(stringEscape) { |
| 96 | } | 95 | } |
| 97 | 96 | ||
| 98 | test "escape invalid identifiers" { | 97 | test "escape invalid identifiers" { |
| 99 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 100 | |||
| 101 | const expectFmt = std.testing.expectFmt; | 98 | const expectFmt = std.testing.expectFmt; |
| 102 | try expectFmt("@\"while\"", "{}", .{fmtId("while")}); | 99 | try expectFmt("@\"while\"", "{}", .{fmtId("while")}); |
| 103 | try expectFmt("hello", "{}", .{fmtId("hello")}); | 100 | try expectFmt("hello", "{}", .{fmtId("hello")}); |
lib/std/zig/tokenizer.zig-11| ... | @@ -1,5 +1,4 @@ | ... | @@ -1,5 +1,4 @@ |
| 1 | const std = @import("../std.zig"); | 1 | const std = @import("../std.zig"); |
| 2 | const builtin = @import("builtin"); | ||
| 3 | 2 | ||
| 4 | pub const Token = struct { | 3 | pub const Token = struct { |
| 5 | tag: Tag, | 4 | tag: Tag, |
| ... | @@ -1450,8 +1449,6 @@ test "chars" { | ... | @@ -1450,8 +1449,6 @@ test "chars" { |
| 1450 | } | 1449 | } |
| 1451 | 1450 | ||
| 1452 | test "invalid token characters" { | 1451 | test "invalid token characters" { |
| 1453 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1454 | |||
| 1455 | try testTokenize("#", &.{.invalid}); | 1452 | try testTokenize("#", &.{.invalid}); |
| 1456 | try testTokenize("`", &.{.invalid}); | 1453 | try testTokenize("`", &.{.invalid}); |
| 1457 | try testTokenize("'c", &.{.invalid}); | 1454 | try testTokenize("'c", &.{.invalid}); |
| ... | @@ -1481,8 +1478,6 @@ test "utf8" { | ... | @@ -1481,8 +1478,6 @@ test "utf8" { |
| 1481 | } | 1478 | } |
| 1482 | 1479 | ||
| 1483 | test "invalid utf8" { | 1480 | test "invalid utf8" { |
| 1484 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1485 | |||
| 1486 | try testTokenize("//\x80", &.{ | 1481 | try testTokenize("//\x80", &.{ |
| 1487 | .invalid, | 1482 | .invalid, |
| 1488 | }); | 1483 | }); |
| ... | @@ -1573,8 +1568,6 @@ test "pipe and then invalid" { | ... | @@ -1573,8 +1568,6 @@ test "pipe and then invalid" { |
| 1573 | } | 1568 | } |
| 1574 | 1569 | ||
| 1575 | test "line comment and doc comment" { | 1570 | test "line comment and doc comment" { |
| 1576 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1577 | |||
| 1578 | try testTokenize("//", &.{}); | 1571 | try testTokenize("//", &.{}); |
| 1579 | try testTokenize("// a / b", &.{}); | 1572 | try testTokenize("// a / b", &.{}); |
| 1580 | try testTokenize("// /", &.{}); | 1573 | try testTokenize("// /", &.{}); |
| ... | @@ -1649,8 +1642,6 @@ test "range literals" { | ... | @@ -1649,8 +1642,6 @@ test "range literals" { |
| 1649 | } | 1642 | } |
| 1650 | 1643 | ||
| 1651 | test "number literals decimal" { | 1644 | test "number literals decimal" { |
| 1652 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1653 | |||
| 1654 | try testTokenize("0", &.{.number_literal}); | 1645 | try testTokenize("0", &.{.number_literal}); |
| 1655 | try testTokenize("1", &.{.number_literal}); | 1646 | try testTokenize("1", &.{.number_literal}); |
| 1656 | try testTokenize("2", &.{.number_literal}); | 1647 | try testTokenize("2", &.{.number_literal}); |
| ... | @@ -1899,8 +1890,6 @@ test "invalid token with unfinished escape right before eof" { | ... | @@ -1899,8 +1890,6 @@ test "invalid token with unfinished escape right before eof" { |
| 1899 | } | 1890 | } |
| 1900 | 1891 | ||
| 1901 | test "saturating operators" { | 1892 | test "saturating operators" { |
| 1902 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 1903 | |||
| 1904 | try testTokenize("<<", &.{.angle_bracket_angle_bracket_left}); | 1893 | try testTokenize("<<", &.{.angle_bracket_angle_bracket_left}); |
| 1905 | try testTokenize("<<|", &.{.angle_bracket_angle_bracket_left_pipe}); | 1894 | try testTokenize("<<|", &.{.angle_bracket_angle_bracket_left_pipe}); |
| 1906 | try testTokenize("<<|=", &.{.angle_bracket_angle_bracket_left_pipe_equal}); | 1895 | try testTokenize("<<|=", &.{.angle_bracket_angle_bracket_left_pipe_equal}); |
src/arch/x86_64/CodeGen.zig+97-158| ... | @@ -2895,16 +2895,13 @@ fn airIntCast(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -2895,16 +2895,13 @@ fn airIntCast(self: *Self, inst: Air.Inst.Index) !void { |
| 2895 | }.signedness; | 2895 | }.signedness; |
| 2896 | 2896 | ||
| 2897 | const src_mcv = try self.resolveInst(ty_op.operand); | 2897 | const src_mcv = try self.resolveInst(ty_op.operand); |
| 2898 | const src_storage_bits: u16 = switch (src_mcv) { | 2898 | const src_storage_bits = switch (src_mcv) { |
| 2899 | .register, .register_offset => 64, | 2899 | .register, .register_offset => 64, |
| 2900 | .register_pair => 128, | 2900 | .load_frame => |frame_addr| self.getFrameAddrSize(frame_addr) * 8, |
| 2901 | .load_frame => |frame_addr| @intCast(self.getFrameAddrSize(frame_addr) * 8), | ||
| 2902 | else => src_int_info.bits, | 2901 | else => src_int_info.bits, |
| 2903 | }; | 2902 | }; |
| 2904 | 2903 | ||
| 2905 | const dst_mcv = if (dst_int_info.bits <= src_storage_bits and | 2904 | const dst_mcv = if (dst_int_info.bits <= src_storage_bits and |
| 2906 | std.math.divCeil(u16, dst_int_info.bits, 64) catch unreachable == | ||
| 2907 | std.math.divCeil(u32, src_storage_bits, 64) catch unreachable and | ||
| 2908 | self.reuseOperand(inst, ty_op.operand, 0, src_mcv)) src_mcv else dst: { | 2905 | self.reuseOperand(inst, ty_op.operand, 0, src_mcv)) src_mcv else dst: { |
| 2909 | const dst_mcv = try self.allocRegOrMem(inst, true); | 2906 | const dst_mcv = try self.allocRegOrMem(inst, true); |
| 2910 | try self.genCopy(min_ty, dst_mcv, src_mcv); | 2907 | try self.genCopy(min_ty, dst_mcv, src_mcv); |
| ... | @@ -2979,21 +2976,8 @@ fn airTrunc(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -2979,21 +2976,8 @@ fn airTrunc(self: *Self, inst: Air.Inst.Index) !void { |
| 2979 | 2976 | ||
| 2980 | const dst_mcv = if (src_mcv.isRegister() and self.reuseOperand(inst, ty_op.operand, 0, src_mcv)) | 2977 | const dst_mcv = if (src_mcv.isRegister() and self.reuseOperand(inst, ty_op.operand, 0, src_mcv)) |
| 2981 | src_mcv | 2978 | src_mcv |
| 2982 | else if (dst_abi_size <= 8) | 2979 | else |
| 2983 | try self.copyToRegisterWithInstTracking(inst, dst_ty, src_mcv) | 2980 | try self.copyToRegisterWithInstTracking(inst, dst_ty, src_mcv); |
| 2984 | else if (dst_abi_size <= 16) dst: { | ||
| 2985 | const dst_regs = try self.register_manager.allocRegs( | ||
| 2986 | 2, | ||
| 2987 | .{ inst, inst }, | ||
| 2988 | abi.RegisterClass.gp, | ||
| 2989 | ); | ||
| 2990 | const dst_mcv: MCValue = .{ .register_pair = dst_regs }; | ||
| 2991 | const dst_locks = self.register_manager.lockRegsAssumeUnused(2, dst_regs); | ||
| 2992 | defer for (dst_locks) |lock| self.register_manager.unlockReg(lock); | ||
| 2993 | |||
| 2994 | try self.genCopy(dst_ty, dst_mcv, src_mcv); | ||
| 2995 | break :dst dst_mcv; | ||
| 2996 | } else return self.fail("TODO implement trunc from {} to {}", .{ src_ty.fmt(mod), dst_ty.fmt(mod) }); | ||
| 2997 | 2981 | ||
| 2998 | if (dst_ty.zigTypeTag(mod) == .Vector) { | 2982 | if (dst_ty.zigTypeTag(mod) == .Vector) { |
| 2999 | assert(src_ty.zigTypeTag(mod) == .Vector and dst_ty.vectorLen(mod) == src_ty.vectorLen(mod)); | 2983 | assert(src_ty.zigTypeTag(mod) == .Vector and dst_ty.vectorLen(mod) == src_ty.vectorLen(mod)); |
| ... | @@ -3064,15 +3048,14 @@ fn airTrunc(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3064,15 +3048,14 @@ fn airTrunc(self: *Self, inst: Air.Inst.Index) !void { |
| 3064 | break :result dst_mcv; | 3048 | break :result dst_mcv; |
| 3065 | } | 3049 | } |
| 3066 | 3050 | ||
| 3051 | if (dst_abi_size > 8) { | ||
| 3052 | return self.fail("TODO implement trunc for abi sizes larger than 8", .{}); | ||
| 3053 | } | ||
| 3054 | |||
| 3067 | // when truncating a `u16` to `u5`, for example, those top 3 bits in the result | 3055 | // when truncating a `u16` to `u5`, for example, those top 3 bits in the result |
| 3068 | // have to be removed. this only happens if the dst if not a power-of-two size. | 3056 | // have to be removed. this only happens if the dst if not a power-of-two size. |
| 3069 | if (dst_abi_size <= 8) { | 3057 | if (self.regExtraBits(dst_ty) > 0) |
| 3070 | if (self.regExtraBits(dst_ty) > 0) try self.truncateRegister(dst_ty, dst_mcv.register.to64()); | 3058 | try self.truncateRegister(dst_ty, dst_mcv.register.to64()); |
| 3071 | } else if (dst_abi_size <= 16) { | ||
| 3072 | const dst_info = dst_ty.intInfo(mod); | ||
| 3073 | const high_ty = try mod.intType(dst_info.signedness, dst_info.bits - 64); | ||
| 3074 | if (self.regExtraBits(high_ty) > 0) try self.truncateRegister(high_ty, dst_mcv.register_pair[1].to64()); | ||
| 3075 | } | ||
| 3076 | 3059 | ||
| 3077 | break :result dst_mcv; | 3060 | break :result dst_mcv; |
| 3078 | }; | 3061 | }; |
| ... | @@ -3395,7 +3378,7 @@ fn airMulSat(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3395,7 +3378,7 @@ fn airMulSat(self: *Self, inst: Air.Inst.Index) !void { |
| 3395 | const cc: Condition = if (ty.isSignedInt(mod)) cc: { | 3378 | const cc: Condition = if (ty.isSignedInt(mod)) cc: { |
| 3396 | try self.genSetReg(limit_reg, ty, lhs_mcv); | 3379 | try self.genSetReg(limit_reg, ty, lhs_mcv); |
| 3397 | try self.genBinOpMir(.{ ._, .xor }, ty, limit_mcv, rhs_mcv); | 3380 | try self.genBinOpMir(.{ ._, .xor }, ty, limit_mcv, rhs_mcv); |
| 3398 | try self.genShiftBinOpMir(.{ ._r, .sa }, ty, limit_mcv, .{ .immediate = reg_bits - 1 }); | 3381 | try self.genShiftBinOpMir(.{ ._, .sa }, ty, limit_mcv, .{ .immediate = reg_bits - 1 }); |
| 3399 | try self.genBinOpMir(.{ ._, .xor }, ty, limit_mcv, .{ | 3382 | try self.genBinOpMir(.{ ._, .xor }, ty, limit_mcv, .{ |
| 3400 | .immediate = (@as(u64, 1) << @intCast(reg_bits - 1)) - 1, | 3383 | .immediate = (@as(u64, 1) << @intCast(reg_bits - 1)) - 1, |
| 3401 | }); | 3384 | }); |
| ... | @@ -3663,10 +3646,7 @@ fn airMulWithOverflow(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3663,10 +3646,7 @@ fn airMulWithOverflow(self: *Self, inst: Air.Inst.Index) !void { |
| 3663 | }, | 3646 | }, |
| 3664 | else => { | 3647 | else => { |
| 3665 | // For now, this is the only supported multiply that doesn't fit in a register. | 3648 | // For now, this is the only supported multiply that doesn't fit in a register. |
| 3666 | if (dst_info.bits > 128 or src_bits != 64) | 3649 | assert(dst_info.bits <= 128 and src_bits == 64); |
| 3667 | return self.fail("TODO implement airWithOverflow from {} to {}", .{ | ||
| 3668 | src_ty.fmt(mod), dst_ty.fmt(mod), | ||
| 3669 | }); | ||
| 3670 | 3650 | ||
| 3671 | const frame_index = | 3651 | const frame_index = |
| 3672 | try self.allocFrameIndex(FrameAlloc.initType(tuple_ty, mod)); | 3652 | try self.allocFrameIndex(FrameAlloc.initType(tuple_ty, mod)); |
| ... | @@ -3818,13 +3798,11 @@ fn airShlSat(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -3818,13 +3798,11 @@ fn airShlSat(self: *Self, inst: Air.Inst.Index) !void { |
| 3818 | } | 3798 | } |
| 3819 | 3799 | ||
| 3820 | fn airOptionalPayload(self: *Self, inst: Air.Inst.Index) !void { | 3800 | fn airOptionalPayload(self: *Self, inst: Air.Inst.Index) !void { |
| 3821 | const mod = self.bin_file.options.module.?; | ||
| 3822 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; | 3801 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 3823 | const result: MCValue = result: { | 3802 | const result: MCValue = result: { |
| 3824 | const pl_ty = self.typeOfIndex(inst); | 3803 | const pl_ty = self.typeOfIndex(inst); |
| 3825 | if (!pl_ty.hasRuntimeBitsIgnoreComptime(mod)) break :result .none; | ||
| 3826 | |||
| 3827 | const opt_mcv = try self.resolveInst(ty_op.operand); | 3804 | const opt_mcv = try self.resolveInst(ty_op.operand); |
| 3805 | |||
| 3828 | if (self.reuseOperand(inst, ty_op.operand, 0, opt_mcv)) { | 3806 | if (self.reuseOperand(inst, ty_op.operand, 0, opt_mcv)) { |
| 3829 | switch (opt_mcv) { | 3807 | switch (opt_mcv) { |
| 3830 | .register => |reg| try self.truncateRegister(pl_ty, reg), | 3808 | .register => |reg| try self.truncateRegister(pl_ty, reg), |
| ... | @@ -4444,46 +4422,42 @@ fn airPtrElemVal(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -4444,46 +4422,42 @@ fn airPtrElemVal(self: *Self, inst: Air.Inst.Index) !void { |
| 4444 | // this is identical to the `airPtrElemPtr` codegen expect here an | 4422 | // this is identical to the `airPtrElemPtr` codegen expect here an |
| 4445 | // additional `mov` is needed at the end to get the actual value | 4423 | // additional `mov` is needed at the end to get the actual value |
| 4446 | 4424 | ||
| 4447 | const result = result: { | 4425 | const elem_ty = ptr_ty.elemType2(mod); |
| 4448 | const elem_ty = ptr_ty.elemType2(mod); | 4426 | const elem_abi_size: u32 = @intCast(elem_ty.abiSize(mod)); |
| 4449 | if (!elem_ty.hasRuntimeBitsIgnoreComptime(mod)) break :result .none; | 4427 | const index_ty = self.typeOf(bin_op.rhs); |
| 4450 | 4428 | const index_mcv = try self.resolveInst(bin_op.rhs); | |
| 4451 | const elem_abi_size: u32 = @intCast(elem_ty.abiSize(mod)); | 4429 | const index_lock = switch (index_mcv) { |
| 4452 | const index_ty = self.typeOf(bin_op.rhs); | 4430 | .register => |reg| self.register_manager.lockRegAssumeUnused(reg), |
| 4453 | const index_mcv = try self.resolveInst(bin_op.rhs); | 4431 | else => null, |
| 4454 | const index_lock = switch (index_mcv) { | 4432 | }; |
| 4455 | .register => |reg| self.register_manager.lockRegAssumeUnused(reg), | 4433 | defer if (index_lock) |lock| self.register_manager.unlockReg(lock); |
| 4456 | else => null, | ||
| 4457 | }; | ||
| 4458 | defer if (index_lock) |lock| self.register_manager.unlockReg(lock); | ||
| 4459 | 4434 | ||
| 4460 | const offset_reg = try self.elemOffset(index_ty, index_mcv, elem_abi_size); | 4435 | const offset_reg = try self.elemOffset(index_ty, index_mcv, elem_abi_size); |
| 4461 | const offset_lock = self.register_manager.lockRegAssumeUnused(offset_reg); | 4436 | const offset_lock = self.register_manager.lockRegAssumeUnused(offset_reg); |
| 4462 | defer self.register_manager.unlockReg(offset_lock); | 4437 | defer self.register_manager.unlockReg(offset_lock); |
| 4463 | 4438 | ||
| 4464 | const ptr_mcv = try self.resolveInst(bin_op.lhs); | 4439 | const ptr_mcv = try self.resolveInst(bin_op.lhs); |
| 4465 | const elem_ptr_reg = if (ptr_mcv.isRegister() and self.liveness.operandDies(inst, 0)) | 4440 | const elem_ptr_reg = if (ptr_mcv.isRegister() and self.liveness.operandDies(inst, 0)) |
| 4466 | ptr_mcv.register | 4441 | ptr_mcv.register |
| 4467 | else | 4442 | else |
| 4468 | try self.copyToTmpRegister(ptr_ty, ptr_mcv); | 4443 | try self.copyToTmpRegister(ptr_ty, ptr_mcv); |
| 4469 | const elem_ptr_lock = self.register_manager.lockRegAssumeUnused(elem_ptr_reg); | 4444 | const elem_ptr_lock = self.register_manager.lockRegAssumeUnused(elem_ptr_reg); |
| 4470 | defer self.register_manager.unlockReg(elem_ptr_lock); | 4445 | defer self.register_manager.unlockReg(elem_ptr_lock); |
| 4471 | try self.asmRegisterRegister( | 4446 | try self.asmRegisterRegister( |
| 4472 | .{ ._, .add }, | 4447 | .{ ._, .add }, |
| 4473 | elem_ptr_reg, | 4448 | elem_ptr_reg, |
| 4474 | offset_reg, | 4449 | offset_reg, |
| 4475 | ); | 4450 | ); |
| 4476 | 4451 | ||
| 4477 | const dst_mcv = try self.allocRegOrMem(inst, true); | 4452 | const dst_mcv = try self.allocRegOrMem(inst, true); |
| 4478 | const dst_lock = switch (dst_mcv) { | 4453 | const dst_lock = switch (dst_mcv) { |
| 4479 | .register => |reg| self.register_manager.lockRegAssumeUnused(reg), | 4454 | .register => |reg| self.register_manager.lockRegAssumeUnused(reg), |
| 4480 | else => null, | 4455 | else => null, |
| 4481 | }; | ||
| 4482 | defer if (dst_lock) |lock| self.register_manager.unlockReg(lock); | ||
| 4483 | try self.load(dst_mcv, ptr_ty, .{ .register = elem_ptr_reg }); | ||
| 4484 | break :result dst_mcv; | ||
| 4485 | }; | 4456 | }; |
| 4486 | return self.finishAir(inst, result, .{ bin_op.lhs, bin_op.rhs, .none }); | 4457 | defer if (dst_lock) |lock| self.register_manager.unlockReg(lock); |
| 4458 | try self.load(dst_mcv, ptr_ty, .{ .register = elem_ptr_reg }); | ||
| 4459 | |||
| 4460 | return self.finishAir(inst, dst_mcv, .{ bin_op.lhs, bin_op.rhs, .none }); | ||
| 4487 | } | 4461 | } |
| 4488 | 4462 | ||
| 4489 | fn airPtrElemPtr(self: *Self, inst: Air.Inst.Index) !void { | 4463 | fn airPtrElemPtr(self: *Self, inst: Air.Inst.Index) !void { |
| ... | @@ -4963,7 +4937,7 @@ fn byteSwap(self: *Self, inst: Air.Inst.Index, src_ty: Type, src_mcv: MCValue, m | ... | @@ -4963,7 +4937,7 @@ fn byteSwap(self: *Self, inst: Air.Inst.Index, src_ty: Type, src_mcv: MCValue, m |
| 4963 | const mod = self.bin_file.options.module.?; | 4937 | const mod = self.bin_file.options.module.?; |
| 4964 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; | 4938 | const ty_op = self.air.instructions.items(.data)[inst].ty_op; |
| 4965 | 4939 | ||
| 4966 | if (src_ty.zigTypeTag(mod) == .Vector) return self.fail( | 4940 | if (src_ty.zigTypeTag(mod) == .Vector or src_ty.abiSize(mod) > 8) return self.fail( |
| 4967 | "TODO implement byteSwap for {}", | 4941 | "TODO implement byteSwap for {}", |
| 4968 | .{src_ty.fmt(mod)}, | 4942 | .{src_ty.fmt(mod)}, |
| 4969 | ); | 4943 | ); |
| ... | @@ -5814,17 +5788,15 @@ fn packedLoad(self: *Self, dst_mcv: MCValue, ptr_ty: Type, ptr_mcv: MCValue) Inn | ... | @@ -5814,17 +5788,15 @@ fn packedLoad(self: *Self, dst_mcv: MCValue, ptr_ty: Type, ptr_mcv: MCValue) Inn |
| 5814 | const ptr_info = ptr_ty.ptrInfo(mod); | 5788 | const ptr_info = ptr_ty.ptrInfo(mod); |
| 5815 | 5789 | ||
| 5816 | const val_ty = ptr_info.child.toType(); | 5790 | const val_ty = ptr_info.child.toType(); |
| 5817 | if (!val_ty.hasRuntimeBitsIgnoreComptime(mod)) return; | ||
| 5818 | const val_abi_size: u32 = @intCast(val_ty.abiSize(mod)); | 5791 | const val_abi_size: u32 = @intCast(val_ty.abiSize(mod)); |
| 5819 | |||
| 5820 | if (val_abi_size > 8) return self.fail("TODO implement packed load of {}", .{val_ty.fmt(mod)}); | ||
| 5821 | |||
| 5822 | const limb_abi_size: u32 = @min(val_abi_size, 8); | 5792 | const limb_abi_size: u32 = @min(val_abi_size, 8); |
| 5823 | const limb_abi_bits = limb_abi_size * 8; | 5793 | const limb_abi_bits = limb_abi_size * 8; |
| 5824 | const val_byte_off: i32 = @intCast(ptr_info.packed_offset.bit_offset / limb_abi_bits * limb_abi_size); | 5794 | const val_byte_off: i32 = @intCast(ptr_info.packed_offset.bit_offset / limb_abi_bits * limb_abi_size); |
| 5825 | const val_bit_off = ptr_info.packed_offset.bit_offset % limb_abi_bits; | 5795 | const val_bit_off = ptr_info.packed_offset.bit_offset % limb_abi_bits; |
| 5826 | const val_extra_bits = self.regExtraBits(val_ty); | 5796 | const val_extra_bits = self.regExtraBits(val_ty); |
| 5827 | 5797 | ||
| 5798 | if (val_abi_size > 8) return self.fail("TODO implement packed load of {}", .{val_ty.fmt(mod)}); | ||
| 5799 | |||
| 5828 | const ptr_reg = try self.copyToTmpRegister(ptr_ty, ptr_mcv); | 5800 | const ptr_reg = try self.copyToTmpRegister(ptr_ty, ptr_mcv); |
| 5829 | const ptr_lock = self.register_manager.lockRegAssumeUnused(ptr_reg); | 5801 | const ptr_lock = self.register_manager.lockRegAssumeUnused(ptr_reg); |
| 5830 | defer self.register_manager.unlockReg(ptr_lock); | 5802 | defer self.register_manager.unlockReg(ptr_lock); |
| ... | @@ -5887,7 +5859,6 @@ fn packedLoad(self: *Self, dst_mcv: MCValue, ptr_ty: Type, ptr_mcv: MCValue) Inn | ... | @@ -5887,7 +5859,6 @@ fn packedLoad(self: *Self, dst_mcv: MCValue, ptr_ty: Type, ptr_mcv: MCValue) Inn |
| 5887 | fn load(self: *Self, dst_mcv: MCValue, ptr_ty: Type, ptr_mcv: MCValue) InnerError!void { | 5859 | fn load(self: *Self, dst_mcv: MCValue, ptr_ty: Type, ptr_mcv: MCValue) InnerError!void { |
| 5888 | const mod = self.bin_file.options.module.?; | 5860 | const mod = self.bin_file.options.module.?; |
| 5889 | const dst_ty = ptr_ty.childType(mod); | 5861 | const dst_ty = ptr_ty.childType(mod); |
| 5890 | if (!dst_ty.hasRuntimeBitsIgnoreComptime(mod)) return; | ||
| 5891 | switch (ptr_mcv) { | 5862 | switch (ptr_mcv) { |
| 5892 | .none, | 5863 | .none, |
| 5893 | .unreach, | 5864 | .unreach, |
| ... | @@ -5964,7 +5935,6 @@ fn packedStore(self: *Self, ptr_ty: Type, ptr_mcv: MCValue, src_mcv: MCValue) In | ... | @@ -5964,7 +5935,6 @@ fn packedStore(self: *Self, ptr_ty: Type, ptr_mcv: MCValue, src_mcv: MCValue) In |
| 5964 | const mod = self.bin_file.options.module.?; | 5935 | const mod = self.bin_file.options.module.?; |
| 5965 | const ptr_info = ptr_ty.ptrInfo(mod); | 5936 | const ptr_info = ptr_ty.ptrInfo(mod); |
| 5966 | const src_ty = ptr_ty.childType(mod); | 5937 | const src_ty = ptr_ty.childType(mod); |
| 5967 | if (!src_ty.hasRuntimeBitsIgnoreComptime(mod)) return; | ||
| 5968 | 5938 | ||
| 5969 | const limb_abi_size: u16 = @min(ptr_info.packed_offset.host_size, 8); | 5939 | const limb_abi_size: u16 = @min(ptr_info.packed_offset.host_size, 8); |
| 5970 | const limb_abi_bits = limb_abi_size * 8; | 5940 | const limb_abi_bits = limb_abi_size * 8; |
| ... | @@ -6036,7 +6006,6 @@ fn packedStore(self: *Self, ptr_ty: Type, ptr_mcv: MCValue, src_mcv: MCValue) In | ... | @@ -6036,7 +6006,6 @@ fn packedStore(self: *Self, ptr_ty: Type, ptr_mcv: MCValue, src_mcv: MCValue) In |
| 6036 | fn store(self: *Self, ptr_ty: Type, ptr_mcv: MCValue, src_mcv: MCValue) InnerError!void { | 6006 | fn store(self: *Self, ptr_ty: Type, ptr_mcv: MCValue, src_mcv: MCValue) InnerError!void { |
| 6037 | const mod = self.bin_file.options.module.?; | 6007 | const mod = self.bin_file.options.module.?; |
| 6038 | const src_ty = ptr_ty.childType(mod); | 6008 | const src_ty = ptr_ty.childType(mod); |
| 6039 | if (!src_ty.hasRuntimeBitsIgnoreComptime(mod)) return; | ||
| 6040 | switch (ptr_mcv) { | 6009 | switch (ptr_mcv) { |
| 6041 | .none, | 6010 | .none, |
| 6042 | .unreach, | 6011 | .unreach, |
| ... | @@ -10507,44 +10476,39 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -10507,44 +10476,39 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { |
| 10507 | }, | 10476 | }, |
| 10508 | else => return self.fail("invalid constraint: '{s}'", .{constraint}), | 10477 | else => return self.fail("invalid constraint: '{s}'", .{constraint}), |
| 10509 | }; | 10478 | }; |
| 10510 | const arg_mcv: MCValue = arg_mcv: { | 10479 | const arg_maybe_reg: ?Register = if (mem.eql(u8, constraint[1..], "r")) |
| 10511 | const arg_maybe_reg: ?Register = if (mem.eql(u8, constraint[1..], "r")) | 10480 | self.register_manager.tryAllocReg(maybe_inst, self.regClassForType(ty)) orelse |
| 10512 | self.register_manager.tryAllocReg(maybe_inst, self.regClassForType(ty)) orelse | 10481 | return self.fail("ran out of registers lowering inline asm", .{}) |
| 10513 | return self.fail("ran out of registers lowering inline asm", .{}) | 10482 | else if (mem.eql(u8, constraint[1..], "m")) |
| 10514 | else if (mem.eql(u8, constraint[1..], "m")) | 10483 | if (output != .none) null else return self.fail( |
| 10515 | if (output != .none) null else return self.fail( | 10484 | "memory constraint unsupported for asm result: '{s}'", |
| 10516 | "memory constraint unsupported for asm result: '{s}'", | 10485 | .{constraint}, |
| 10517 | .{constraint}, | 10486 | ) |
| 10518 | ) | 10487 | else if (mem.eql(u8, constraint[1..], "g") or |
| 10519 | else if (mem.eql(u8, constraint[1..], "g") or | 10488 | mem.eql(u8, constraint[1..], "rm") or mem.eql(u8, constraint[1..], "mr") or |
| 10520 | mem.eql(u8, constraint[1..], "rm") or mem.eql(u8, constraint[1..], "mr") or | 10489 | mem.eql(u8, constraint[1..], "r,m") or mem.eql(u8, constraint[1..], "m,r")) |
| 10521 | mem.eql(u8, constraint[1..], "r,m") or mem.eql(u8, constraint[1..], "m,r")) | 10490 | self.register_manager.tryAllocReg(maybe_inst, self.regClassForType(ty)) orelse |
| 10522 | self.register_manager.tryAllocReg(maybe_inst, self.regClassForType(ty)) orelse | 10491 | if (output != .none) |
| 10523 | if (output != .none) | 10492 | null |
| 10524 | null | 10493 | else |
| 10525 | else | 10494 | return self.fail("ran out of registers lowering inline asm", .{}) |
| 10526 | return self.fail("ran out of registers lowering inline asm", .{}) | 10495 | else if (mem.startsWith(u8, constraint[1..], "{") and mem.endsWith(u8, constraint[1..], "}")) |
| 10527 | else if (mem.startsWith(u8, constraint[1..], "{") and mem.endsWith(u8, constraint[1..], "}")) | 10496 | parseRegName(constraint[1 + "{".len .. constraint.len - "}".len]) orelse |
| 10528 | parseRegName(constraint[1 + "{".len .. constraint.len - "}".len]) orelse | 10497 | return self.fail("invalid register constraint: '{s}'", .{constraint}) |
| 10529 | return self.fail("invalid register constraint: '{s}'", .{constraint}) | 10498 | else |
| 10530 | else if (constraint.len == 2 and std.ascii.isDigit(constraint[1])) { | 10499 | return self.fail("invalid constraint: '{s}'", .{constraint}); |
| 10531 | const index = std.fmt.charToDigit(constraint[0], 10) catch unreachable; | 10500 | const arg_mcv: MCValue = if (arg_maybe_reg) |reg| .{ .register = reg } else arg: { |
| 10532 | if (index >= args.items.len) return self.fail("constraint out of bounds: '{s}'", .{constraint}); | 10501 | const ptr_mcv = try self.resolveInst(output); |
| 10533 | break :arg_mcv args.items[index]; | 10502 | switch (ptr_mcv) { |
| 10534 | } else return self.fail("invalid constraint: '{s}'", .{constraint}); | 10503 | .immediate => |addr| if (math.cast(i32, @as(i64, @bitCast(addr)))) |_| |
| 10535 | break :arg_mcv if (arg_maybe_reg) |reg| .{ .register = reg } else arg: { | 10504 | break :arg ptr_mcv.deref(), |
| 10536 | const ptr_mcv = try self.resolveInst(output); | 10505 | .register, .register_offset, .lea_frame => break :arg ptr_mcv.deref(), |
| 10537 | switch (ptr_mcv) { | 10506 | else => {}, |
| 10538 | .immediate => |addr| if (math.cast(i32, @as(i64, @bitCast(addr)))) |_| | 10507 | } |
| 10539 | break :arg ptr_mcv.deref(), | 10508 | break :arg .{ .indirect = .{ .reg = try self.copyToTmpRegister(Type.usize, ptr_mcv) } }; |
| 10540 | .register, .register_offset, .lea_frame => break :arg ptr_mcv.deref(), | ||
| 10541 | else => {}, | ||
| 10542 | } | ||
| 10543 | break :arg .{ .indirect = .{ .reg = try self.copyToTmpRegister(Type.usize, ptr_mcv) } }; | ||
| 10544 | }; | ||
| 10545 | }; | 10509 | }; |
| 10546 | if (arg_mcv.getReg()) |reg| if (RegisterManager.indexOfRegIntoTracked(reg)) |_| { | 10510 | if (arg_mcv.getReg()) |reg| if (RegisterManager.indexOfRegIntoTracked(reg)) |_| { |
| 10547 | _ = self.register_manager.lockReg(reg); | 10511 | _ = self.register_manager.lockRegAssumeUnused(reg); |
| 10548 | }; | 10512 | }; |
| 10549 | if (!mem.eql(u8, name, "_")) | 10513 | if (!mem.eql(u8, name, "_")) |
| 10550 | arg_map.putAssumeCapacityNoClobber(name, @intCast(args.items.len)); | 10514 | arg_map.putAssumeCapacityNoClobber(name, @intCast(args.items.len)); |
| ... | @@ -10606,10 +10570,6 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -10606,10 +10570,6 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { |
| 10606 | try self.register_manager.getReg(reg, null); | 10570 | try self.register_manager.getReg(reg, null); |
| 10607 | try self.genSetReg(reg, ty, input_mcv); | 10571 | try self.genSetReg(reg, ty, input_mcv); |
| 10608 | break :arg .{ .register = reg }; | 10572 | break :arg .{ .register = reg }; |
| 10609 | } else if (constraint.len == 1 and std.ascii.isDigit(constraint[0])) arg: { | ||
| 10610 | const index = std.fmt.charToDigit(constraint[0], 10) catch unreachable; | ||
| 10611 | if (index >= args.items.len) return self.fail("constraint out of bounds: '{s}'", .{constraint}); | ||
| 10612 | break :arg args.items[index]; | ||
| 10613 | } else return self.fail("invalid constraint: '{s}'", .{constraint}); | 10573 | } else return self.fail("invalid constraint: '{s}'", .{constraint}); |
| 10614 | if (arg_mcv.getReg()) |reg| if (RegisterManager.indexOfRegIntoTracked(reg)) |_| { | 10574 | if (arg_mcv.getReg()) |reg| if (RegisterManager.indexOfRegIntoTracked(reg)) |_| { |
| 10615 | _ = self.register_manager.lockReg(reg); | 10575 | _ = self.register_manager.lockReg(reg); |
| ... | @@ -10735,7 +10695,7 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -10735,7 +10695,7 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { |
| 10735 | mnem_name[mnem_prefix.len .. mnem_name.len - mnem_suffix.len], | 10695 | mnem_name[mnem_prefix.len .. mnem_name.len - mnem_suffix.len], |
| 10736 | ) orelse continue }; | 10696 | ) orelse continue }; |
| 10737 | } else { | 10697 | } else { |
| 10738 | assert(prefix != .none); // no combination of fixes produced a known mnemonic | 10698 | assert(prefix != .none); |
| 10739 | return self.fail("invalid prefix for mnemonic: '{s} {s}'", .{ | 10699 | return self.fail("invalid prefix for mnemonic: '{s} {s}'", .{ |
| 10740 | @tagName(prefix), mnem_str, | 10700 | @tagName(prefix), mnem_str, |
| 10741 | }); | 10701 | }); |
| ... | @@ -10966,7 +10926,6 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -10966,7 +10926,6 @@ fn airAsm(self: *Self, inst: Air.Inst.Index) !void { |
| 10966 | 10926 | ||
| 10967 | if (output == .none) continue; | 10927 | if (output == .none) continue; |
| 10968 | if (arg_mcv != .register) continue; | 10928 | if (arg_mcv != .register) continue; |
| 10969 | if (constraint.len == 2 and std.ascii.isDigit(constraint[1])) continue; | ||
| 10970 | try self.store(self.typeOf(output), .{ .air_ref = output }, arg_mcv); | 10929 | try self.store(self.typeOf(output), .{ .air_ref = output }, arg_mcv); |
| 10971 | } | 10930 | } |
| 10972 | 10931 | ||
| ... | @@ -11060,7 +11019,6 @@ fn moveStrategy(self: *Self, ty: Type, aligned: bool) !MoveStrategy { | ... | @@ -11060,7 +11019,6 @@ fn moveStrategy(self: *Self, ty: Type, aligned: bool) !MoveStrategy { |
| 11060 | else => {}, | 11019 | else => {}, |
| 11061 | }, | 11020 | }, |
| 11062 | .Vector => switch (ty.childType(mod).zigTypeTag(mod)) { | 11021 | .Vector => switch (ty.childType(mod).zigTypeTag(mod)) { |
| 11063 | .Bool => return .{ .move = .{ ._, .mov } }, | ||
| 11064 | .Int => switch (ty.childType(mod).intInfo(mod).bits) { | 11022 | .Int => switch (ty.childType(mod).intInfo(mod).bits) { |
| 11065 | 8 => switch (ty.vectorLen(mod)) { | 11023 | 8 => switch (ty.vectorLen(mod)) { |
| 11066 | 1 => if (self.hasFeature(.avx)) return .{ .vex_insert_extract = .{ | 11024 | 1 => if (self.hasFeature(.avx)) return .{ .vex_insert_extract = .{ |
| ... | @@ -11326,6 +11284,7 @@ fn genSetReg(self: *Self, dst_reg: Register, ty: Type, src_mcv: MCValue) InnerEr | ... | @@ -11326,6 +11284,7 @@ fn genSetReg(self: *Self, dst_reg: Register, ty: Type, src_mcv: MCValue) InnerEr |
| 11326 | .none, | 11284 | .none, |
| 11327 | .unreach, | 11285 | .unreach, |
| 11328 | .dead, | 11286 | .dead, |
| 11287 | .register_pair, | ||
| 11329 | .register_overflow, | 11288 | .register_overflow, |
| 11330 | .reserved_frame, | 11289 | .reserved_frame, |
| 11331 | => unreachable, | 11290 | => unreachable, |
| ... | @@ -11429,7 +11388,6 @@ fn genSetReg(self: *Self, dst_reg: Register, ty: Type, src_mcv: MCValue) InnerEr | ... | @@ -11429,7 +11388,6 @@ fn genSetReg(self: *Self, dst_reg: Register, ty: Type, src_mcv: MCValue) InnerEr |
| 11429 | }, | 11388 | }, |
| 11430 | .x87, .mmx => unreachable, | 11389 | .x87, .mmx => unreachable, |
| 11431 | }, | 11390 | }, |
| 11432 | .register_pair => |src_regs| try self.genSetReg(dst_reg, ty, .{ .register = src_regs[0] }), | ||
| 11433 | .register_offset, | 11391 | .register_offset, |
| 11434 | .indirect, | 11392 | .indirect, |
| 11435 | .load_frame, | 11393 | .load_frame, |
| ... | @@ -11563,13 +11521,10 @@ fn genSetMem(self: *Self, base: Memory.Base, disp: i32, ty: Type, src_mcv: MCVal | ... | @@ -11563,13 +11521,10 @@ fn genSetMem(self: *Self, base: Memory.Base, disp: i32, ty: Type, src_mcv: MCVal |
| 11563 | .undef => {}, | 11521 | .undef => {}, |
| 11564 | .immediate => |imm| switch (abi_size) { | 11522 | .immediate => |imm| switch (abi_size) { |
| 11565 | 1, 2, 4 => { | 11523 | 1, 2, 4 => { |
| 11566 | const immediate = switch (if (ty.isAbiInt(mod)) | 11524 | const immediate = if (ty.isSignedInt(mod)) |
| 11567 | ty.intInfo(mod).signedness | 11525 | Immediate.s(@truncate(@as(i64, @bitCast(imm)))) |
| 11568 | else | 11526 | else |
| 11569 | .unsigned) { | 11527 | Immediate.u(@as(u32, @intCast(imm))); |
| 11570 | .signed => Immediate.s(@truncate(@as(i64, @bitCast(imm)))), | ||
| 11571 | .unsigned => Immediate.u(@as(u32, @intCast(imm))), | ||
| 11572 | }; | ||
| 11573 | try self.asmMemoryImmediate( | 11528 | try self.asmMemoryImmediate( |
| 11574 | .{ ._, .mov }, | 11529 | .{ ._, .mov }, |
| 11575 | Memory.sib(Memory.PtrSize.fromSize(abi_size), .{ .base = base, .disp = disp }), | 11530 | Memory.sib(Memory.PtrSize.fromSize(abi_size), .{ .base = base, .disp = disp }), |
| ... | @@ -11631,35 +11586,19 @@ fn genSetMem(self: *Self, base: Memory.Base, disp: i32, ty: Type, src_mcv: MCVal | ... | @@ -11631,35 +11586,19 @@ fn genSetMem(self: *Self, base: Memory.Base, disp: i32, ty: Type, src_mcv: MCVal |
| 11631 | .{ .base = base, .disp = disp + @as(i32, @intCast(src_reg_i * 8)) }, | 11586 | .{ .base = base, .disp = disp + @as(i32, @intCast(src_reg_i * 8)) }, |
| 11632 | ), registerAlias(src_reg, part_size)); | 11587 | ), registerAlias(src_reg, part_size)); |
| 11633 | }, | 11588 | }, |
| 11634 | .register_overflow => |ro| switch (ty.zigTypeTag(mod)) { | 11589 | .register_overflow => |ro| { |
| 11635 | .Struct => { | 11590 | try self.genSetMem( |
| 11636 | try self.genSetMem( | 11591 | base, |
| 11637 | base, | 11592 | disp + @as(i32, @intCast(ty.structFieldOffset(0, mod))), |
| 11638 | disp + @as(i32, @intCast(ty.structFieldOffset(0, mod))), | 11593 | ty.structFieldType(0, mod), |
| 11639 | ty.structFieldType(0, mod), | 11594 | .{ .register = ro.reg }, |
| 11640 | .{ .register = ro.reg }, | 11595 | ); |
| 11641 | ); | 11596 | try self.genSetMem( |
| 11642 | try self.genSetMem( | 11597 | base, |
| 11643 | base, | 11598 | disp + @as(i32, @intCast(ty.structFieldOffset(1, mod))), |
| 11644 | disp + @as(i32, @intCast(ty.structFieldOffset(1, mod))), | 11599 | ty.structFieldType(1, mod), |
| 11645 | ty.structFieldType(1, mod), | 11600 | .{ .eflags = ro.eflags }, |
| 11646 | .{ .eflags = ro.eflags }, | 11601 | ); |
| 11647 | ); | ||
| 11648 | }, | ||
| 11649 | .Optional => { | ||
| 11650 | assert(!ty.optionalReprIsPayload(mod)); | ||
| 11651 | const child_ty = ty.optionalChild(mod); | ||
| 11652 | try self.genSetMem(base, disp, child_ty, .{ .register = ro.reg }); | ||
| 11653 | try self.genSetMem( | ||
| 11654 | base, | ||
| 11655 | disp + @as(i32, @intCast(child_ty.abiSize(mod))), | ||
| 11656 | Type.bool, | ||
| 11657 | .{ .eflags = ro.eflags }, | ||
| 11658 | ); | ||
| 11659 | }, | ||
| 11660 | else => return self.fail("TODO implement genSetMem for {s} of {}", .{ | ||
| 11661 | @tagName(src_mcv), ty.fmt(mod), | ||
| 11662 | }), | ||
| 11663 | }, | 11602 | }, |
| 11664 | .register_offset, | 11603 | .register_offset, |
| 11665 | .memory, | 11604 | .memory, |
src/arch/x86_64/Encoding.zig+3-3| ... | @@ -232,7 +232,7 @@ pub const Mnemonic = enum { | ... | @@ -232,7 +232,7 @@ pub const Mnemonic = enum { |
| 232 | cmp, | 232 | cmp, |
| 233 | cmps, cmpsb, cmpsd, cmpsq, cmpsw, | 233 | cmps, cmpsb, cmpsd, cmpsq, cmpsw, |
| 234 | cmpxchg, cmpxchg8b, cmpxchg16b, | 234 | cmpxchg, cmpxchg8b, cmpxchg16b, |
| 235 | cpuid, cqo, cwd, cwde, | 235 | cqo, cwd, cwde, |
| 236 | div, | 236 | div, |
| 237 | idiv, imul, int3, | 237 | idiv, imul, int3, |
| 238 | ja, jae, jb, jbe, jc, jrcxz, je, jg, jge, jl, jle, jna, jnae, jnb, jnbe, | 238 | ja, jae, jb, jbe, jc, jrcxz, je, jg, jge, jl, jle, jna, jnae, jnb, jnbe, |
| ... | @@ -246,7 +246,7 @@ pub const Mnemonic = enum { | ... | @@ -246,7 +246,7 @@ pub const Mnemonic = enum { |
| 246 | movsx, movsxd, movzx, mul, | 246 | movsx, movsxd, movzx, mul, |
| 247 | neg, nop, not, | 247 | neg, nop, not, |
| 248 | @"or", | 248 | @"or", |
| 249 | pause, pop, popcnt, push, | 249 | pop, popcnt, push, |
| 250 | rcl, rcr, ret, rol, ror, | 250 | rcl, rcr, ret, rol, ror, |
| 251 | sal, sar, sbb, | 251 | sal, sar, sbb, |
| 252 | scas, scasb, scasd, scasq, scasw, | 252 | scas, scasb, scasd, scasq, scasw, |
| ... | @@ -258,7 +258,7 @@ pub const Mnemonic = enum { | ... | @@ -258,7 +258,7 @@ pub const Mnemonic = enum { |
| 258 | stos, stosb, stosd, stosq, stosw, | 258 | stos, stosb, stosd, stosq, stosw, |
| 259 | @"test", tzcnt, | 259 | @"test", tzcnt, |
| 260 | ud2, | 260 | ud2, |
| 261 | xadd, xchg, xgetbv, xor, | 261 | xadd, xchg, xor, |
| 262 | // X87 | 262 | // X87 |
| 263 | fabs, fchs, ffree, fisttp, fld, fst, fstp, | 263 | fabs, fchs, ffree, fisttp, fld, fst, fstp, |
| 264 | // MMX | 264 | // MMX |
src/arch/x86_64/Mir.zig-6| ... | @@ -327,8 +327,6 @@ pub const Inst = struct { | ... | @@ -327,8 +327,6 @@ pub const Inst = struct { |
| 327 | /// Compare and exchange | 327 | /// Compare and exchange |
| 328 | /// Compare and exchange bytes | 328 | /// Compare and exchange bytes |
| 329 | cmpxchg, | 329 | cmpxchg, |
| 330 | /// CPU identification | ||
| 331 | cpuid, | ||
| 332 | /// Convert doubleword to quadword | 330 | /// Convert doubleword to quadword |
| 333 | cqo, | 331 | cqo, |
| 334 | /// Convert word to doubleword | 332 | /// Convert word to doubleword |
| ... | @@ -388,8 +386,6 @@ pub const Inst = struct { | ... | @@ -388,8 +386,6 @@ pub const Inst = struct { |
| 388 | /// Bitwise logical or of packed single-precision floating-point values | 386 | /// Bitwise logical or of packed single-precision floating-point values |
| 389 | /// Bitwise logical or of packed double-precision floating-point values | 387 | /// Bitwise logical or of packed double-precision floating-point values |
| 390 | @"or", | 388 | @"or", |
| 391 | /// Spin loop hint | ||
| 392 | pause, | ||
| 393 | /// Pop | 389 | /// Pop |
| 394 | pop, | 390 | pop, |
| 395 | /// Return the count of number of bits set to 1 | 391 | /// Return the count of number of bits set to 1 |
| ... | @@ -441,8 +437,6 @@ pub const Inst = struct { | ... | @@ -441,8 +437,6 @@ pub const Inst = struct { |
| 441 | xadd, | 437 | xadd, |
| 442 | /// Exchange register/memory with register | 438 | /// Exchange register/memory with register |
| 443 | xchg, | 439 | xchg, |
| 444 | /// Get value of extended control register | ||
| 445 | xgetbv, | ||
| 446 | /// Logical exclusive-or | 440 | /// Logical exclusive-or |
| 447 | /// Bitwise logical xor of packed single-precision floating-point values | 441 | /// Bitwise logical xor of packed single-precision floating-point values |
| 448 | /// Bitwise logical xor of packed double-precision floating-point values | 442 | /// Bitwise logical xor of packed double-precision floating-point values |
src/arch/x86_64/encodings.zig-6| ... | @@ -266,8 +266,6 @@ pub const table = [_]Entry{ | ... | @@ -266,8 +266,6 @@ pub const table = [_]Entry{ |
| 266 | .{ .cmpxchg8b, .m, &.{ .m64 }, &.{ 0x0f, 0xc7 }, 1, .none, .none }, | 266 | .{ .cmpxchg8b, .m, &.{ .m64 }, &.{ 0x0f, 0xc7 }, 1, .none, .none }, |
| 267 | .{ .cmpxchg16b, .m, &.{ .m128 }, &.{ 0x0f, 0xc7 }, 1, .long, .none }, | 267 | .{ .cmpxchg16b, .m, &.{ .m128 }, &.{ 0x0f, 0xc7 }, 1, .long, .none }, |
| 268 | 268 | ||
| 269 | .{ .cpuid, .np, &.{}, &.{ 0x0f, 0xa2 }, 0, .none, .none }, | ||
| 270 | |||
| 271 | .{ .div, .m, &.{ .rm8 }, &.{ 0xf6 }, 6, .none, .none }, | 269 | .{ .div, .m, &.{ .rm8 }, &.{ 0xf6 }, 6, .none, .none }, |
| 272 | .{ .div, .m, &.{ .rm8 }, &.{ 0xf6 }, 6, .rex, .none }, | 270 | .{ .div, .m, &.{ .rm8 }, &.{ 0xf6 }, 6, .rex, .none }, |
| 273 | .{ .div, .m, &.{ .rm16 }, &.{ 0xf7 }, 6, .short, .none }, | 271 | .{ .div, .m, &.{ .rm16 }, &.{ 0xf7 }, 6, .short, .none }, |
| ... | @@ -471,8 +469,6 @@ pub const table = [_]Entry{ | ... | @@ -471,8 +469,6 @@ pub const table = [_]Entry{ |
| 471 | .{ .@"or", .rm, &.{ .r32, .rm32 }, &.{ 0x0b }, 0, .none, .none }, | 469 | .{ .@"or", .rm, &.{ .r32, .rm32 }, &.{ 0x0b }, 0, .none, .none }, |
| 472 | .{ .@"or", .rm, &.{ .r64, .rm64 }, &.{ 0x0b }, 0, .long, .none }, | 470 | .{ .@"or", .rm, &.{ .r64, .rm64 }, &.{ 0x0b }, 0, .long, .none }, |
| 473 | 471 | ||
| 474 | .{ .pause, .np, &.{}, &.{ 0xf3, 0x90 }, 0, .none, .none }, | ||
| 475 | |||
| 476 | .{ .pop, .o, &.{ .r16 }, &.{ 0x58 }, 0, .short, .none }, | 472 | .{ .pop, .o, &.{ .r16 }, &.{ 0x58 }, 0, .short, .none }, |
| 477 | .{ .pop, .o, &.{ .r64 }, &.{ 0x58 }, 0, .none, .none }, | 473 | .{ .pop, .o, &.{ .r64 }, &.{ 0x58 }, 0, .none, .none }, |
| 478 | .{ .pop, .m, &.{ .rm16 }, &.{ 0x8f }, 0, .short, .none }, | 474 | .{ .pop, .m, &.{ .rm16 }, &.{ 0x8f }, 0, .short, .none }, |
| ... | @@ -809,8 +805,6 @@ pub const table = [_]Entry{ | ... | @@ -809,8 +805,6 @@ pub const table = [_]Entry{ |
| 809 | .{ .xchg, .rm, &.{ .r32, .rm32 }, &.{ 0x87 }, 0, .none, .none }, | 805 | .{ .xchg, .rm, &.{ .r32, .rm32 }, &.{ 0x87 }, 0, .none, .none }, |
| 810 | .{ .xchg, .rm, &.{ .r64, .rm64 }, &.{ 0x87 }, 0, .long, .none }, | 806 | .{ .xchg, .rm, &.{ .r64, .rm64 }, &.{ 0x87 }, 0, .long, .none }, |
| 811 | 807 | ||
| 812 | .{ .xgetbv, .np, &.{}, &.{ 0x0f, 0x01 }, 0, .none, .none }, | ||
| 813 | |||
| 814 | .{ .xor, .zi, &.{ .al, .imm8 }, &.{ 0x34 }, 0, .none, .none }, | 808 | .{ .xor, .zi, &.{ .al, .imm8 }, &.{ 0x34 }, 0, .none, .none }, |
| 815 | .{ .xor, .zi, &.{ .ax, .imm16 }, &.{ 0x35 }, 0, .short, .none }, | 809 | .{ .xor, .zi, &.{ .ax, .imm16 }, &.{ 0x35 }, 0, .short, .none }, |
| 816 | .{ .xor, .zi, &.{ .eax, .imm32 }, &.{ 0x35 }, 0, .none, .none }, | 810 | .{ .xor, .zi, &.{ .eax, .imm32 }, &.{ 0x35 }, 0, .none, .none }, |
src/codegen.zig+2-2| ... | @@ -545,7 +545,7 @@ pub fn generateSymbol( | ... | @@ -545,7 +545,7 @@ pub fn generateSymbol( |
| 545 | 545 | ||
| 546 | if (layout.payload_size == 0) { | 546 | if (layout.payload_size == 0) { |
| 547 | return generateSymbol(bin_file, src_loc, .{ | 547 | return generateSymbol(bin_file, src_loc, .{ |
| 548 | .ty = typed_value.ty.unionTagTypeSafety(mod).?, | 548 | .ty = typed_value.ty.unionTagType(mod).?, |
| 549 | .val = un.tag.toValue(), | 549 | .val = un.tag.toValue(), |
| 550 | }, code, debug_output, reloc_info); | 550 | }, code, debug_output, reloc_info); |
| 551 | } | 551 | } |
| ... | @@ -553,7 +553,7 @@ pub fn generateSymbol( | ... | @@ -553,7 +553,7 @@ pub fn generateSymbol( |
| 553 | // Check if we should store the tag first. | 553 | // Check if we should store the tag first. |
| 554 | if (layout.tag_size > 0 and layout.tag_align.compare(.gte, layout.payload_align)) { | 554 | if (layout.tag_size > 0 and layout.tag_align.compare(.gte, layout.payload_align)) { |
| 555 | switch (try generateSymbol(bin_file, src_loc, .{ | 555 | switch (try generateSymbol(bin_file, src_loc, .{ |
| 556 | .ty = typed_value.ty.unionTagTypeSafety(mod).?, | 556 | .ty = typed_value.ty.unionTagType(mod).?, |
| 557 | .val = un.tag.toValue(), | 557 | .val = un.tag.toValue(), |
| 558 | }, code, debug_output, reloc_info)) { | 558 | }, code, debug_output, reloc_info)) { |
| 559 | .ok => {}, | 559 | .ok => {}, |
test/behavior/basic.zig+1-1| ... | @@ -745,12 +745,12 @@ test "auto created variables have correct alignment" { | ... | @@ -745,12 +745,12 @@ test "auto created variables have correct alignment" { |
| 745 | 745 | ||
| 746 | test "extern variable with non-pointer opaque type" { | 746 | test "extern variable with non-pointer opaque type" { |
| 747 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 747 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 748 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 748 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 749 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 749 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 750 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 750 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 751 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 751 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 752 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 752 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 753 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 753 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 754 | 754 | ||
| 755 | @export(var_to_export, .{ .name = "opaque_extern_var" }); | 755 | @export(var_to_export, .{ .name = "opaque_extern_var" }); |
| 756 | try expect(@as(*align(1) u32, @ptrCast(&opaque_extern_var)).* == 42); | 756 | try expect(@as(*align(1) u32, @ptrCast(&opaque_extern_var)).* == 42); |
test/behavior/bitcast.zig+1-2| ... | @@ -411,9 +411,8 @@ test "bitcast nan float does not modify signaling bit" { | ... | @@ -411,9 +411,8 @@ test "bitcast nan float does not modify signaling bit" { |
| 411 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 411 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 412 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 412 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 413 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 413 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 414 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 414 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 415 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 415 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 416 | |||
| 417 | // TODO: https://github.com/ziglang/zig/issues/14366 | 416 | // TODO: https://github.com/ziglang/zig/issues/14366 |
| 418 | if (builtin.zig_backend == .stage2_llvm and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; | 417 | if (builtin.zig_backend == .stage2_llvm and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest; |
| 419 | 418 |
test/behavior/bugs/6781.zig+1-1| ... | @@ -64,11 +64,11 @@ pub const JournalHeader = packed struct { | ... | @@ -64,11 +64,11 @@ pub const JournalHeader = packed struct { |
| 64 | test "fixed" { | 64 | test "fixed" { |
| 65 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 65 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 66 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 66 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 67 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 67 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 68 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 68 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 69 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 69 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 70 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 70 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 71 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 71 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 72 | 72 | ||
| 73 | var buffer align(@alignOf(JournalHeader)) = [_]u8{0} ** 65536; | 73 | var buffer align(@alignOf(JournalHeader)) = [_]u8{0} ** 65536; |
| 74 | var entry = std.mem.bytesAsValue(JournalHeader, buffer[0..@sizeOf(JournalHeader)]); | 74 | var entry = std.mem.bytesAsValue(JournalHeader, buffer[0..@sizeOf(JournalHeader)]); |
test/behavior/bugs/920.zig+1-1| ... | @@ -57,11 +57,11 @@ const NormalDist = blk: { | ... | @@ -57,11 +57,11 @@ const NormalDist = blk: { |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | test "bug 920 fixed" { | 59 | test "bug 920 fixed" { |
| 60 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 60 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 61 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 61 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 62 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 62 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 63 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 63 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 64 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 64 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 65 | 65 | ||
| 66 | const NormalDist1 = blk: { | 66 | const NormalDist1 = blk: { |
| 67 | break :blk ZigTableGen(true, norm_r, norm_v, norm_f, norm_f_inv, norm_zero_case); | 67 | break :blk ZigTableGen(true, norm_r, norm_v, norm_f, norm_f_inv, norm_zero_case); |
test/behavior/cast.zig+4-3| ... | @@ -1606,8 +1606,8 @@ test "peer type resolution: const sentinel slice and mutable non-sentinel slice" | ... | @@ -1606,8 +1606,8 @@ test "peer type resolution: const sentinel slice and mutable non-sentinel slice" |
| 1606 | test "peer type resolution: float and comptime-known fixed-width integer" { | 1606 | test "peer type resolution: float and comptime-known fixed-width integer" { |
| 1607 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1607 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1608 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1608 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1609 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 1609 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1610 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1610 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 1611 | 1611 | ||
| 1612 | const i: u8 = 100; | 1612 | const i: u8 = 100; |
| 1613 | var f: f32 = 1.234; | 1613 | var f: f32 = 1.234; |
| ... | @@ -2372,7 +2372,7 @@ test "@intFromBool on vector" { | ... | @@ -2372,7 +2372,7 @@ test "@intFromBool on vector" { |
| 2372 | } | 2372 | } |
| 2373 | 2373 | ||
| 2374 | test "numeric coercions with undefined" { | 2374 | test "numeric coercions with undefined" { |
| 2375 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | 2375 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| 2376 | 2376 | ||
| 2377 | const from: i32 = undefined; | 2377 | const from: i32 = undefined; |
| 2378 | var to: f32 = from; | 2378 | var to: f32 = from; |
| ... | @@ -2383,6 +2383,7 @@ test "numeric coercions with undefined" { | ... | @@ -2383,6 +2383,7 @@ test "numeric coercions with undefined" { |
| 2383 | 2383 | ||
| 2384 | test "15-bit int to float" { | 2384 | test "15-bit int to float" { |
| 2385 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 2385 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 2386 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 2386 | 2387 | ||
| 2387 | var a: u15 = 42; | 2388 | var a: u15 = 42; |
| 2388 | var b: f32 = @floatFromInt(a); | 2389 | var b: f32 = @floatFromInt(a); |
| ... | @@ -2390,11 +2391,11 @@ test "15-bit int to float" { | ... | @@ -2390,11 +2391,11 @@ test "15-bit int to float" { |
| 2390 | } | 2391 | } |
| 2391 | 2392 | ||
| 2392 | test "@as does not corrupt values with incompatible representations" { | 2393 | test "@as does not corrupt values with incompatible representations" { |
| 2394 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 2393 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 2395 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 2394 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 2396 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 2395 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 2397 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 2396 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 2398 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 2397 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 2398 | 2399 | ||
| 2399 | const x: f32 = @as(f16, blk: { | 2400 | const x: f32 = @as(f16, blk: { |
| 2400 | if (false) { | 2401 | if (false) { |
test/behavior/cast_int.zig+1| ... | @@ -199,6 +199,7 @@ test "load non byte-sized value in union" { | ... | @@ -199,6 +199,7 @@ test "load non byte-sized value in union" { |
| 199 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 199 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 200 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; | 200 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; |
| 201 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 201 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 202 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 202 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; | 203 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; |
| 203 | 204 | ||
| 204 | // note: this bug is triggered by the == operator, expectEqual will hide it | 205 | // note: this bug is triggered by the == operator, expectEqual will hide it |
test/behavior/fn.zig+1-1| ... | @@ -425,8 +425,8 @@ test "implicit cast function to function ptr" { | ... | @@ -425,8 +425,8 @@ test "implicit cast function to function ptr" { |
| 425 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 425 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 426 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 426 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 427 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 427 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 428 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 428 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 429 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 429 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 430 | 430 | ||
| 431 | const S1 = struct { | 431 | const S1 = struct { |
| 432 | export fn someFunctionThatReturnsAValue() c_int { | 432 | export fn someFunctionThatReturnsAValue() c_int { |
test/behavior/int128.zig+1| ... | @@ -66,6 +66,7 @@ test "int128" { | ... | @@ -66,6 +66,7 @@ test "int128" { |
| 66 | 66 | ||
| 67 | test "truncate int128" { | 67 | test "truncate int128" { |
| 68 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 68 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 69 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 69 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 70 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 70 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 71 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 71 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 72 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
test/behavior/packed-struct.zig+2-2| ... | @@ -659,12 +659,12 @@ test "optional pointer in packed struct" { | ... | @@ -659,12 +659,12 @@ test "optional pointer in packed struct" { |
| 659 | test "nested packed struct field access test" { | 659 | test "nested packed struct field access test" { |
| 660 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO | 660 | if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO |
| 661 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO packed structs larger than 64 bits | 661 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO packed structs larger than 64 bits |
| 662 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 662 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 663 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 663 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 664 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 664 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 665 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 665 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 666 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 666 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | 667 | // |
| 667 | |||
| 668 | const Vec2 = packed struct { | 668 | const Vec2 = packed struct { |
| 669 | x: f32, | 669 | x: f32, |
| 670 | y: f32, | 670 | y: f32, |
test/behavior/translate_c_macros.zig+1-1| ... | @@ -151,11 +151,11 @@ test "string and char literals that are not UTF-8 encoded. Issue #12784" { | ... | @@ -151,11 +151,11 @@ test "string and char literals that are not UTF-8 encoded. Issue #12784" { |
| 151 | 151 | ||
| 152 | test "Macro that uses division operator. Issue #13162" { | 152 | test "Macro that uses division operator. Issue #13162" { |
| 153 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 153 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 154 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 154 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 155 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 155 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 156 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 156 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 157 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 157 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; | 158 | if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; |
| 158 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 159 | 159 | ||
| 160 | try expectEqual(@as(c_int, 42), h.DIVIDE_CONSTANT(@as(c_int, 42_000))); | 160 | try expectEqual(@as(c_int, 42), h.DIVIDE_CONSTANT(@as(c_int, 42_000))); |
| 161 | try expectEqual(@as(c_uint, 42), h.DIVIDE_CONSTANT(@as(c_uint, 42_000))); | 161 | try expectEqual(@as(c_uint, 42), h.DIVIDE_CONSTANT(@as(c_uint, 42_000))); |
test/behavior/tuple.zig+1-1| ... | @@ -370,8 +370,8 @@ test "tuple initialized with a runtime known value" { | ... | @@ -370,8 +370,8 @@ test "tuple initialized with a runtime known value" { |
| 370 | test "tuple of struct concatenation and coercion to array" { | 370 | test "tuple of struct concatenation and coercion to array" { |
| 371 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; | 371 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; |
| 372 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; | 372 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; |
| 373 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; | ||
| 373 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 374 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 374 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 375 | 375 | ||
| 376 | const StructWithDefault = struct { value: f32 = 42 }; | 376 | const StructWithDefault = struct { value: f32 = 42 }; |
| 377 | const SomeStruct = struct { array: [4]StructWithDefault }; | 377 | const SomeStruct = struct { array: [4]StructWithDefault }; |
test/behavior/vector.zig+1-1| ... | @@ -1329,8 +1329,8 @@ test "store to vector in slice" { | ... | @@ -1329,8 +1329,8 @@ test "store to vector in slice" { |
| 1329 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO | 1329 | if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO |
| 1330 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO | 1330 | if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO |
| 1331 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO | 1331 | if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO |
| 1332 | if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO | ||
| 1332 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO | 1333 | if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO |
| 1333 | if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf) return error.SkipZigTest; | ||
| 1334 | 1334 | ||
| 1335 | var v = [_]@Vector(3, f32){ | 1335 | var v = [_]@Vector(3, f32){ |
| 1336 | .{ 1, 1, 1 }, | 1336 | .{ 1, 1, 1 }, |
test/tests.zig+3-7| ... | @@ -985,9 +985,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { | ... | @@ -985,9 +985,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { |
| 985 | continue; | 985 | continue; |
| 986 | 986 | ||
| 987 | // TODO get compiler-rt tests passing for self-hosted backends. | 987 | // TODO get compiler-rt tests passing for self-hosted backends. |
| 988 | if ((test_target.target.getCpuArch() != .x86_64 or | 988 | if (test_target.use_llvm == false and mem.eql(u8, options.name, "compiler-rt")) |
| 989 | test_target.target.getObjectFormat() != .elf) and | ||
| 990 | test_target.use_llvm == false and mem.eql(u8, options.name, "compiler-rt")) | ||
| 991 | continue; | 989 | continue; |
| 992 | 990 | ||
| 993 | // TODO get compiler-rt tests passing for wasm32-wasi | 991 | // TODO get compiler-rt tests passing for wasm32-wasi |
| ... | @@ -1004,10 +1002,8 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { | ... | @@ -1004,10 +1002,8 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { |
| 1004 | test_target.use_llvm == false and mem.eql(u8, options.name, "universal-libc")) | 1002 | test_target.use_llvm == false and mem.eql(u8, options.name, "universal-libc")) |
| 1005 | continue; | 1003 | continue; |
| 1006 | 1004 | ||
| 1007 | // TODO get std lib tests passing for other self-hosted backends. | 1005 | // TODO get std lib tests passing for self-hosted backends. |
| 1008 | if ((test_target.target.getCpuArch() != .x86_64 or | 1006 | if (test_target.use_llvm == false and mem.eql(u8, options.name, "std")) |
| 1009 | test_target.target.getObjectFormat() != .elf) and | ||
| 1010 | test_target.use_llvm == false and mem.eql(u8, options.name, "std")) | ||
| 1011 | continue; | 1007 | continue; |
| 1012 | 1008 | ||
| 1013 | const want_this_mode = for (options.optimize_modes) |m| { | 1009 | const want_this_mode = for (options.optimize_modes) |m| { |
tools/lldb_pretty_printers.py+8-19| ... | @@ -355,28 +355,17 @@ class Module_Decl__Module_Decl_Index_SynthProvider: | ... | @@ -355,28 +355,17 @@ class Module_Decl__Module_Decl_Index_SynthProvider: |
| 355 | def __init__(self, value, _=None): self.value = value | 355 | def __init__(self, value, _=None): self.value = value |
| 356 | def update(self): | 356 | def update(self): |
| 357 | try: | 357 | try: |
| 358 | ip = InternPool_Find(self.value.thread) | 358 | for frame in self.value.thread: |
| 359 | if not ip: return | 359 | mod = frame.FindVariable('mod') or frame.FindVariable('module') |
| 360 | self.ptr = ip.GetChildMemberWithName('allocated_decls').GetChildAtIndex(self.value.unsigned).address_of.Clone('decl') | 360 | if mod: break |
| 361 | else: return | ||
| 362 | self.ptr = mod.GetChildMemberWithName('allocated_decls').GetChildAtIndex(self.value.unsigned).address_of.Clone('decl') | ||
| 361 | except: pass | 363 | except: pass |
| 362 | def has_children(self): return True | 364 | def has_children(self): return True |
| 363 | def num_children(self): return 1 | 365 | def num_children(self): return 1 |
| 364 | def get_child_index(self, name): return 0 if name == 'decl' else -1 | 366 | def get_child_index(self, name): return 0 if name == 'decl' else -1 |
| 365 | def get_child_at_index(self, index): return self.ptr if index == 0 else None | 367 | def get_child_at_index(self, index): return self.ptr if index == 0 else None |
| 366 | 368 | ||
| 367 | class Module_Namespace__Module_Namespace_Index_SynthProvider: | ||
| 368 | def __init__(self, value, _=None): self.value = value | ||
| 369 | def update(self): | ||
| 370 | try: | ||
| 371 | ip = InternPool_Find(self.value.thread) | ||
| 372 | if not ip: return | ||
| 373 | self.ptr = ip.GetChildMemberWithName('allocated_namespaces').GetChildAtIndex(self.value.unsigned).address_of.Clone('namespace') | ||
| 374 | except: pass | ||
| 375 | def has_children(self): return True | ||
| 376 | def num_children(self): return 1 | ||
| 377 | def get_child_index(self, name): return 0 if name == 'namespace' else -1 | ||
| 378 | def get_child_at_index(self, index): return self.ptr if index == 0 else None | ||
| 379 | |||
| 380 | class TagOrPayloadPtr_SynthProvider: | 369 | class TagOrPayloadPtr_SynthProvider: |
| 381 | def __init__(self, value, _=None): self.value = value | 370 | def __init__(self, value, _=None): self.value = value |
| 382 | def update(self): | 371 | def update(self): |
| ... | @@ -451,9 +440,10 @@ class InternPool_Index_SynthProvider: | ... | @@ -451,9 +440,10 @@ class InternPool_Index_SynthProvider: |
| 451 | for encoding_field in encoding_type.fields: | 440 | for encoding_field in encoding_type.fields: |
| 452 | if encoding_field.name == 'data': | 441 | if encoding_field.name == 'data': |
| 453 | if encoding_field.type.IsPointerType(): | 442 | if encoding_field.type.IsPointerType(): |
| 443 | data_type = encoding_field.type.GetPointeeType() | ||
| 454 | extra_index = data.unsigned | 444 | extra_index = data.unsigned |
| 455 | self.data = extra.GetChildAtIndex(extra_index).address_of.Cast(encoding_field.type).deref.Clone('data') | 445 | self.data = extra.GetChildAtIndex(extra_index).Cast(data_type).Clone('data') |
| 456 | extra_index += encoding_field.type.GetPointeeType().num_fields | 446 | extra_index += data_type.num_fields |
| 457 | else: | 447 | else: |
| 458 | self.data = data.Cast(encoding_field.type).Clone('data') | 448 | self.data = data.Cast(encoding_field.type).Clone('data') |
| 459 | elif encoding_field.name == 'trailing': | 449 | elif encoding_field.name == 'trailing': |
| ... | @@ -710,7 +700,6 @@ def __lldb_init_module(debugger, _=None): | ... | @@ -710,7 +700,6 @@ def __lldb_init_module(debugger, _=None): |
| 710 | add(debugger, category='zig.stage2', regex=True, type=MultiArrayList_Entry('Air\\.Inst'), identifier='TagAndPayload', synth=True, inline_children=True, summary=True) | 700 | add(debugger, category='zig.stage2', regex=True, type=MultiArrayList_Entry('Air\\.Inst'), identifier='TagAndPayload', synth=True, inline_children=True, summary=True) |
| 711 | add(debugger, category='zig.stage2', regex=True, type='^Air\\.Inst\\.Data\\.Data__struct_[1-9][0-9]*$', inline_children=True, summary=True) | 701 | add(debugger, category='zig.stage2', regex=True, type='^Air\\.Inst\\.Data\\.Data__struct_[1-9][0-9]*$', inline_children=True, summary=True) |
| 712 | add(debugger, category='zig.stage2', type='Module.Decl::Module.Decl.Index', synth=True) | 702 | add(debugger, category='zig.stage2', type='Module.Decl::Module.Decl.Index', synth=True) |
| 713 | add(debugger, category='zig.stage2', type='Module.Namespace::Module.Namespace.Index', synth=True) | ||
| 714 | add(debugger, category='zig.stage2', type='Module.LazySrcLoc', identifier='zig_TaggedUnion', synth=True) | 703 | add(debugger, category='zig.stage2', type='Module.LazySrcLoc', identifier='zig_TaggedUnion', synth=True) |
| 715 | add(debugger, category='zig.stage2', type='InternPool.Index', synth=True) | 704 | add(debugger, category='zig.stage2', type='InternPool.Index', synth=True) |
| 716 | add(debugger, category='zig.stage2', type='InternPool.NullTerminatedString', summary=True) | 705 | add(debugger, category='zig.stage2', type='InternPool.NullTerminatedString', summary=True) |