From 5445f1741b1269f81b67403ad8b602f214ae7452 Mon Sep 17 00:00:00 2001 From: Mingun Date: Sun, 11 Aug 2024 23:10:12 +0500 Subject: [PATCH] Reuse AdjacentlyTagged enum in newtype_with_newtype test --- test_suite/tests/test_enum_adjacently_tagged.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/test_suite/tests/test_enum_adjacently_tagged.rs b/test_suite/tests/test_enum_adjacently_tagged.rs index eccdc335..f3be60d3 100644 --- a/test_suite/tests/test_enum_adjacently_tagged.rs +++ b/test_suite/tests/test_enum_adjacently_tagged.rs @@ -482,17 +482,13 @@ fn newtype_with_newtype() { #[derive(Debug, PartialEq, Serialize, Deserialize)] struct NewtypeStruct(u32); - #[derive(Debug, PartialEq, Serialize, Deserialize)] - #[serde(tag = "t", content = "c")] - enum E { - Newtype(NewtypeStruct), - Null, - } - assert_de_tokens( - &E::Newtype(NewtypeStruct(5)), + &AdjacentlyTagged::Newtype(NewtypeStruct(5)), &[ - Token::Struct { name: "E", len: 2 }, + Token::Struct { + name: "AdjacentlyTagged", + len: 2, + }, Token::Str("c"), Token::NewtypeStruct { name: "NewtypeStruct", @@ -500,7 +496,7 @@ fn newtype_with_newtype() { Token::U32(5), Token::Str("t"), Token::UnitVariant { - name: "E", + name: "AdjacentlyTagged", variant: "Newtype", }, Token::StructEnd,