Skip to content

Instantly share code, notes, and snippets.

View davidrios's full-sized avatar

David Rios davidrios

  • São Paulo, Brazil
View GitHub Profile
@karlseguin
karlseguin / test_runner.zig
Last active October 5, 2025 09:34
Custom Zig Test Runner, better ouput, timing display, and support for special "tests:beforeAll" and "tests:afterAll" tests
// This is for the Zig 0.15.
// See https://gist.github.com/karlseguin/c6bea5b35e4e8d26af6f81c22cb5d76b/1f317ebc9cd09bc50fd5591d09c34255e15d1d85
// for a version that workson Zig 0.14.1.
// in your build.zig, you can specify a custom test runner:
// const tests = b.addTest(.{
// .root_module = $MODULE_BEING_TESTED,
// .test_runner = .{ .path = b.path("test_runner.zig"), .mode = .simple },
// });