From c9a788c85145da31d8e9a7ec49bb0ca39dc69389 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sat, 22 Nov 2025 08:00:56 -0800 Subject: [PATCH] Revert "disable flaky test/incremental/add_decl" This reverts commit d54fbc01234688b37a48b29fee499529a500ccf5. Since all incremental tests are flaky on Windows, this is reinstated and all test-incremental tests will be skipped on Windows until the flakiness is resolved. Closes #26003 --- test/incremental/add_decl | 63 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 test/incremental/add_decl diff --git a/test/incremental/add_decl b/test/incremental/add_decl new file mode 100644 index 0000000000..9efd274b9e --- /dev/null +++ b/test/incremental/add_decl @@ -0,0 +1,63 @@ +#target=x86_64-linux-selfhosted +#target=x86_64-windows-selfhosted +#target=x86_64-linux-cbe +#target=x86_64-windows-cbe +//#target=wasm32-wasi-selfhosted +#update=initial version +#file=main.zig +const std = @import("std"); +pub fn main() !void { + try std.fs.File.stdout().writeAll(foo); +} +const foo = "good morning\n"; +#expect_stdout="good morning\n" + +#update=add new declaration +#file=main.zig +const std = @import("std"); +pub fn main() !void { + try std.fs.File.stdout().writeAll(foo); +} +const foo = "good morning\n"; +const bar = "good evening\n"; +#expect_stdout="good morning\n" + +#update=reference new declaration +#file=main.zig +const std = @import("std"); +pub fn main() !void { + try std.fs.File.stdout().writeAll(bar); +} +const foo = "good morning\n"; +const bar = "good evening\n"; +#expect_stdout="good evening\n" + +#update=reference missing declaration +#file=main.zig +const std = @import("std"); +pub fn main() !void { + try std.fs.File.stdout().writeAll(qux); +} +const foo = "good morning\n"; +const bar = "good evening\n"; +#expect_error=main.zig:3:39: error: use of undeclared identifier 'qux' + +#update=add missing declaration +#file=main.zig +const std = @import("std"); +pub fn main() !void { + try std.fs.File.stdout().writeAll(qux); +} +const foo = "good morning\n"; +const bar = "good evening\n"; +const qux = "good night\n"; +#expect_stdout="good night\n" + +#update=remove unused declarations +#file=main.zig +const std = @import("std"); +pub fn main() !void { + try std.fs.File.stdout().writeAll(qux); +} +const qux = "good night\n"; +#expect_stdout="good night\n"