test: skip failing tests with spirv-vulkan
This commit is contained in:
committed by
Robin Voetter
parent
94af47d28c
commit
aec0f9b3e7
@@ -24,6 +24,7 @@ fn testTruncate(x: u32) u8 {
|
||||
}
|
||||
|
||||
test "truncate to non-power-of-two integers" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
|
||||
try testTrunc(u32, u1, 0b10101, 0b1);
|
||||
@@ -208,12 +209,14 @@ fn first4KeysOfHomeRow() []const u8 {
|
||||
}
|
||||
|
||||
test "return string from function" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
|
||||
try expect(mem.eql(u8, first4KeysOfHomeRow(), "aoeu"));
|
||||
}
|
||||
|
||||
test "hex escape" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
|
||||
try expect(mem.eql(u8, "\x68\x65\x6c\x6c\x6f", "hello"));
|
||||
@@ -221,6 +224,7 @@ test "hex escape" {
|
||||
|
||||
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
|
||||
@@ -233,6 +237,7 @@ 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
|
||||
@@ -245,6 +250,7 @@ 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
|
||||
@@ -257,6 +263,7 @@ 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
|
||||
@@ -269,6 +276,7 @@ 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
|
||||
@@ -282,11 +290,14 @@ 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"));
|
||||
}
|
||||
@@ -308,6 +319,8 @@ const global_a: i32 = 1234;
|
||||
const global_b: *const i32 = &global_a;
|
||||
const global_c: *const f32 = @as(*const f32, @ptrCast(global_b));
|
||||
test "compile time global reinterpret" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
const d = @as(*const i32, @ptrCast(global_c));
|
||||
try expect(d.* == 1234);
|
||||
}
|
||||
@@ -435,6 +448,8 @@ fn f2(x: bool) []const u8 {
|
||||
}
|
||||
|
||||
test "variable is allowed to be a pointer to an opaque type" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
var x: i32 = 1234;
|
||||
_ = hereIsAnOpaqueType(@as(*OpaqueA, @ptrCast(&x)));
|
||||
}
|
||||
@@ -457,6 +472,8 @@ fn testTakeAddressOfParameter(f: f32) !void {
|
||||
}
|
||||
|
||||
test "pointer to void return type" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
try testPointerToVoidReturnType();
|
||||
}
|
||||
fn testPointerToVoidReturnType() anyerror!void {
|
||||
@@ -472,6 +489,7 @@ test "array 2D const double ptr" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
const rect_2d_vertexes = [_][1]f32{
|
||||
[_]f32{1.0},
|
||||
@@ -484,6 +502,7 @@ test "array 2D const double ptr with offset" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
const rect_2d_vertexes = [_][2]f32{
|
||||
[_]f32{ 3.0, 4.239 },
|
||||
@@ -496,6 +515,7 @@ test "array 3D const double ptr with offset" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
const rect_3d_vertexes = [_][2][2]f32{
|
||||
[_][2]f32{
|
||||
@@ -551,6 +571,8 @@ fn testStructInFn() !void {
|
||||
|
||||
test "fn call returning scalar optional in equality expression" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
try expect(getNull() == null);
|
||||
}
|
||||
|
||||
@@ -561,6 +583,7 @@ fn getNull() ?*i32 {
|
||||
test "global variable assignment with optional unwrapping with var initialized to undefined" {
|
||||
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;
|
||||
|
||||
const S = struct {
|
||||
var data: i32 = 1234;
|
||||
@@ -676,6 +699,7 @@ test "self reference through fn ptr field" {
|
||||
|
||||
test "global variable initialized to global variable array element" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
try expect(global_ptr == &gdt[0]);
|
||||
}
|
||||
@@ -708,6 +732,7 @@ test "global constant is loaded with a runtime-known index" {
|
||||
|
||||
test "multiline string literal is null terminated" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
const s1 =
|
||||
\\one
|
||||
@@ -722,6 +747,7 @@ test "string escapes" {
|
||||
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 expectEqualStrings("\"", "\x22");
|
||||
try expectEqualStrings("\'", "\x27");
|
||||
@@ -739,6 +765,8 @@ 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));
|
||||
@@ -789,6 +817,7 @@ fn maybe(x: bool) anyerror!?u32 {
|
||||
test "auto created variables have correct alignment" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn foo(str: [*]const u8) u32 {
|
||||
@@ -1152,6 +1181,8 @@ test "orelse coercion as function argument" {
|
||||
}
|
||||
|
||||
test "runtime-known globals initialized with undefined" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
var array: [10]u32 = [_]u32{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
|
||||
var vp: [*]u32 = undefined;
|
||||
@@ -1244,6 +1275,8 @@ fn testUnsignedCmp(comptime T: type) !void {
|
||||
}
|
||||
|
||||
test "integer compare <= 64 bits" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
inline for (.{ u8, u16, u32, u64, usize, u10, u20, u30, u60 }) |T| {
|
||||
try testUnsignedCmp(T);
|
||||
try comptime testUnsignedCmp(T);
|
||||
|
||||
Reference in New Issue
Block a user