mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
ca12e4f33e
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
36 lines
795 B
Plaintext
36 lines
795 B
Plaintext
//#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"
|