diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-03-23 14:06:07 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-23 14:06:07 -0700 |
| commit | f27d3409bdbe4a2b1b59f0b7336e582488e35986 (patch) | |
| tree | e1a7049ef9c553c002f56b6307f581b71e927d0c /test/behavior/select.zig | |
| parent | a2b0b0015d8a0c7aff451ae723ed2f30360ca33f (diff) | |
| download | zig-f27d3409bdbe4a2b1b59f0b7336e582488e35986.tar.gz zig-f27d3409bdbe4a2b1b59f0b7336e582488e35986.zip | |
behavior tests: disable failing stage1 test
My previous commit added a new behavior test that passes for stage2 but
I forgot to check whether it passes for stage1. Since it does not, it
has to be disabled.
Additionally, this commit organizes behavior tests; there is no longer a
section of tests only passing for stage1. Instead, tests are disabled on
an individual basis. There is an except for the file which has global
assembly in it.
Diffstat (limited to 'test/behavior/select.zig')
| -rw-r--r-- | test/behavior/select.zig | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/test/behavior/select.zig b/test/behavior/select.zig index 5c69094413..8b4cba49bd 100644 --- a/test/behavior/select.zig +++ b/test/behavior/select.zig @@ -2,20 +2,21 @@ const std = @import("std"); const builtin = @import("builtin"); const mem = std.mem; const expect = std.testing.expect; -const Vector = std.meta.Vector; test "@select" { + if (@import("builtin").zig_backend != .stage1) return error.SkipZigTest; // TODO + const S = struct { fn doTheTest() !void { - var a: Vector(4, bool) = [4]bool{ true, false, true, false }; - var b: Vector(4, i32) = [4]i32{ -1, 4, 999, -31 }; - var c: Vector(4, i32) = [4]i32{ -5, 1, 0, 1234 }; + var a: @Vector(4, bool) = [4]bool{ true, false, true, false }; + var b: @Vector(4, i32) = [4]i32{ -1, 4, 999, -31 }; + var c: @Vector(4, i32) = [4]i32{ -5, 1, 0, 1234 }; var abc = @select(i32, a, b, c); try expect(mem.eql(i32, &@as([4]i32, abc), &[4]i32{ -1, 1, 999, 1234 })); - var x: Vector(4, bool) = [4]bool{ false, false, false, true }; - var y: Vector(4, f32) = [4]f32{ 0.001, 33.4, 836, -3381.233 }; - var z: Vector(4, f32) = [4]f32{ 0.0, 312.1, -145.9, 9993.55 }; + var x: @Vector(4, bool) = [4]bool{ false, false, false, true }; + var y: @Vector(4, f32) = [4]f32{ 0.001, 33.4, 836, -3381.233 }; + var z: @Vector(4, f32) = [4]f32{ 0.0, 312.1, -145.9, 9993.55 }; var xyz = @select(f32, x, y, z); try expect(mem.eql(f32, &@as([4]f32, xyz), &[4]f32{ 0.0, 312.1, -145.9, -3381.233 })); } |
