serde icon indicating copy to clipboard operation
serde copied to clipboard

Testing `DeserializeSeed` using `serde_test`

Open Anders429 opened this issue 3 years ago • 1 comments

Is there any way to test types that implement DeserializeSeed, as opposed to Deserialize, using the serde_test crate? I am looking for some equivalent of assert_de_tokens, but that would accept the seed as well to test stateful deserialization. Perhaps something like a assert_de_seed_tokens or similar?

I would love to know if such a thing exists or if there are any workarounds that can be used to test DeserializeSeed types with the current tools.

Anders429 avatar Aug 17 '22 19:08 Anders429

Encountered the same issue and tried to deserialize into tokens manually. But de module is private despite that Deserializer itself is pub. Maybe make this module public?

Shatur avatar Sep 03 '22 20:09 Shatur