Clean up unneeded raw strings in test
This commit is contained in:
parent
1774794b19
commit
8c4aad3a59
@ -2719,7 +2719,7 @@ fn test_expecting_message_externally_tagged_enum() {
|
|||||||
// Check that #[serde(expecting = "...")] doesn't affect variant identifier error message
|
// Check that #[serde(expecting = "...")] doesn't affect variant identifier error message
|
||||||
assert_de_tokens_error::<Enum>(
|
assert_de_tokens_error::<Enum>(
|
||||||
&[Token::Enum { name: "Enum" }, Token::Unit],
|
&[Token::Enum { name: "Enum" }, Token::Unit],
|
||||||
r"invalid type: unit value, expected variant identifier",
|
"invalid type: unit value, expected variant identifier",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2740,7 +2740,7 @@ fn test_expecting_message_internally_tagged_enum() {
|
|||||||
// Check that #[serde(expecting = "...")] doesn't affect variant identifier error message
|
// Check that #[serde(expecting = "...")] doesn't affect variant identifier error message
|
||||||
assert_de_tokens_error::<Enum>(
|
assert_de_tokens_error::<Enum>(
|
||||||
&[Token::Map { len: None }, Token::Str("tag"), Token::Unit],
|
&[Token::Map { len: None }, Token::Str("tag"), Token::Unit],
|
||||||
r"invalid type: unit value, expected variant identifier",
|
"invalid type: unit value, expected variant identifier",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2766,7 +2766,7 @@ fn test_expecting_message_adjacently_tagged_enum() {
|
|||||||
// Check that #[serde(expecting = "...")] doesn't affect variant identifier error message
|
// Check that #[serde(expecting = "...")] doesn't affect variant identifier error message
|
||||||
assert_de_tokens_error::<Enum>(
|
assert_de_tokens_error::<Enum>(
|
||||||
&[Token::Map { len: None }, Token::Str("tag"), Token::Unit],
|
&[Token::Map { len: None }, Token::Str("tag"), Token::Unit],
|
||||||
r"invalid type: unit value, expected variant of enum Enum",
|
"invalid type: unit value, expected variant of enum Enum",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2779,7 +2779,7 @@ fn test_expecting_message_untagged_tagged_enum() {
|
|||||||
Untagged,
|
Untagged,
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_de_tokens_error::<Enum>(&[Token::Str("Untagged")], r"something strange...");
|
assert_de_tokens_error::<Enum>(&[Token::Str("Untagged")], "something strange...");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -2800,7 +2800,7 @@ fn test_expecting_message_identifier_enum() {
|
|||||||
|
|
||||||
assert_de_tokens_error::<FieldEnum>(
|
assert_de_tokens_error::<FieldEnum>(
|
||||||
&[Token::Unit],
|
&[Token::Unit],
|
||||||
r"invalid type: unit value, expected something strange...",
|
"invalid type: unit value, expected something strange...",
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_de_tokens_error::<FieldEnum>(
|
assert_de_tokens_error::<FieldEnum>(
|
||||||
@ -2809,12 +2809,12 @@ fn test_expecting_message_identifier_enum() {
|
|||||||
Token::Str("Unknown"),
|
Token::Str("Unknown"),
|
||||||
Token::None,
|
Token::None,
|
||||||
],
|
],
|
||||||
r"invalid type: map, expected something strange...",
|
"invalid type: map, expected something strange...",
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_de_tokens_error::<VariantEnum>(
|
assert_de_tokens_error::<VariantEnum>(
|
||||||
&[Token::Unit],
|
&[Token::Unit],
|
||||||
r"invalid type: unit value, expected something strange...",
|
"invalid type: unit value, expected something strange...",
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_de_tokens_error::<VariantEnum>(
|
assert_de_tokens_error::<VariantEnum>(
|
||||||
@ -2825,7 +2825,7 @@ fn test_expecting_message_identifier_enum() {
|
|||||||
Token::Str("Unknown"),
|
Token::Str("Unknown"),
|
||||||
Token::None,
|
Token::None,
|
||||||
],
|
],
|
||||||
r"invalid type: map, expected something strange...",
|
"invalid type: map, expected something strange...",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user