aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/test.zig
diff options
context:
space:
mode:
authorJimmi Holst Christensen <jimmiholstchristensen@gmail.com>2018-11-13 05:08:37 -0800
committerGitHub <noreply@github.com>2018-11-13 05:08:37 -0800
commit8139c5a516eaa217ed76acdf09496895451c5c5c (patch)
tree89841cec818c5650471c7f2c11141013f8640bf7 /src-self-hosted/test.zig
parent67fbb0434f7104801c66e821b5057a8323e377df (diff)
downloadzig-8139c5a516eaa217ed76acdf09496895451c5c5c.tar.gz
zig-8139c5a516eaa217ed76acdf09496895451c5c5c.zip
New Zig formal grammar (#1685)
Reverted #1628 and changed the grammar+parser of the language to not allow certain expr where types are expected
Diffstat (limited to 'src-self-hosted/test.zig')
-rw-r--r--src-self-hosted/test.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src-self-hosted/test.zig b/src-self-hosted/test.zig
index b82a122c4c..ff5b96df84 100644
--- a/src-self-hosted/test.zig
+++ b/src-self-hosted/test.zig
@@ -23,18 +23,18 @@ test "stage2" {
const file1 = "1.zig";
const allocator = std.heap.c_allocator;
-pub const TestContext = struct.{
+pub const TestContext = struct {
loop: std.event.Loop,
zig_compiler: ZigCompiler,
zig_lib_dir: []u8,
file_index: std.atomic.Int(usize),
- group: std.event.Group(error!void),
- any_err: error!void,
+ group: std.event.Group(anyerror!void),
+ any_err: anyerror!void,
const tmp_dir_name = "stage2_test_tmp";
fn init(self: *TestContext) !void {
- self.* = TestContext.{
+ self.* = TestContext{
.any_err = {},
.loop = undefined,
.zig_compiler = undefined,
@@ -49,7 +49,7 @@ pub const TestContext = struct.{
self.zig_compiler = try ZigCompiler.init(&self.loop);
errdefer self.zig_compiler.deinit();
- self.group = std.event.Group(error!void).init(&self.loop);
+ self.group = std.event.Group(anyerror!void).init(&self.loop);
errdefer self.group.deinit();
self.zig_lib_dir = try introspect.resolveZigLibDir(allocator);
@@ -162,7 +162,7 @@ pub const TestContext = struct.{
switch (build_event) {
Compilation.Event.Ok => {
- const argv = []const []const u8.{exe_file_2};
+ const argv = []const []const u8{exe_file_2};
// TODO use event loop
const child = try std.os.ChildProcess.exec(allocator, argv, null, null, 1024 * 1024);
switch (child.term) {