authorgravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-07-07 18:43:25-04:00
committergravatar for noam@pixelhero.devNoam Preil <noam@pixelhero.dev> 2020-07-07 18:43:25-04:00
logcf86aa8772f266cb475711aeee7b0c1b2083e6aa
tree5623f2cfbb0b226b2ce2753d55a539319c1eceb7
parent6ece36a051f5cf2bd2329d3f6512a7e9d55486a3
signaturelock-open Commit is signed but in an unrecognized format.

Fix a dumb in tests


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

src-self-hosted/test.zig+4-8
...@@ -494,10 +494,8 @@ pub const TestContext = struct {...@@ -494,10 +494,8 @@ pub const TestContext = struct {
494 }494 }
495 for (expected_output) |e, i| {495 for (expected_output) |e, i| {
496 if (out[i] != e) {496 if (out[i] != e) {
497 if (expected_output.len != out.len) {497 std.debug.warn("\nTransformed {} differs:\n================\nExpected:\n================\n{}\n================\nFound:\n================\n{}\n================\nTest failed.\n", .{ label, expected_output, out });
498 std.debug.warn("\nTransformed {} differs:\n================\nExpected:\n================\n{}\n================\nFound:\n================\n{}\n================\nTest failed.\n", .{ label, expected_output, out });498 std.process.exit(1);
499 std.process.exit(1);
500 }
501 }499 }
502 }500 }
503 } else {501 } else {
...@@ -525,10 +523,8 @@ pub const TestContext = struct {...@@ -525,10 +523,8 @@ pub const TestContext = struct {
525 }523 }
526 for (expected_output) |e, i| {524 for (expected_output) |e, i| {
527 if (out_zir.items[i] != e) {525 if (out_zir.items[i] != e) {
528 if (expected_output.len != out_zir.items.len) {526 std.debug.warn("{}\nTransformed {} differs:\n================\nExpected:\n================\n{}\n================\nFound:\n================\n{}\n================\nTest failed.\n", .{ case.name, label, expected_output, out_zir.items });
529 std.debug.warn("{}\nTransformed {} differs:\n================\nExpected:\n================\n{}\n================\nFound:\n================\n{}\n================\nTest failed.\n", .{ case.name, label, expected_output, out_zir.items });527 std.process.exit(1);
530 std.process.exit(1);
531 }
532 }528 }
533 }529 }
534 }530 }