()
| 791 | #[test] |
| 792 | fn hll_global_array_initializer() { |
| 793 | // A non-zero array global initializer lands in .data and reads back. |
| 794 | let (_, outcome, _) = run_hll( |
| 795 | r#" |
| 796 | arr: i64[4] = [10, 20, 12, 0] |
| 797 | main: () -> i32 { |
| 798 | s: i64 = arr[0] + arr[1] + arr[2] + arr[3] |
| 799 | return s as i32 |
| 800 | } |
| 801 | "#, |
| 802 | ); |
| 803 | assert!( |
| 804 | matches!(outcome, StepOutcome::Halted(42)), |
| 805 | "expected Halted(42), got {outcome:?}" |
| 806 | ); |
| 807 | } |
| 808 | |
| 809 | #[test] |
| 810 | fn hll_function_call_and_return() { |
| 811 | let (_, outcome, _) = run_hll( |
nothing calls this directly
no test coverage detected