From ca12e4f33e9030e5e724aae2f6dda9f2d87dccf6 Mon Sep 17 00:00:00 2001 From: mlugg Date: Mon, 11 Nov 2024 12:05:38 +0000 Subject: test: remove old-style incremental cases, add a few new incremental cases These cases have been disabled for a while, and we have transitioned to using a compact file format for incremental test cases. I was originally planning to port all of these cases, but the vast majority aren't testing anything interesting, so it wasn't worth the effort. I did look through each one; anything interesting being tested has been extracted into a new case in `test/incremental/`. Two of the new tests are currently failing with the self-hosted ELF linker, and thus are currently only enabled with the C backend. Resolves: #12844 --- test/incremental/function_becomes_inline | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 test/incremental/function_becomes_inline (limited to 'test/incremental/function_becomes_inline') diff --git a/test/incremental/function_becomes_inline b/test/incremental/function_becomes_inline new file mode 100644 index 0000000000..b7e604bfac --- /dev/null +++ b/test/incremental/function_becomes_inline @@ -0,0 +1,35 @@ +//#target=x86_64-linux-selfhosted +#target=x86_64-linux-cbe +#target=x86_64-windows-cbe +#update=non-inline version +#file=main.zig +pub fn main() !void { + try foo(); +} +fn foo() !void { + try std.io.getStdOut().writer().writeAll("Hello, World!\n"); +} +const std = @import("std"); +#expect_stdout="Hello, World!\n" + +#update=make function inline +#file=main.zig +pub fn main() !void { + try foo(); +} +inline fn foo() !void { + try std.io.getStdOut().writer().writeAll("Hello, World!\n"); +} +const std = @import("std"); +#expect_stdout="Hello, World!\n" + +#update=change string +#file=main.zig +pub fn main() !void { + try foo(); +} +inline fn foo() !void { + try std.io.getStdOut().writer().writeAll("Hello, `inline` World!\n"); +} +const std = @import("std"); +#expect_stdout="Hello, `inline` World!\n" -- cgit v1.2.3