()
| 587 | // `flags & MASK == MASK` is `(flags & MASK) == MASK`, so the mask test holds. |
| 588 | assert_exit( |
| 589 | r#" |
| 590 | main: () -> i32 { |
| 591 | flags: i32 = 0b0110 |
| 592 | if flags & 0b0010 == 0b0010 { |
| 593 | return 5 |
| 594 | } |
| 595 | return 0 |
| 596 | } |
| 597 | "#, |
| 598 | 5, |
| 599 | ); |
| 600 | } |
| 601 | |
| 602 | #[test] |
| 603 | fn slice_in_bounds_does_not_trap() { |
| 604 | // A runtime index that is in bounds passes the check and reads the element. |
| 605 | assert_exit( |
| 606 | r#" |
nothing calls this directly
no test coverage detected