First off, thank you very much for this library! As a zig newbie, having a property-based testing library is so helpful.
Describe the bug
Due to what I suspect is described in the ziglang repo here, when I run minish-enabled tests with zig build test in my code, I get something like
test
└─ run test w
OK. 100 tests passed.
failed command: ./.zig-cache/o/b95d4eb9425be31e19e7b96b315bfc36/test --cache-dir=./.zig-cache --seed=0xe35c8051 --listen=-
due to, I suspect, the use of std.debug.print in minish/runner.zig.
To Reproduce
Steps to reproduce the behavior:
- Add
minish to my build.zig per the README and fetch it with zig fetch.
- Write a property test; in my little example, I've got the following to demonstrate the equivalence of two different versions of an algorithm:
test "equivalence" {
const minish = @import("minish");
const tuple_gen = minish.gen.tuple2(u64, u64, minish.gen.int(u64), minish.gen.int(u64));
try minish.check(std.testing.allocator, tuple_gen, struct {
fn f(t: struct { u64, u64 }) !void {
var a, var n = t;
const m: u64 = 1e9 + 7;
a %= m;
n %= m;
try std.testing.expectEqual(recursive(a, n, m), iterative(a, n, m));
try std.testing.expectEqual(inv(a, m, recursive), inv(a, m, iterative));
}
}.f, .{});
}
- Run
zig build test
Expected behavior
No warnings about "failed" things when the test passes.
Additional context
This is on zig 0.16.0.
Thanks again!
First off, thank you very much for this library! As a zig newbie, having a property-based testing library is so helpful.
Describe the bug
Due to what I suspect is described in the
ziglangrepo here, when I runminish-enabled tests withzig build testin my code, I get something likedue to, I suspect, the use of
std.debug.printinminish/runner.zig.To Reproduce
Steps to reproduce the behavior:
minishto mybuild.zigper the README and fetch it withzig fetch.zig build testExpected behavior
No warnings about "failed" things when the test passes.
Additional context
This is on zig 0.16.0.
Thanks again!