| ... | ... | @@ -62,26 +62,31 @@ pub fn addCases(ctx: *TestContext) !void { |
| 62 | 62 | \\@1 = export(@0, "start") |
| 63 | 63 | ); |
| 64 | 64 | |
| 65 | | ctx.incrementalFailure("function redefinition", linux_x64, |
| 65 | ctx.compileError("function redefinition", linux_x64, |
| 66 | 66 | \\fn entry() void {} |
| 67 | 67 | \\fn entry() void {} |
| 68 | | , &[_][]const u8{":2:4: error: redefinition of 'entry'"}, |
| 69 | | \\fn entry() void {} |
| 70 | | ); |
| 71 | | |
| 72 | | // TODO: need to make sure this works with other variants of export. |
| 73 | | ctx.incrementalFailure("exported symbol collision", linux_x64, |
| 74 | | \\export fn entry() void {} |
| 75 | | \\export fn entry() void {} |
| 76 | | , &[_][]const u8{":2:11: error: redefinition of 'entry'"}, |
| 77 | | \\export fn entry() void {} |
| 78 | | ); |
| 79 | | |
| 80 | | ctx.incrementalFailure("missing function name", linux_x64, |
| 81 | | \\fn() void {} |
| 82 | | , &[_][]const u8{":1:3: error: missing function name"}, |
| 83 | | \\fn a() void {} |
| 84 | | ); |
| 68 | , &[_][]const u8{":2:4: error: redefinition of 'entry'"}); |
| 69 | |
| 70 | //ctx.incrementalFailure("function redefinition", linux_x64, |
| 71 | // \\fn entry() void {} |
| 72 | // \\fn entry() void {} |
| 73 | //, &[_][]const u8{":2:4: error: redefinition of 'entry'"}, |
| 74 | // \\fn entry() void {} |
| 75 | //); |
| 76 | |
| 77 | //// TODO: need to make sure this works with other variants of export. |
| 78 | //ctx.incrementalFailure("exported symbol collision", linux_x64, |
| 79 | // \\export fn entry() void {} |
| 80 | // \\export fn entry() void {} |
| 81 | //, &[_][]const u8{":2:11: error: redefinition of 'entry'"}, |
| 82 | // \\export fn entry() void {} |
| 83 | //); |
| 84 | |
| 85 | // ctx.incrementalFailure("missing function name", linux_x64, |
| 86 | // \\fn() void {} |
| 87 | // , &[_][]const u8{":1:3: error: missing function name"}, |
| 88 | // \\fn a() void {} |
| 89 | // ); |
| 85 | 90 | |
| 86 | 91 | // TODO: re-enable these tests. |
| 87 | 92 | // https://github.com/ziglang/zig/issues/1364 |