mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
macho: add x86_64 tests
This commit is contained in:
parent
2ea0901dd6
commit
4ffa8952cc
@ -209,7 +209,8 @@ pub fn addCases(ctx: *TestContext) !void {
|
||||
\\extern "c" fn exit(usize) noreturn;
|
||||
\\
|
||||
\\export fn _start() noreturn {
|
||||
\\ write(1, @ptrToInt("Hello, World!\n"), 14);
|
||||
\\ write(1, @ptrToInt("Hello,"), 6);
|
||||
\\ write(1, @ptrToInt(" World!\n,"), 8);
|
||||
\\ exit(0);
|
||||
\\}
|
||||
,
|
||||
|
||||
@ -1495,4 +1495,22 @@ pub fn addCases(ctx: *TestContext) !void {
|
||||
\\}
|
||||
, &[_][]const u8{":8:10: error: evaluation exceeded 1000 backwards branches"});
|
||||
}
|
||||
|
||||
{
|
||||
var case = ctx.exe("hello world linked to libc", macosx_x64);
|
||||
|
||||
// TODO rewrite this test once we handle more int conversions and return args.
|
||||
case.addCompareOutput(
|
||||
\\extern "c" fn write(usize, usize, usize) void;
|
||||
\\extern "c" fn exit(usize) noreturn;
|
||||
\\
|
||||
\\export fn _start() noreturn {
|
||||
\\ write(1, @ptrToInt("Hello,"), 6);
|
||||
\\ write(1, @ptrToInt(" World!\n,"), 8);
|
||||
\\ exit(0);
|
||||
\\}
|
||||
,
|
||||
"Hello, World!\n",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user