| author | |
| committer | |
| log | d1e46006758a82f039d23ea26030e3b685a5fa86 |
| tree | 3bdf05a3f952a0c193701571e1696932f9c90e65 |
| parent | b08d32ceb5aac5b1ba73c84449c6afee630710bb |
Prior to this change, for an example compiler error test case with
multiple identical errors messages such as
```
:1:2: error: foo
:1:2: error: foo
```
the test harness would never increment the error index thus only
marking the very first error message as handled yielding a false
positive.
Additionally, while here, regress `dereference_anyopaque` test case
as not passing on `wasm32-wasi` target.2 files changed, 3 insertions(+), 0 deletions(-)
src/test.zig+2| ... | ... | @@ -1574,6 +1574,8 @@ pub const TestContext = struct { |
| 1574 | 1574 | |
| 1575 | 1575 | for (actual_errors.list) |actual_error| { |
| 1576 | 1576 | for (case_error_list) |case_msg, i| { |
| 1577 | if (handled_errors[i]) continue; | |
| 1578 | ||
| 1577 | 1579 | const ex_tag: std.meta.Tag(@TypeOf(case_msg)) = case_msg; |
| 1578 | 1580 | switch (actual_error) { |
| 1579 | 1581 | .src => |actual_msg| { |
test/cases/compile_errors/dereference_anyopaque.zig+1| ... | ... | @@ -42,6 +42,7 @@ pub export fn entry() void { |
| 42 | 42 | |
| 43 | 43 | // error |
| 44 | 44 | // backend=llvm |
| 45 | // target=x86_64-linux,aarch64-linux,arm-linux,x86_64-macos,aarch64-macos | |
| 45 | 46 | // |
| 46 | 47 | // :11:22: error: comparison of 'void' with null |
| 47 | 48 | // :25:51: error: unable to resolve comptime value |