Running and Filtering Tests
Use zig test and narrow the run.
One Command to Test
To run the tests in a file you call the compiler in test mode. The zig test command compiles and executes every test block it finds.
zig test src/main.zigPoint It at a File
You give zig test the root source file. It pulls in tests from that file and from any file reached through @import.
All lessons in this course
- Writing test Blocks
- Assertions with std.testing
- The Testing Allocator Catches Leaks
- Running and Filtering Tests