diff options
| author | Robin Voetter <robin@voetter.nl> | 2024-01-13 18:44:44 +0100 |
|---|---|---|
| committer | Robin Voetter <robin@voetter.nl> | 2024-02-04 19:09:33 +0100 |
| commit | 9fbba0e01a5e89ce4b4be940539b6b05a7fb3931 (patch) | |
| tree | 1d2fb941e27f7b6cfe7b541407b0971daf051d0e /test/behavior/hasdecl.zig | |
| parent | 1d548aa2aab472f14013e67e29c6d898a7b31998 (diff) | |
| download | zig-9fbba0e01a5e89ce4b4be940539b6b05a7fb3931.tar.gz zig-9fbba0e01a5e89ce4b4be940539b6b05a7fb3931.zip | |
spirv: update tests
Diffstat (limited to 'test/behavior/hasdecl.zig')
| -rw-r--r-- | test/behavior/hasdecl.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/behavior/hasdecl.zig b/test/behavior/hasdecl.zig index e297979ba2..4ab521ceef 100644 --- a/test/behavior/hasdecl.zig +++ b/test/behavior/hasdecl.zig @@ -1,4 +1,5 @@ const std = @import("std"); +const builtin = @import("builtin"); const expect = std.testing.expect; const Foo = @import("hasdecl/foo.zig"); @@ -11,6 +12,8 @@ const Bar = struct { }; test "@hasDecl" { + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; + try expect(@hasDecl(Foo, "public_thing")); try expect(!@hasDecl(Foo, "private_thing")); try expect(!@hasDecl(Foo, "no_thing")); @@ -21,6 +24,8 @@ test "@hasDecl" { } test "@hasDecl using a sliced string literal" { + if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest; + try expect(@hasDecl(@This(), "std") == true); try expect(@hasDecl(@This(), "std"[0..0]) == false); try expect(@hasDecl(@This(), "std"[0..1]) == false); |
