add a test

This commit is contained in:
Oliver Schneider 2016-04-12 12:42:07 +02:00
parent d9b6feef19
commit f659fa8919

View File

@ -697,3 +697,21 @@ fn test_deserialize_with_enum() {
] ]
); );
} }
#[test]
fn test_missing_renamed_field() {
assert_de_tokens_error::<RenameStruct>(
vec![
Token::StructStart("Superhero", Some(2)),
Token::StructSep,
Token::Str("a1"),
Token::I32(1),
Token::StructEnd,
],
Error::MissingFieldError("a3"),
)
}