authorgravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-05-27 09:20:06-04:00
committergravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-06-15 17:51:43-04:00
logbebc1f49cf2e480fbd5dc2a409ee1bc0fe3de331
tree1cbca3afedc5f310a3af6196328ac5cbee758b2c
parent2d1d012f1194e1e26f123891e12921d59ffe9e10
signaturelock-open Commit is signed but in an unrecognized format.

[Stage2/Testing] Add (failing) test


1 files changed, 14 insertions(+), 0 deletions(-)

test/stage2/compile_errors.zig+14
...@@ -23,6 +23,20 @@ pub fn addCases(ctx: *TestContext) !void {...@@ -23,6 +23,20 @@ pub fn addCases(ctx: *TestContext) !void {
23 .msg = "unrecognized identifier: %test",23 .msg = "unrecognized identifier: %test",
24 }}, &[_]ErrorMsg{}, &[_]ErrorMsg{});24 }}, &[_]ErrorMsg{}, &[_]ErrorMsg{});
2525
26 ctx.addZIRError("call with non-existent target", linux_x64,
27 \\@noreturn = primitive(noreturn)
28 \\
29 \\@start_fnty = fntype([], @noreturn, cc=Naked)
30 \\@start = fn(@start_fnty, {
31 \\ %0 = call(@notafunc, [])
32 \\})
33 , &[_]ErrorMsg{
34 .{
35 .byte_offset = 118,
36 .msg = "unrecognized identifier: @notafunc",
37 },
38 }, &[_]ErrorMsg{}, &[_]ErrorMsg{});
39
26 //try ctx.testCompileError(40 //try ctx.testCompileError(
27 // \\export fn entry() void {}41 // \\export fn entry() void {}
28 // \\export fn entry() void {}42 // \\export fn entry() void {}