mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 14:57:59 +00:00
Move test for untagged-variant-from-unit where it belongs
This commit is contained in:
@@ -638,6 +638,7 @@ fn test_untagged_enum() {
|
||||
);
|
||||
|
||||
assert_tokens(&Untagged::C, &[Token::Unit]);
|
||||
assert_tokens(&Untagged::C, &[Token::None]);
|
||||
|
||||
assert_tokens(&Untagged::D(4), &[Token::U8(4)]);
|
||||
assert_tokens(&Untagged::E("e".to_owned()), &[Token::Str("e")]);
|
||||
@@ -652,11 +653,6 @@ fn test_untagged_enum() {
|
||||
],
|
||||
);
|
||||
|
||||
assert_de_tokens_error::<Untagged>(
|
||||
&[Token::None],
|
||||
"data did not match any variant of untagged enum Untagged",
|
||||
);
|
||||
|
||||
assert_de_tokens_error::<Untagged>(
|
||||
&[Token::Tuple { len: 1 }, Token::U8(1), Token::TupleEnd],
|
||||
"data did not match any variant of untagged enum Untagged",
|
||||
|
||||
Reference in New Issue
Block a user