aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/test.zig
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2020-01-09 01:56:38 -0800
committerAndrew Kelley <andrew@ziglang.org>2020-01-09 13:36:44 -0500
commit834218d789430ac238e5ef4fa99cfe4bcf006f2d (patch)
tree6a43ac11524812625dba225dde6a091bcf2b0b2d /src-self-hosted/test.zig
parentd7333d8798a929312ceb897007e7bb6a8b2999ee (diff)
downloadzig-834218d789430ac238e5ef4fa99cfe4bcf006f2d.tar.gz
zig-834218d789430ac238e5ef4fa99cfe4bcf006f2d.zip
Fix remaining variadic formatted prints
Used a series of regex searches to try to find as many instances of the old pattern as I could and update them.
Diffstat (limited to 'src-self-hosted/test.zig')
-rw-r--r--src-self-hosted/test.zig15
1 files changed, 7 insertions, 8 deletions
diff --git a/src-self-hosted/test.zig b/src-self-hosted/test.zig
index 62b7914dbc..8c322e5fb6 100644
--- a/src-self-hosted/test.zig
+++ b/src-self-hosted/test.zig
@@ -81,7 +81,7 @@ pub const TestContext = struct {
msg: []const u8,
) !void {
var file_index_buf: [20]u8 = undefined;
- const file_index = try std.fmt.bufPrint(file_index_buf[0..], "{}", self.file_index.incr());
+ const file_index = try std.fmt.bufPrint(file_index_buf[0..], "{}", .{self.file_index.incr()});
const file1_path = try std.fs.path.join(allocator, [_][]const u8{ tmp_dir_name, file_index, file1 });
if (std.fs.path.dirname(file1_path)) |dirname| {
@@ -114,10 +114,10 @@ pub const TestContext = struct {
expected_output: []const u8,
) !void {
var file_index_buf: [20]u8 = undefined;
- const file_index = try std.fmt.bufPrint(file_index_buf[0..], "{}", self.file_index.incr());
+ const file_index = try std.fmt.bufPrint(file_index_buf[0..], "{}", .{self.file_index.incr()});
const file1_path = try std.fs.path.join(allocator, [_][]const u8{ tmp_dir_name, file_index, file1 });
- const output_file = try std.fmt.allocPrint(allocator, "{}-out{}", file1_path, (Target{ .Native = {} }).exeFileExt());
+ const output_file = try std.fmt.allocPrint(allocator, "{}-out{}", .{ file1_path, (Target{ .Native = {} }).exeFileExt() });
if (std.fs.path.dirname(file1_path)) |dirname| {
try std.fs.makePath(allocator, dirname);
}
@@ -214,21 +214,20 @@ pub const TestContext = struct {
}
}
}
- std.debug.warn(
- "\n=====source:=======\n{}\n====expected:========\n{}:{}:{}: error: {}\n",
+ std.debug.warn("\n=====source:=======\n{}\n====expected:========\n{}:{}:{}: error: {}\n", .{
source,
path,
line,
column,
text,
- );
- std.debug.warn("\n====found:========\n");
+ });
+ std.debug.warn("\n====found:========\n", .{});
const stderr = std.io.getStdErr();
for (msgs) |msg| {
defer msg.destroy();
try msg.printToFile(stderr, errmsg.Color.Auto);
}
- std.debug.warn("============\n");
+ std.debug.warn("============\n", .{});
return error.TestFailed;
},
}