add failing test

This commit is contained in:
Adam H. Leventhal 2023-09-06 15:31:16 -07:00
parent ddc1ee564b
commit 5d1403461c

View File

@ -2380,6 +2380,30 @@ fn test_partially_untagged_enum_desugared() {
);
}
#[test]
fn test_partially_untagged_simple_enum() {
#[derive(Serialize, Deserialize, PartialEq, Debug)]
#[serde(tag = "tag")]
enum Data {
A,
#[serde(untagged)]
Var(u32),
}
let data = Data::A;
assert_tokens(
&data,
&[
Token::Map { len: None },
Token::Str("t"),
Token::Str("A"),
Token::Str("b"),
Token::I32(0),
Token::MapEnd,
],
);
}
#[test]
fn test_flatten_option() {
#[derive(Serialize, Deserialize, PartialEq, Debug)]