mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 19:23:08 +00:00
stage2: Adjust line numbers in tests
This commit is contained in:
parent
9201fbe85b
commit
2ee83e76f7
@ -159,7 +159,7 @@ pub fn addCases(ctx: *TestContext) !void {
|
|||||||
{
|
{
|
||||||
var case = ctx.exe("hello world with updates", macos_aarch64);
|
var case = ctx.exe("hello world with updates", macos_aarch64);
|
||||||
case.addError("", &[_][]const u8{
|
case.addError("", &[_][]const u8{
|
||||||
":108:9: error: struct 'tmp.tmp' has no member named 'main'",
|
":109:9: error: struct 'tmp.tmp' has no member named 'main'",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Incorrect return type
|
// Incorrect return type
|
||||||
|
|||||||
@ -719,7 +719,7 @@ pub fn addCases(ctx: *TestContext) !void {
|
|||||||
);
|
);
|
||||||
switch (target.getOsTag()) {
|
switch (target.getOsTag()) {
|
||||||
.linux => try case.files.append(.{
|
.linux => try case.files.append(.{
|
||||||
.src =
|
.src =
|
||||||
\\pub fn print() void {
|
\\pub fn print() void {
|
||||||
\\ asm volatile ("syscall"
|
\\ asm volatile ("syscall"
|
||||||
\\ :
|
\\ :
|
||||||
@ -735,7 +735,7 @@ pub fn addCases(ctx: *TestContext) !void {
|
|||||||
.path = "print.zig",
|
.path = "print.zig",
|
||||||
}),
|
}),
|
||||||
.macos => try case.files.append(.{
|
.macos => try case.files.append(.{
|
||||||
.src =
|
.src =
|
||||||
\\extern "c" fn write(usize, usize, usize) usize;
|
\\extern "c" fn write(usize, usize, usize) usize;
|
||||||
\\
|
\\
|
||||||
\\pub fn print() void {
|
\\pub fn print() void {
|
||||||
@ -796,7 +796,7 @@ pub fn addCases(ctx: *TestContext) !void {
|
|||||||
);
|
);
|
||||||
switch (target.getOsTag()) {
|
switch (target.getOsTag()) {
|
||||||
.linux => try case.files.append(.{
|
.linux => try case.files.append(.{
|
||||||
.src =
|
.src =
|
||||||
\\// dummy comment to make print be on line 2
|
\\// dummy comment to make print be on line 2
|
||||||
\\fn print() void {
|
\\fn print() void {
|
||||||
\\ asm volatile ("syscall"
|
\\ asm volatile ("syscall"
|
||||||
@ -813,7 +813,7 @@ pub fn addCases(ctx: *TestContext) !void {
|
|||||||
.path = "print.zig",
|
.path = "print.zig",
|
||||||
}),
|
}),
|
||||||
.macos => try case.files.append(.{
|
.macos => try case.files.append(.{
|
||||||
.src =
|
.src =
|
||||||
\\extern "c" fn write(usize, usize, usize) usize;
|
\\extern "c" fn write(usize, usize, usize) usize;
|
||||||
\\fn print() void {
|
\\fn print() void {
|
||||||
\\ _ = write(1, @ptrToInt("Hello, World!\n"), 14);
|
\\ _ = write(1, @ptrToInt("Hello, World!\n"), 14);
|
||||||
@ -1925,7 +1925,7 @@ fn addLinuxTestCases(ctx: *TestContext) !void {
|
|||||||
var case = ctx.exe("hello world with updates", linux_x64);
|
var case = ctx.exe("hello world with updates", linux_x64);
|
||||||
|
|
||||||
case.addError("", &[_][]const u8{
|
case.addError("", &[_][]const u8{
|
||||||
":108:9: error: struct 'tmp.tmp' has no member named 'main'",
|
":109:9: error: struct 'tmp.tmp' has no member named 'main'",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Incorrect return type
|
// Incorrect return type
|
||||||
@ -2176,7 +2176,7 @@ fn addMacOsTestCases(ctx: *TestContext) !void {
|
|||||||
{
|
{
|
||||||
var case = ctx.exe("darwin hello world with updates", macos_x64);
|
var case = ctx.exe("darwin hello world with updates", macos_x64);
|
||||||
case.addError("", &[_][]const u8{
|
case.addError("", &[_][]const u8{
|
||||||
":108:9: error: struct 'tmp.tmp' has no member named 'main'",
|
":109:9: error: struct 'tmp.tmp' has no member named 'main'",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Incorrect return type
|
// Incorrect return type
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user