mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 21:48:02 +00:00
Extend test_internally_tagged_newtype_variant_containing_unit_struct to cover structs and seqs
This commit is contained in:
@@ -1899,6 +1899,25 @@ fn test_internally_tagged_newtype_variant_containing_unit_struct() {
|
||||
Token::MapEnd,
|
||||
],
|
||||
);
|
||||
|
||||
assert_de_tokens(
|
||||
&Message::Info(Info),
|
||||
&[
|
||||
Token::Struct { name: "Message", len: 1 },
|
||||
Token::Str("topic"),
|
||||
Token::Str("Info"),
|
||||
Token::StructEnd,
|
||||
],
|
||||
);
|
||||
|
||||
assert_de_tokens(
|
||||
&Message::Info(Info),
|
||||
&[
|
||||
Token::Seq { len: Some(1) },
|
||||
Token::Str("Info"),
|
||||
Token::SeqEnd,
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
#[deny(safe_packed_borrows)]
|
||||
|
||||
Reference in New Issue
Block a user