halo2
halo2 copied to clipboard
[Meta] Improve unit test coverage
We can improve our unit test coverage in order to reduce the possibility of introducing bugs while refactoring and optimizing the code (as it happened in https://github.com/privacy-scaling-explorations/halo2/issues/321)
Here are some tasks that we can do
- https://github.com/privacy-scaling-explorations/halo2/pull/328 Add a tool to check the current unit test coverage
- https://github.com/privacy-scaling-explorations/halo2/pull/333. Coverage to 80%.
- https://github.com/privacy-scaling-explorations/halo2/pull/349. Deterministic tests to check if anything gone wrong.
- Based on the results of the tool, introduce tests that cover the different paths that the code can take
- Add more negative tests (circuits that have constraints / assignments that are supposed to not pass)
- For example, a lookup to a table where the entry doesn't exists (see https://github.com/privacy-scaling-explorations/halo2/issues/325#issuecomment-2107517765)