Skip @Type/@typeInfo Fn/BoundFn tests on wasm32/wasm64

This commit is contained in:
Tadeo Kondrak 2020-09-24 05:03:19 -06:00
parent e18fdc12b0
commit 96a151d4b8
No known key found for this signature in database
GPG Key ID: D41E092CA43F1D8B
2 changed files with 8 additions and 0 deletions

View File

@ -418,6 +418,9 @@ test "Type.Union from regular enum" {
}
test "Type.Fn" {
// wasm doesn't support align attributes on functions
if (builtin.arch == .wasm32 or builtin.arch == .wasm64) return error.SkipZigTest;
const foo = struct {
fn func(a: usize, b: bool) align(4) callconv(.C) usize {
return 0;
@ -428,6 +431,9 @@ test "Type.Fn" {
}
test "Type.BoundFn" {
// wasm doesn't support align attributes on functions
if (builtin.arch == .wasm32 or builtin.arch == .wasm64) return error.SkipZigTest;
const TestStruct = packed struct {
pub fn foo(self: *const @This()) align(4) callconv(.Unspecified) void {}
};

View File

@ -266,6 +266,8 @@ const TestStruct = packed struct {
};
test "type info: function type info" {
// wasm doesn't support align attributes on functions
if (builtin.arch == .wasm32 or builtin.arch == .wasm64) return error.SkipZigTest;
testFunction();
comptime testFunction();
}