diff options
| author | Robin Voetter <robin@voetter.nl> | 2023-05-18 02:45:21 +0200 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2023-05-20 17:30:21 +0200 |
| commit | 6e3770e970dbf460271a0e0cb60c2bf40a7c861e (patch) | |
| tree | fa880846415c07b0d153688a1e1a7b8c35971671 /test/behavior/basic.zig | |
| parent | 7077e90b3f8991c844deb08a16ad3f4e0569398f (diff) | |
| download | zig-6e3770e970dbf460271a0e0cb60c2bf40a7c861e.tar.gz zig-6e3770e970dbf460271a0e0cb60c2bf40a7c861e.zip | |
spirv: implement pointer comparison in for air cmp
It turns out that the Khronos LLVM SPIRV translator does not support OpPtrEqual.
Therefore, this instruction is emitted using a series of conversions.
This commit breaks intToEnum, because enum was removed from the arithmetic type
info. The enum should be converted to an int before this function is called.
Diffstat (limited to 'test/behavior/basic.zig')
| -rw-r--r-- | test/behavior/basic.zig | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig index 0de278fc57..756d62f3ab 100644 --- a/test/behavior/basic.zig +++ b/test/behavior/basic.zig @@ -134,21 +134,18 @@ fn first4KeysOfHomeRow() []const u8 { test "return string from function" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; try expect(mem.eql(u8, first4KeysOfHomeRow(), "aoeu")); } test "hex escape" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; try expect(mem.eql(u8, "\x68\x65\x6c\x6c\x6f", "hello")); } test "multiline string" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; const s1 = \\one @@ -161,7 +158,6 @@ test "multiline string" { test "multiline string comments at start" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; const s1 = //\\one @@ -174,7 +170,6 @@ test "multiline string comments at start" { test "multiline string comments at end" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; const s1 = \\one @@ -187,7 +182,6 @@ test "multiline string comments at end" { test "multiline string comments in middle" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; const s1 = \\one @@ -200,7 +194,6 @@ test "multiline string comments in middle" { test "multiline string comments at multiple places" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; const s1 = \\one @@ -214,14 +207,11 @@ test "multiline string comments at multiple places" { } test "string concatenation simple" { - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; - try expect(mem.eql(u8, "OK" ++ " IT " ++ "WORKED", "OK IT WORKED")); } test "array mult operator" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; try expect(mem.eql(u8, "ab" ** 5, "ababababab")); } @@ -387,7 +377,6 @@ test "take address of parameter" { if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; try testTakeAddressOfParameter(12.34); } @@ -690,8 +679,6 @@ test "explicit cast optional pointers" { } test "pointer comparison" { - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; - const a = @as([]const u8, "a"); const b = &a; try expect(ptrEql(b, b)); @@ -892,8 +879,6 @@ test "catch in block has correct result location" { } test "labeled block with runtime branch forwards its result location type to break statements" { - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; - const E = enum { a, b }; var a = false; const e: E = blk: { @@ -1062,8 +1047,6 @@ test "switch inside @as gets correct type" { } test "inline call of function with a switch inside the return statement" { - if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; - const S = struct { inline fn foo(x: anytype) @TypeOf(x) { return switch (x) { |
