snarkVM icon indicating copy to clipboard operation
snarkVM copied to clipboard

Add unit tests for `CanonicalSerialize`

Open Antonio95 opened this issue 3 months ago • 0 comments

Some simple tests should be added for CanonicalSerialize implementations. For instance, not too long ago it was discovered that serialized_size was returning an incorrect value for Option (cf. issue #2948). As an example, instance, not even all implementors in https://github.com/ProvableHQ/snarkVM/blob/staging/utilities/src/serialize/impls.rs are tested in that same file's tests.

A simple action plan would be to add analogous test cases to the ones in that file (which simply call the auxiliary test function test_serialize) for all types in that file and (at least some) elsewhere, such as field elements and curve points.

Antonio95 avatar Oct 14 '25 08:10 Antonio95