You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I'd like to be able to create a template with a number of AStruct instantiations defined:
#[template]
#[rstest]
#[case(AStruct{a: 1., b: 1.})]
#[case(AStruct{a: 1., b: 2.})]
// .. and more
fn base(s: AStruct) {}
Everything is fine so far. However, now I'd like to test the different operations using the AStruct instantiations that I've already defined. Can I do this with templates? Or is there another mechanism by which I could achieve this?
// How can I also apply a list of expected values here?
#[rstest]
#[apply(base)]
fn test_custom_add(s: AStruct, expected: f64) {}
The text was updated successfully, but these errors were encountered:
Say I have a struct for which a number of functions are implemented.
Now, I'd like to be able to create a template with a number of AStruct instantiations defined:
Everything is fine so far. However, now I'd like to test the different operations using the AStruct instantiations that I've already defined. Can I do this with templates? Or is there another mechanism by which I could achieve this?
The text was updated successfully, but these errors were encountered: