| author | |
| committer | |
| log | 257054a1467b2612725bd66852d84496024cf66c |
| tree | 107064b65d7e11674736684e4b1dd4415f70e6f6 |
| parent | 4d8c24c6c52fe4adf4f9215278108734b635393d |
This reverts commit 133abdeda2994886c3476a3faf53f8a911513b32 but keeps
the tests disabled for the wasm target, which is the only configuration
that seems to fail, even though the error looks like a frontend error.2 files changed, 124 insertions(+), 0 deletions(-)
test/incremental/add_decl created+62| ... | @@ -0,0 +1,62 @@ | ||
| 1 | #target=x86_64-linux-selfhosted | ||
| 2 | #target=x86_64-linux-cbe | ||
| 3 | #target=x86_64-windows-cbe | ||
| 4 | //#target=wasm32-wasi-selfhosted | ||
| 5 | #update=initial version | ||
| 6 | #file=main.zig | ||
| 7 | const std = @import("std"); | ||
| 8 | pub fn main() !void { | ||
| 9 | try std.io.getStdOut().writeAll(foo); | ||
| 10 | } | ||
| 11 | const foo = "good morning\n"; | ||
| 12 | #expect_stdout="good morning\n" | ||
| 13 | |||
| 14 | #update=add new declaration | ||
| 15 | #file=main.zig | ||
| 16 | const std = @import("std"); | ||
| 17 | pub fn main() !void { | ||
| 18 | try std.io.getStdOut().writeAll(foo); | ||
| 19 | } | ||
| 20 | const foo = "good morning\n"; | ||
| 21 | const bar = "good evening\n"; | ||
| 22 | #expect_stdout="good morning\n" | ||
| 23 | |||
| 24 | #update=reference new declaration | ||
| 25 | #file=main.zig | ||
| 26 | const std = @import("std"); | ||
| 27 | pub fn main() !void { | ||
| 28 | try std.io.getStdOut().writeAll(bar); | ||
| 29 | } | ||
| 30 | const foo = "good morning\n"; | ||
| 31 | const bar = "good evening\n"; | ||
| 32 | #expect_stdout="good evening\n" | ||
| 33 | |||
| 34 | #update=reference missing declaration | ||
| 35 | #file=main.zig | ||
| 36 | const std = @import("std"); | ||
| 37 | pub fn main() !void { | ||
| 38 | try std.io.getStdOut().writeAll(qux); | ||
| 39 | } | ||
| 40 | const foo = "good morning\n"; | ||
| 41 | const bar = "good evening\n"; | ||
| 42 | #expect_error=ignored | ||
| 43 | |||
| 44 | #update=add missing declaration | ||
| 45 | #file=main.zig | ||
| 46 | const std = @import("std"); | ||
| 47 | pub fn main() !void { | ||
| 48 | try std.io.getStdOut().writeAll(qux); | ||
| 49 | } | ||
| 50 | const foo = "good morning\n"; | ||
| 51 | const bar = "good evening\n"; | ||
| 52 | const qux = "good night\n"; | ||
| 53 | #expect_stdout="good night\n" | ||
| 54 | |||
| 55 | #update=remove unused declarations | ||
| 56 | #file=main.zig | ||
| 57 | const std = @import("std"); | ||
| 58 | pub fn main() !void { | ||
| 59 | try std.io.getStdOut().writeAll(qux); | ||
| 60 | } | ||
| 61 | const qux = "good night\n"; | ||
| 62 | #expect_stdout="good night\n" | ||
test/incremental/add_decl_namespaced created+62| ... | @@ -0,0 +1,62 @@ | ||
| 1 | #target=x86_64-linux-selfhosted | ||
| 2 | #target=x86_64-linux-cbe | ||
| 3 | #target=x86_64-windows-cbe | ||
| 4 | //#target=wasm32-wasi-selfhosted | ||
| 5 | #update=initial version | ||
| 6 | #file=main.zig | ||
| 7 | const std = @import("std"); | ||
| 8 | pub fn main() !void { | ||
| 9 | try std.io.getStdOut().writeAll(@This().foo); | ||
| 10 | } | ||
| 11 | const foo = "good morning\n"; | ||
| 12 | #expect_stdout="good morning\n" | ||
| 13 | |||
| 14 | #update=add new declaration | ||
| 15 | #file=main.zig | ||
| 16 | const std = @import("std"); | ||
| 17 | pub fn main() !void { | ||
| 18 | try std.io.getStdOut().writeAll(@This().foo); | ||
| 19 | } | ||
| 20 | const foo = "good morning\n"; | ||
| 21 | const bar = "good evening\n"; | ||
| 22 | #expect_stdout="good morning\n" | ||
| 23 | |||
| 24 | #update=reference new declaration | ||
| 25 | #file=main.zig | ||
| 26 | const std = @import("std"); | ||
| 27 | pub fn main() !void { | ||
| 28 | try std.io.getStdOut().writeAll(@This().bar); | ||
| 29 | } | ||
| 30 | const foo = "good morning\n"; | ||
| 31 | const bar = "good evening\n"; | ||
| 32 | #expect_stdout="good evening\n" | ||
| 33 | |||
| 34 | #update=reference missing declaration | ||
| 35 | #file=main.zig | ||
| 36 | const std = @import("std"); | ||
| 37 | pub fn main() !void { | ||
| 38 | try std.io.getStdOut().writeAll(@This().qux); | ||
| 39 | } | ||
| 40 | const foo = "good morning\n"; | ||
| 41 | const bar = "good evening\n"; | ||
| 42 | #expect_error=ignored | ||
| 43 | |||
| 44 | #update=add missing declaration | ||
| 45 | #file=main.zig | ||
| 46 | const std = @import("std"); | ||
| 47 | pub fn main() !void { | ||
| 48 | try std.io.getStdOut().writeAll(@This().qux); | ||
| 49 | } | ||
| 50 | const foo = "good morning\n"; | ||
| 51 | const bar = "good evening\n"; | ||
| 52 | const qux = "good night\n"; | ||
| 53 | #expect_stdout="good night\n" | ||
| 54 | |||
| 55 | #update=remove unused declarations | ||
| 56 | #file=main.zig | ||
| 57 | const std = @import("std"); | ||
| 58 | pub fn main() !void { | ||
| 59 | try std.io.getStdOut().writeAll(@This().qux); | ||
| 60 | } | ||
| 61 | const qux = "good night\n"; | ||
| 62 | #expect_stdout="good night\n" | ||