diff --git a/tests/resources/rstest/convert_string_literal.rs b/tests/resources/rstest/convert_string_literal.rs index 52a3927..0d8f512 100644 --- a/tests/resources/rstest/convert_string_literal.rs +++ b/tests/resources/rstest/convert_string_literal.rs @@ -46,3 +46,10 @@ fn not_convert_impl(#[case] that_impl: impl MyTrait, #[case] s: &str) { assert_eq!(42, that_impl.my_trait()); assert_eq!(42, s.my_trait()); } + +#[rstest] +#[case("1.2.3.4", "1.2.3.4:42")] +#[case("1.2.3.4".to_owned(), "1.2.3.4:42")] +fn not_convert_generics>(#[case] ip: S, #[case] addr: SocketAddr) { + assert_eq!(addr.ip().to_string(), ip.as_ref()); +} diff --git a/tests/rstest/mod.rs b/tests/rstest/mod.rs index 253afb5..8a1bdd4 100644 --- a/tests/rstest/mod.rs +++ b/tests/rstest/mod.rs @@ -845,6 +845,8 @@ fn convert_string_literal() { .fail("values::addr_4") .ok("not_convert_byte_array::case_1::values_1") .ok("not_convert_impl::case_1") + .ok("not_convert_generics::case_1") + .ok("not_convert_generics::case_2") .assert(output); }