mirror of
https://github.com/ziglang/zig.git
synced 2025-02-13 08:00:20 +00:00
Add matching compile error test
This commit is contained in:
parent
015c899297
commit
08b0cae777
@ -7445,4 +7445,20 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
|
||||
, &[_][]const u8{
|
||||
":2:75: error: operation caused overflow",
|
||||
});
|
||||
|
||||
cases.addCase(x: {
|
||||
var tc = cases.create("align(N) expr function pointers is a compile error",
|
||||
\\export fn foo() align(1) void {
|
||||
\\ return;
|
||||
\\}
|
||||
, &[_][]const u8{
|
||||
"tmp.zig:1:23: error: align(N) expr is not allowed on function prototypes in wasm32/wasm64",
|
||||
});
|
||||
tc.target = std.zig.CrossTarget{
|
||||
.cpu_arch = .wasm32,
|
||||
.os_tag = .freestanding,
|
||||
.abi = .none,
|
||||
};
|
||||
break :x tc;
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user