snarkVM
snarkVM copied to clipboard
Add unit tests for `CanonicalSerialize`
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.