mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
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
29 lines
738 B
Plaintext
29 lines
738 B
Plaintext
//#target=x86_64-linux-selfhosted
|
|
#target=x86_64-linux-cbe
|
|
#target=x86_64-windows-cbe
|
|
#update=initial version
|
|
#file=main.zig
|
|
pub fn main() !void {
|
|
try foo(false);
|
|
}
|
|
fn foo(recurse: bool) !void {
|
|
const stdout = std.io.getStdOut().writer();
|
|
if (recurse) return foo(true);
|
|
try stdout.writeAll("non-recursive path\n");
|
|
}
|
|
const std = @import("std");
|
|
#expect_stdout="non-recursive path\n"
|
|
|
|
#update=eliminate recursion and change argument
|
|
#file=main.zig
|
|
pub fn main() !void {
|
|
try foo(true);
|
|
}
|
|
fn foo(recurse: bool) !void {
|
|
const stdout = std.io.getStdOut().writer();
|
|
if (recurse) return stdout.writeAll("x==1\n");
|
|
try stdout.writeAll("non-recursive path\n");
|
|
}
|
|
const std = @import("std");
|
|
#expect_stdout="x==1\n"
|