authorgravatar for codroid@gmail.comStevie Hryciw <codroid@gmail.com> 2022-11-14 15:52:04-08:00
committergravatar for codroid@gmail.comStevie Hryciw <codroid@gmail.com> 2022-12-15 00:56:27-08:00
log477038abe9b1c1a2e5074a865bd915d29906a72f
tree4f1d03d4893e9dca4a8f214ba2a0abf271e6df13
parent69b784ff52248663df210e9899bdbf9a4923a40e

test: observe and check note count in error output


1 files changed, 4 insertions(+), 2 deletions(-)

src/test.zig+4-2
...@@ -1723,7 +1723,8 @@ pub const TestContext = struct {...@@ -1723,7 +1723,8 @@ pub const TestContext = struct {
1723 (case_msg.src.column == std.math.maxInt(u32) or1723 (case_msg.src.column == std.math.maxInt(u32) or
1724 actual_msg.column == case_msg.src.column) and1724 actual_msg.column == case_msg.src.column) and
1725 std.mem.eql(u8, expected_msg, actual_msg.msg) and1725 std.mem.eql(u8, expected_msg, actual_msg.msg) and
1726 case_msg.src.kind == .note)1726 case_msg.src.kind == .note and
1727 actual_msg.count == case_msg.src.count)
1727 {1728 {
1728 handled_errors[i] = true;1729 handled_errors[i] = true;
1729 break;1730 break;
...@@ -1733,7 +1734,8 @@ pub const TestContext = struct {...@@ -1733,7 +1734,8 @@ pub const TestContext = struct {
1733 if (ex_tag != .plain) continue;1734 if (ex_tag != .plain) continue;
17341735
1735 if (std.mem.eql(u8, case_msg.plain.msg, plain.msg) and1736 if (std.mem.eql(u8, case_msg.plain.msg, plain.msg) and
1736 case_msg.plain.kind == .note)1737 case_msg.plain.kind == .note and
1738 case_msg.plain.count == plain.count)
1737 {1739 {
1738 handled_errors[i] = true;1740 handled_errors[i] = true;
1739 break;1741 break;