Test only deser for untagged unit visit_none

This commit is contained in:
David Tolnay 2019-11-24 15:59:08 -08:00
parent 59b99d2d60
commit 97a98a7031
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -637,8 +637,10 @@ fn test_untagged_enum() {
],
);
// Serializes to unit, deserializes from either depending on format's
// preference.
assert_tokens(&Untagged::C, &[Token::Unit]);
assert_tokens(&Untagged::C, &[Token::None]);
assert_de_tokens(&Untagged::C, &[Token::None]);
assert_tokens(&Untagged::D(4), &[Token::U8(4)]);
assert_tokens(&Untagged::E("e".to_owned()), &[Token::Str("e")]);