diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-10-22 08:06:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-22 08:06:47 -0400 |
| commit | 0c99ba1eab63865592bb084feb271cd4e4b0357e (patch) | |
| tree | 7004c99fc0619ff94317cc176900d1d3a3c88335 /lib/std/sort.zig | |
| parent | 5f92b070bf284f1493b1b5d433dd3adde2f46727 (diff) | |
| parent | 920e9668ddb16fbb98cd08b43ed2364062a4b102 (diff) | |
| download | zig-0c99ba1eab63865592bb084feb271cd4e4b0357e.tar.gz zig-0c99ba1eab63865592bb084feb271cd4e4b0357e.zip | |
Merge pull request #17637 from jacobly0/x86_64-test-std
x86_64: start to enable `test-std` and `test-compiler-rt` testing
Diffstat (limited to 'lib/std/sort.zig')
| -rw-r--r-- | lib/std/sort.zig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/std/sort.zig b/lib/std/sort.zig index e110a8beb8..149f632944 100644 --- a/lib/std/sort.zig +++ b/lib/std/sort.zig @@ -1,5 +1,6 @@ const std = @import("std.zig"); const assert = std.debug.assert; +const builtin = @import("builtin"); const testing = std.testing; const mem = std.mem; const math = std.math; @@ -176,6 +177,8 @@ const IdAndValue = struct { }; test "stable sort" { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + const expected = [_]IdAndValue{ IdAndValue{ .id = 0, .value = 0 }, IdAndValue{ .id = 1, .value = 0 }, @@ -223,6 +226,8 @@ test "stable sort" { } test "sort" { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + const u8cases = [_][]const []const u8{ &[_][]const u8{ "", @@ -301,6 +306,8 @@ test "sort" { } test "sort descending" { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + const rev_cases = [_][]const []const i32{ &[_][]const i32{ &[_]i32{}, @@ -340,6 +347,8 @@ test "sort descending" { } test "sort with context in the middle of a slice" { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + const Context = struct { items: []i32, @@ -379,6 +388,8 @@ test "sort with context in the middle of a slice" { } test "sort fuzz testing" { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + var prng = std.rand.DefaultPrng.init(0x12345678); const random = prng.random(); const test_case_count = 10; |
