Closed Mustafif closed 4 months ago
When running a file, Mufi's compile and runtime error will be treated as a Zig error Done in this commit: https://github.com/Mustafif/MufiZ/commit/4f7f9fdaf69ec6d64da16d5733622b050e342fa1
Edit to initial proposal, we will need to store all tests in src/main.zig
so all unit tests are available.
A python script has been made to do the "unit testing" and report successful and failed tests. The initial support has been made in https://github.com/Mustafif/MufiZ/commit/52d932d5e018dfa33109f2838628eddec1d4eaa2 . We will look at more ways to make this script smarter and help us with debugging. We also need to grow all the tests in this suite.
In our Mars release, I shipped it with broken
Vec3
functions which are now fixed inv0.7.0
but this was mainly a boolean issue. This could've been caught if we had a test suite implementation instead of random test files.Here's my proposition:
On the Zig side:
This will involve making runtime and compile errors, an error union in Zig so we can properly see if tests fail or pass. This will allow us to utilize Zig Unit Testing to create a nice framework.