Closed realchonk closed 3 months ago
Are you planning to add the BE image to the test suite? You can use rstest to parameterize each test function, and run all of them on each image.
yes, but I have not looked into how rstest works.
I just pushed a commit that parameterizes all tests on both images.
Could you please reset --hard
and do in on #37? I changed the testing a little
Could you please
reset --hard
and do in on #37? I changed the testing a little
What do you want me to do in #37 exactly? Are you suggesting that we use the test! macro instead of rstest's #[apply()]
? IMHO test! is much less legible.
Could you please
reset --hard
and do in on #37? I changed the testing a littleWhat do you want me to do in #37 exactly? Are you suggesting that we use the test! macro instead of rstest's
#[apply()]
? IMHO test! is much less legible.
After looking into rstest a little more, I agree with you. I just tried to reduce boilerplate, because I needed to do something like thi for every function:
#[rstest]
#[case(42, "FortyTwo", ("minus twelve", -12))]
#[case(24, "TwentyFour", ("minus twentyfour", -24))]
#[trace] //This attribute enable tracing
fn should_fail(#[case] number: u32, #[case] name: &str, #[case] tuple: (&str, i32)) {
assert!(false); // <- stdout come out just for failed tests
}
These test cases should start working once #24 is merged.
I think I broke something by rebasing. I'm not sure how to fix this:
error: Wrong case signature: should match the given parameters list.
--> tests/integration.rs:153:12
|
153 | #[case::le(harness(GOLDEN_LE.as_path()))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
253 | #[apply(all_images)]
| -------------------- in this procedural macro expansion
|
= note: this error originates in the macro `all_images` which comes from the expansion of the attribute macro `apply` (in Nightly builds, run with -Z macro-backtrace for more info)
Fixed it, I forgot to add #[case]
Created on my PowerMac