zig/doc/langref/testing_failure.zig

12 lines
180 B
Zig

const std = @import("std");
test "expect this to fail" {
try std.testing.expect(false);
}
test "expect this to succeed" {
try std.testing.expect(true);
}
// test_error=