You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: Cover code with potential to overflow panic (#382)
## Description
A batch of tests to cover places in code which may be prone to overflow
or panic.
## Tests modified/added
- test_pmtree_depth_shift_overflow
- test_pmtree_override_range_min_index_underflow
- test_bytes_le_to_rln_proof_short
- test_bytes_be_to_rln_proof_short
- test_bytes_le_to_rln_proof_empty
- test_bytes_be_to_rln_proof_empty
- test_rln_witness_to_bigint_json_fields
- test_length_prefix_overflow
- test_poseidon_grain_lfsr_new_panics_on_invalid_is_field
- test_poseidon_grain_lfsr_new_panics_on_invalid_is_sbox_an_inverse
- test_find_poseidon_ark_and_mds_bn254_regression_no_inverse_panic
- test_full_merkle_tree_new_depth_shift_overflow
- test_optimal_merkle_tree_new_depth_shift_overflow
- test_full_merkle_tree_set_range_start_overflow
- test_optimal_merkle_tree_set_range_start_overflow
- test_full_merkle_tree_override_range_min_index_underflow
- test_optimal_merkle_tree_override_range_min_index_underflow
## Issues reported
- #383
- #384
## Coverage changed
Before 88.98%
[Download HTML
Report](https://github.com/vacp2p/zerokit/actions/runs/22339493470/artifacts/5630265525)
After 88.12%
[Download HTML
Report](https://github.com/vacp2p/zerokit/actions/runs/23179431489/artifacts/5958379649)
## Checklist
- [x] My PR title follows [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) format
- [x] I have linked the related issue(s)
- [x] `cargo fmt --all -- --check` produces no changes
- [x] Clippy passes for all affected crate/feature combinations (see
[Linting](#linting-mirrors-ci) above)
- [x] `make test` passes locally
- [x] No new `unwrap()` / `expect()` / `panic!()` in library code
- [x] New code includes appropriate tests (unit / integration / WASM
where applicable)
- [x] I have run the CI coverage report — add the `run-coverage` label
to enable it
- [x] All CI checks pass and the PR is marked **Ready for review**
---------
Co-authored-by: vinhtc27 <vinhtc27@gmail.com>
0 commit comments