aboutsummaryrefslogtreecommitdiff
path: root/test/cli.zig
diff options
context:
space:
mode:
authorJimmi Holst Christensen <jimmiholstchristensen@gmail.com>2018-10-15 09:51:15 -0400
committerGitHub <noreply@github.com>2018-10-15 09:51:15 -0400
commit378d3e44034e817093966ea42c2940d6a0482dd8 (patch)
treefe5f454097e1627b1afc65aebfb815dd70a7576d /test/cli.zig
parent822d4fa216ea8f598e4a9d53161800494f449a94 (diff)
downloadzig-378d3e44034e817093966ea42c2940d6a0482dd8.tar.gz
zig-378d3e44034e817093966ea42c2940d6a0482dd8.zip
Solve the return type ambiguity (#1628)
Changed container and initializer syntax * <container> { ... } -> <container> . { ... } * <exrp> { ... } -> <expr> . { ...}
Diffstat (limited to 'test/cli.zig')
-rw-r--r--test/cli.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/cli.zig b/test/cli.zig
index 5a2a51bbfd..3486b5a547 100644
--- a/test/cli.zig
+++ b/test/cli.zig
@@ -31,7 +31,7 @@ pub fn main() !void {
const dir_path = try os.path.join(a, cache_root, "clitest");
const TestFn = fn ([]const u8, []const u8) error!void;
- const test_fns = []TestFn{
+ const test_fns = []TestFn.{
testZigInitLib,
testZigInitExe,
testGodboltApi,
@@ -85,14 +85,14 @@ fn exec(cwd: []const u8, argv: []const []const u8) !os.ChildProcess.ExecResult {
}
fn testZigInitLib(zig_exe: []const u8, dir_path: []const u8) !void {
- _ = try exec(dir_path, [][]const u8{ zig_exe, "init-lib" });
- const test_result = try exec(dir_path, [][]const u8{ zig_exe, "build", "test" });
+ _ = try exec(dir_path, [][]const u8.{ zig_exe, "init-lib" });
+ const test_result = try exec(dir_path, [][]const u8.{ zig_exe, "build", "test" });
assertOrPanic(std.mem.endsWith(u8, test_result.stderr, "All tests passed.\n"));
}
fn testZigInitExe(zig_exe: []const u8, dir_path: []const u8) !void {
- _ = try exec(dir_path, [][]const u8{ zig_exe, "init-exe" });
- const run_result = try exec(dir_path, [][]const u8{ zig_exe, "build", "run" });
+ _ = try exec(dir_path, [][]const u8.{ zig_exe, "init-exe" });
+ const run_result = try exec(dir_path, [][]const u8.{ zig_exe, "build", "run" });
assertOrPanic(std.mem.eql(u8, run_result.stderr, "All your base are belong to us.\n"));
}
@@ -113,7 +113,7 @@ fn testGodboltApi(zig_exe: []const u8, dir_path: []const u8) error!void {
\\}
);
- const args = [][]const u8{
+ const args = [][]const u8.{
zig_exe, "build-obj",
"--cache-dir", dir_path,
"--output", example_s_path,