Skip to content

Commit

Permalink
Add assertion for release incompatible tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Jul 31, 2024
1 parent 61216bf commit 588c779
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions masonry/src/widget/tests/safety_rails.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ fn check_forget_to_recurse_widget_added() {
#[should_panic(expected = "not visited in method layout")]
#[test]
fn check_forget_to_recurse_layout() {
assert!(cfg!(debug_assertions));
let widget = make_parent_widget(Flex::row()).layout_fn(|_child, _ctx, _| {
// We forget to call child.layout();
Size::ZERO
Expand All @@ -91,6 +92,7 @@ fn check_forget_to_recurse_layout() {
#[should_panic(expected = "missing call to place_child method for child widget")]
#[test]
fn check_forget_to_call_place_child() {
assert!(cfg!(debug_assertions));
let widget = make_parent_widget(Flex::row()).layout_fn(|child, ctx, bc| {
// We call child.layout(), but forget place_child
child.layout(ctx, bc)
Expand Down

0 comments on commit 588c779

Please sign in to comment.