From 36b9a859c447244aa6ae4fd73dfe0d01f840e9e1 Mon Sep 17 00:00:00 2001 From: Mingun Date: Sun, 11 Aug 2024 23:03:26 +0500 Subject: [PATCH] Test deserialization of the serialized unit format for adjacently tagged enum --- test_suite/tests/test_enum_adjacently_tagged.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test_suite/tests/test_enum_adjacently_tagged.rs b/test_suite/tests/test_enum_adjacently_tagged.rs index 4b2db7a2..9836e4b0 100644 --- a/test_suite/tests/test_enum_adjacently_tagged.rs +++ b/test_suite/tests/test_enum_adjacently_tagged.rs @@ -7,9 +7,7 @@ )] use serde_derive::{Deserialize, Serialize}; -use serde_test::{ - assert_de_tokens, assert_de_tokens_error, assert_ser_tokens, assert_tokens, Token, -}; +use serde_test::{assert_de_tokens, assert_de_tokens_error, assert_tokens, Token}; #[derive(Debug, PartialEq, Serialize, Deserialize)] #[serde(tag = "t", content = "c")] @@ -23,7 +21,7 @@ enum AdjacentlyTagged { #[test] fn unit() { // unit with no content - assert_ser_tokens( + assert_tokens( &AdjacentlyTagged::Unit::, &[ Token::Struct { @@ -39,7 +37,7 @@ fn unit() { ], ); - // unit with no content + // unit with no content and incorrect hint for number of elements assert_de_tokens( &AdjacentlyTagged::Unit::, &[