Hi there, I am setting a test step in my build.zig according to this https://ziglang.org/learn/build-system/#testing, so I added this:
const test_step = b.step("test", "Run unit tests");
const unit_tests = b.addTest(.{
.root_source_file = b.path("tests/test_sum.zig"),
.target = b.resolveTargetQuery(target),
});
And I have got this:
$ zig build test
<omitted>/build.zig:30:40: error: expected type 'Target.Query', found 'Build.ResolvedTarget'
.target = b.resolveTargetQuery(target),
...
Can someone help me fix this error? As a second question, how can I run all the tests in the tests folder, not just one file? (Note: the reason for a dedicated tests folder is because my src is actually C code that I want to test with Zig)