Skip to content

Commit

Permalink
Add trait_for_bar test
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jan 17, 2024
1 parent 5a8b059 commit 432c173
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions examples/tests/generic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,26 @@ fn test_only_generic_args() {
Struct.target_only_generic_args(&*FOO, &Baz(FOO.clone()));
Struct.target_only_generic_args(&*BAR, &Baz(BAR.clone()));
}

mod trait_for_bar {
use super::*;

#[test_fuzz::test_fuzz_impl]
impl<T: FooBarTrait + Clone + Debug + Serialize, V: Clone + Serialize> Trait<T> for Baz<V> {
#[test_fuzz::test_fuzz(impl_generic_args = "Bar, Bar")]
fn target(&self, x: &T) {}

#[test_fuzz::test_fuzz(impl_generic_args = "Bar, Bar", generic_args = "Baz<Bar>")]
fn target_bound<U: BazTrait + Clone + Debug + Serialize>(&self, x: &T, y: &U) {}

#[test_fuzz::test_fuzz(impl_generic_args = "Bar, Bar", generic_args = "Baz<Bar>")]
fn target_where_clause<U>(&self, x: &T, y: &U)
where
U: BazTrait + Clone + Debug + Serialize,
{
}

#[test_fuzz::test_fuzz(only_generic_args)]
fn target_only_generic_args<U>(&self, _: &T, _: &U) {}
}
}

0 comments on commit 432c173

Please sign in to comment.