Extend test_internally_tagged_struct_variant_containing_unit_variant to cover maps and seqs

This commit is contained in:
Mingun 2020-11-03 21:37:02 +05:00
parent 9a84622c56
commit 3257851192

View File

@ -994,6 +994,28 @@ fn test_internally_tagged_struct_variant_containing_unit_variant() {
Token::StructEnd,
],
);
assert_de_tokens(
&Message::Log { level: Level::Info },
&[
Token::Map { len: Some(2) },
Token::Str("action"),
Token::Str("Log"),
Token::Str("level"),
Token::BorrowedStr("Info"),
Token::MapEnd,
],
);
assert_de_tokens(
&Message::Log { level: Level::Info },
&[
Token::Seq { len: Some(2) },
Token::Str("Log"),
Token::BorrowedStr("Info"),
Token::SeqEnd,
],
);
}
#[test]