Commit 2d33344
test: Serialization FFI error cases (#376)
## Description
A batch of tests to cover serialization and FFI error cases for
witness/proof values. C FFI coverage extension for out-of-bounds, bad
depth, and invalid inputs.
## Tests modified/added
rln/tests/ffi.rs:
- test_witness_serialization_truncated_extra_bytes_ffi
- test_proof_values_serialization_truncated_bytes_ffi
- test_rln_invalid_witness_input_ffi
- test_rln_out_of_bounds_ffi
rln/tests/protocol.rs:
- test_witness_serialization
- test_witness_serialization_be_roundtrip_and_length_check
- test_proof_values_serialization_be_roundtrip
## Issues reported
- #379
## Coverage changed
Before 88.05%
[Download HTML
Report](https://github.com/vacp2p/zerokit/actions/runs/21655661374/artifacts/5368022860)
After 88.98%
[Download HTML
Report](https://github.com/vacp2p/zerokit/actions/runs/22424907925/artifacts/5665353950)
## Checklist
- [x] I have run the CI coverage report. Add the `run-coverage` label to
this PR to enable it.
---------
Co-authored-by: Ekaterina Broslavskaya <seemenkina@gmail.com>1 parent be0d246 commit 2d33344
File tree
9 files changed
+662
-25
lines changed- rln
- src
- tests
- utils
- benches
- src/merkle_tree
9 files changed
+662
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
333 | | - | |
334 | | - | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
335 | 344 | | |
336 | 345 | | |
337 | 346 | | |
| |||
342 | 351 | | |
343 | 352 | | |
344 | 353 | | |
345 | | - | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
346 | 362 | | |
347 | 363 | | |
348 | 364 | | |
| |||
439 | 455 | | |
440 | 456 | | |
441 | 457 | | |
| 458 | + | |
442 | 459 | | |
443 | 460 | | |
444 | 461 | | |
445 | 462 | | |
446 | 463 | | |
447 | 464 | | |
448 | 465 | | |
449 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
450 | 471 | | |
451 | 472 | | |
452 | 473 | | |
| |||
0 commit comments