diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-05-03 17:23:11 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-05-03 17:23:11 -0400 |
| commit | 644ea2dde9fbb1f948cf12115df2a15e908f3c29 (patch) | |
| tree | 7d246fb67e4ffeadff496779a4ac4243fbbc46bc /test/tests.zig | |
| parent | 0940d46c0160683fb5a28f66589e53ec5b64241d (diff) | |
| download | zig-644ea2dde9fbb1f948cf12115df2a15e908f3c29.tar.gz zig-644ea2dde9fbb1f948cf12115df2a15e908f3c29.zip | |
remove test and try expressions in favor of if expressions
See #357
Diffstat (limited to 'test/tests.zig')
| -rw-r--r-- | test/tests.zig | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/tests.zig b/test/tests.zig index 33e17a02ee..faa3b6b5cb 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -349,7 +349,7 @@ pub const CompareOutputContext = struct { switch (case.special) { Special.Asm => { const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "assemble-and-link {}", case.name); - test (self.test_filter) |filter| { + if (self.test_filter) |filter| { if (mem.indexOf(u8, annotated_case_name, filter) == null) return; } @@ -373,7 +373,7 @@ pub const CompareOutputContext = struct { for ([]Mode{Mode.Debug, Mode.ReleaseFast}) |mode| { const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "{} {} ({})", "compare-output", case.name, @enumTagName(mode)); - test (self.test_filter) |filter| { + if (self.test_filter) |filter| { if (mem.indexOf(u8, annotated_case_name, filter) == null) continue; } @@ -399,7 +399,7 @@ pub const CompareOutputContext = struct { }, Special.DebugSafety => { const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "safety {}", case.name); - test (self.test_filter) |filter| { + if (self.test_filter) |filter| { if (mem.indexOf(u8, annotated_case_name, filter) == null) return; } @@ -620,7 +620,7 @@ pub const CompileErrorContext = struct { for ([]Mode{Mode.Debug, Mode.ReleaseFast}) |mode| { const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "compile-error {} ({})", case.name, @enumTagName(mode)); - test (self.test_filter) |filter| { + if (self.test_filter) |filter| { if (mem.indexOf(u8, annotated_case_name, filter) == null) continue; } @@ -655,7 +655,7 @@ pub const BuildExamplesContext = struct { const b = self.b; const annotated_case_name = b.fmt("build {} (Debug)", build_file); - test (self.test_filter) |filter| { + if (self.test_filter) |filter| { if (mem.indexOf(u8, annotated_case_name, filter) == null) return; } @@ -686,7 +686,7 @@ pub const BuildExamplesContext = struct { for ([]Mode{Mode.Debug, Mode.ReleaseFast}) |mode| { const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "build {} ({})", root_src, @enumTagName(mode)); - test (self.test_filter) |filter| { + if (self.test_filter) |filter| { if (mem.indexOf(u8, annotated_case_name, filter) == null) continue; } @@ -874,7 +874,7 @@ pub const ParseHContext = struct { const b = self.b; const annotated_case_name = %%fmt.allocPrint(self.b.allocator, "parseh {}", case.name); - test (self.test_filter) |filter| { + if (self.test_filter) |filter| { if (mem.indexOf(u8, annotated_case_name, filter) == null) return; } |
