specify the target for the newest test case

This commit is contained in:
Andrew Kelley
2019-08-20 14:40:57 -04:00
parent 2addec8ea1
commit 276eb4402b
2 changed files with 33 additions and 21 deletions

View File

@@ -2,17 +2,24 @@ const tests = @import("tests.zig");
const builtin = @import("builtin");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add(
"variable in inline assembly template cannot be found",
\\export fn entry() void {
\\ var sp = asm volatile (
\\ "mov %[foo], sp"
\\ : [bar] "=r" (-> usize)
\\ );
\\}
,
"tmp.zig:2:14: error: could not find 'foo' in the inputs or outputs."
);
cases.addCase(x: {
var tc = cases.create("variable in inline assembly template cannot be found",
\\export fn entry() void {
\\ var sp = asm volatile (
\\ "mov %[foo], sp"
\\ : [bar] "=r" (-> usize)
\\ );
\\}
, "tmp.zig:2:14: error: could not find 'foo' in the inputs or outputs.");
tc.target = tests.Target{
.Cross = tests.CrossTarget{
.arch = .x86_64,
.os = .linux,
.abi = .gnu,
},
};
break :x tc;
});
cases.add(
"indirect recursion of async functions detected",