pdl: Test canonical vectors using Serde
Being able to serialize data with Serde allows us to test enums using
the canonical test vectors: we can take the output of PDL and
serialize it to JSON, which we then compare with the canonical test
vectors.
While this was motivated by the need for testing, Serde support can be
useful in general so I think this is an overall nice change. The
support is behind an off-by-default feature flag, just in case people
don’t want the generated code.
Test: atest pdl_tests pdl_rust_generator_tests_{le,be}
Change-Id: I6a19a939df7b449d350dbcda8a7daa2cb96733a2
Loading
Please register or sign in to comment