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
Add support for #[should_panic] to the #[googletest::test] macro.
Previously, using `#[should_panic]` together with `#[googletest::test]` would result in compilation failure, since the latter always output a test function returning a `Result`, while `#[should_panic]` requires that the test function return `()`.
This modifies `#[googletest::test]` by detecting `#[should_panic]` and, when it is present, modifying the emitted function to not return anything.
When `#[should_panic]` is present, the test also panics if any non-fatal failure was recorded. The test is still allowed to run to completion. Otherwise, non-fatal assertion failures would be silently ignored, which is certainly not intended.
Fixes#328.
0 commit comments