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
I have an idea for using fixture in the case macro:
struct TestDependency; // complex object
#[fixture]
fn dependency_built_in_one_way() -> TestDependency {
... // long setup
}
#[fixture]
fn dependency_built_in_another_way() -> TestDependency {
... // long setup
}
#[rstest]
fn testing_specific_feature(dependency_built_in_one_way: TestDependency) {
... // testing something only on the first object
}
// A test that should test a feature on both complex configurations of the dependency
#[rstest]
#[case(dependency_built_in_one_way)]
#[case(dependency_built_in_another_way)]
fn my_test(#[case] dependency: TestDependency) {
...
}
That would be useful to me. I could do something similar with cases on the fixture, but then I wouldn't be able to only use one of the built variants in certain tests.
The text was updated successfully, but these errors were encountered:
There is no way to implement because the procedural macro that expand the tests cannot know nothing about the available fixtures or other symbols that can be available with the same name.
Ah, I forgot to mention that dependency_built_in_one_way has other fixtures it depends on.
There is no way to implement because the procedural macro that expand the tests cannot know nothing about the available fixtures or other symbols that can be available with the same name.
I have an idea for using fixture in the
case
macro:That would be useful to me. I could do something similar with
cases
on the fixture, but then I wouldn't be able to only use one of the built variants in certain tests.The text was updated successfully, but these errors were encountered: