Skip to content

Commit

Permalink
Extend test_internally_tagged_struct_variant_containing_unit_variant …
Browse files Browse the repository at this point in the history
…to cover maps and seqs
  • Loading branch information
Mingun committed Feb 2, 2021
1 parent 9a84622 commit 3257851
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test_suite/tests/test_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 3257851

Please sign in to comment.