()
| 697 | "#, |
| 698 | 70, |
| 699 | ); |
| 700 | } |
| 701 | |
| 702 | #[test] |
| 703 | fn range_slice_end_past_len_traps() { |
| 704 | // An end beyond the source length fails the slice bounds check (code 134). |
| 705 | assert_exit( |
| 706 | r#" |
| 707 | main: () -> i32 { |
| 708 | arr: i32[5] = [10, 20, 30, 40, 50] |
| 709 | b: i32 = 10 |
| 710 | view := arr[1..b] |
| 711 | return view[0] |
| 712 | } |
| 713 | "#, |
| 714 | 134, |
| 715 | ); |
| 716 | } |
| 717 | |
| 718 | #[test] |
| 719 | fn range_slice_start_after_end_traps() { |
nothing calls this directly
no test coverage detected