zig icon indicating copy to clipboard operation
zig copied to clipboard

Add test-runner std.testing output settings

Open k0tran opened this issue 3 years ago • 0 comments

All std.testing uses std.debug.print.

I've tried implementing custom test-runner, but I couldn't manage the output of the testing library. For example we have test:

test "sample" {
    @import("std").testing.expectEqual(test_func(), 3);
}

When cycling over builtin.test_functions and running failing test - error message prints immideatly. But I need to print it with special prefix <ERROR::>, which is currently seems impossible.

I think supplying test runner with pointer to error message would be quite useful.

k0tran avatar Jan 08 '23 21:01 k0tran