Check for sequence end

This commit is contained in:
David Tolnay
2017-02-02 22:12:07 -08:00
parent d298da0b4f
commit 02e6c04e9f
3 changed files with 50 additions and 16 deletions
+18
View File
@@ -725,6 +725,24 @@ fn test_untagged_enum() {
],
Error::Message("data did not match any variant of untagged enum Untagged".to_owned()),
);
assert_de_tokens_error::<Untagged>(
&[
Token::TupleStart(3),
Token::TupleSep,
Token::U8(1),
Token::TupleSep,
Token::U8(2),
Token::TupleSep,
Token::U8(3),
Token::TupleEnd,
],
Error::Message("data did not match any variant of untagged enum Untagged".to_owned()),
);
}
#[test]