-
-
Notifications
You must be signed in to change notification settings - Fork 938
tests: Make known_failure more precise
#22366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
f5cbf1d to
061a46d
Compare
|
Tests in It's because we expect on e.g. overflow panic message, but those don't exist in release. |
4b9b3d4 to
9f0469d
Compare
|
Added a commit to skip panicky tests if debug assertions are disabled; it's a little heavy-handed, as some panicky tests hit regular assertions, but we have few enough of those that I don't think it's a big deal. |
This'll make it easier to tweak it in the future.
Tests that are expected to panic are now required to explicitely say so in their `test.toml`, by using `known_failure.panic = "expected message"`. Additionally, only panics raised during player ticking are caught, and not those happenning elsewhere (e.g. in rendering, or in test framework code).
Root-level `known_failure = true` now only except the trace output check to fail; if other checks (e.g. image comparisons) are expected to fail, they should specify their own `known_failure = true`.
9f0469d to
e3fa7b4
Compare
|
|
||
| num_frames = 1 | ||
| known_failure = true # https://github.com/ruffle-rs/ruffle/issues/12123 | ||
| known_failure = true # https://github.com/ruffle-rs/ruffle/issues/12118 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a reason for this comment to change? #12118 seems to be about acid-shapes-testing
| } | ||
|
|
||
| fn visit_bool<E: de::Error>(self, v: bool) -> Result<Self::Value, E> { | ||
| Ok(match v { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Could this just be an if-statement?
(Requires PR #22348)
Instead of treating any error or panic as a success, only "expected" failures are allowed, and the kind of check that should fail must be specified:
known_failure = true: means that the final trace output check is expected to fail;known_failure.panic = "msg": means that the test is expected to panic (like the#[should_panic = "msg"]attribute in Rust unit tests);image_comparisons.NAME.known_failure = true: means that the given image check is expected to fail.