diff options
| author | Robin Voetter <robin@voetter.nl> | 2023-07-01 14:30:32 +0200 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2023-07-01 19:45:09 +0200 |
| commit | 073289d0dadfd1ea0088837563a109100b065ed3 (patch) | |
| tree | 0f418d7fd310b768ba343aa7778b528f7ec02135 /test | |
| parent | aa398034eb1b2fd74e1815ae2e75ca1a3ca4a567 (diff) | |
| download | zig-073289d0dadfd1ea0088837563a109100b065ed3.tar.gz zig-073289d0dadfd1ea0088837563a109100b065ed3.zip | |
spirv: disable new behavior tests that do not pass
Some new behavior tests have recently been added, and not all of these
pass with the SPIR-V backend.
Diffstat (limited to 'test')
| -rw-r--r-- | test/behavior/c_char_signedness.zig | 3 | ||||
| -rw-r--r-- | test/behavior/call.zig | 2 | ||||
| -rw-r--r-- | test/behavior/comptime_memory.zig | 2 | ||||
| -rw-r--r-- | test/behavior/enum.zig | 2 | ||||
| -rw-r--r-- | test/behavior/maximum_minimum.zig | 2 | ||||
| -rw-r--r-- | test/behavior/ptrfromint.zig | 2 |
6 files changed, 13 insertions, 0 deletions
diff --git a/test/behavior/c_char_signedness.zig b/test/behavior/c_char_signedness.zig index 2484f9c5dc..6b0bfe4049 100644 --- a/test/behavior/c_char_signedness.zig +++ b/test/behavior/c_char_signedness.zig @@ -1,10 +1,13 @@ const std = @import("std"); +const builtin = @import("builtin"); const expectEqual = std.testing.expectEqual; const c = @cImport({ @cInclude("limits.h"); }); test "c_char signedness" { + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; + try expectEqual(@as(c_char, c.CHAR_MIN), std.math.minInt(c_char)); try expectEqual(@as(c_char, c.CHAR_MAX), std.math.maxInt(c_char)); } diff --git a/test/behavior/call.zig b/test/behavior/call.zig index 633f5e9c3f..c33c872347 100644 --- a/test/behavior/call.zig +++ b/test/behavior/call.zig @@ -417,6 +417,8 @@ test "inline while with @call" { } test "method call as parameter type" { + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; + const S = struct { fn foo(x: anytype, y: @TypeOf(x).Inner()) @TypeOf(y) { return y; diff --git a/test/behavior/comptime_memory.zig b/test/behavior/comptime_memory.zig index 9895be061d..639de0f5f2 100644 --- a/test/behavior/comptime_memory.zig +++ b/test/behavior/comptime_memory.zig @@ -433,6 +433,8 @@ test "dereference undefined pointer to zero-bit type" { } test "type pun extern struct" { + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; + const S = extern struct { f: u8 }; comptime var s = S{ .f = 123 }; @as(*u8, @ptrCast(&s)).* = 72; diff --git a/test/behavior/enum.zig b/test/behavior/enum.zig index ffb254f765..a472dc87a4 100644 --- a/test/behavior/enum.zig +++ b/test/behavior/enum.zig @@ -1199,6 +1199,8 @@ test "enum tag from a local variable" { } test "auto-numbered enum with signed tag type" { + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; + const E = enum(i32) { a, b }; try std.testing.expectEqual(@as(i32, 0), @intFromEnum(E.a)); diff --git a/test/behavior/maximum_minimum.zig b/test/behavior/maximum_minimum.zig index 0844cdd282..926d94a2f8 100644 --- a/test/behavior/maximum_minimum.zig +++ b/test/behavior/maximum_minimum.zig @@ -297,6 +297,8 @@ test "@min/@max notices bounds from vector types when element of comptime-known } test "@min/@max of signed and unsigned runtime integers" { + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; + var x: i32 = -1; var y: u31 = 1; diff --git a/test/behavior/ptrfromint.zig b/test/behavior/ptrfromint.zig index 72244aa7d1..2cf72936a1 100644 --- a/test/behavior/ptrfromint.zig +++ b/test/behavior/ptrfromint.zig @@ -33,6 +33,7 @@ test "@ptrFromInt creates null pointer" { if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; const ptr = @as(?*u32, @ptrFromInt(0)); try expectEqual(@as(?*u32, null), ptr); @@ -42,6 +43,7 @@ test "@ptrFromInt creates allowzero zero pointer" { if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; const ptr = @as(*allowzero u32, @ptrFromInt(0)); try expectEqual(@as(usize, 0), @intFromPtr(ptr)); |
