diff --git a/test_suite/tests/test_enum_adjacently_tagged.rs b/test_suite/tests/test_enum_adjacently_tagged.rs index a7968336..d60817cc 100644 --- a/test_suite/tests/test_enum_adjacently_tagged.rs +++ b/test_suite/tests/test_enum_adjacently_tagged.rs @@ -11,17 +11,17 @@ use serde_test::{ assert_de_tokens, assert_de_tokens_error, assert_ser_tokens, assert_tokens, Token, }; -#[test] -fn test_adjacently_tagged_enum() { - #[derive(Debug, PartialEq, Serialize, Deserialize)] - #[serde(tag = "t", content = "c")] - enum AdjacentlyTagged { - Unit, - Newtype(T), - Tuple(u8, u8), - Struct { f: u8 }, - } +#[derive(Debug, PartialEq, Serialize, Deserialize)] +#[serde(tag = "t", content = "c")] +enum AdjacentlyTagged { + Unit, + Newtype(T), + Tuple(u8, u8), + Struct { f: u8 }, +} +#[test] +fn unit() { // unit with no content assert_ser_tokens( &AdjacentlyTagged::Unit::, @@ -118,7 +118,10 @@ fn test_adjacently_tagged_enum() { Token::StructEnd, ], ); +} +#[test] +fn newtype() { // newtype with tag first assert_tokens( &AdjacentlyTagged::Newtype::(1), @@ -211,7 +214,10 @@ fn test_adjacently_tagged_enum() { Token::StructEnd, ], ); +} +#[test] +fn tuple() { // tuple with tag first assert_tokens( &AdjacentlyTagged::Tuple::(1, 1), @@ -255,7 +261,10 @@ fn test_adjacently_tagged_enum() { Token::StructEnd, ], ); +} +#[test] +fn struct_() { // struct with tag first assert_tokens( &AdjacentlyTagged::Struct:: { f: 1 },