()
| 2194 | matches!(outcome, RunOutcome::Halted(0)), |
| 2195 | "0 - 5 = -5, got {outcome:?}" |
| 2196 | ); |
| 2197 | } |
| 2198 | |
| 2199 | /// All-ones value check (HLL has no bitwise-not surface op here). |
| 2200 | #[test] |
| 2201 | fn ir_unary_not() { |
| 2202 | let (_, outcome, _) = run_hll( |
| 2203 | r#" |
| 2204 | main: () -> i32 { |
| 2205 | all_ones: i32 = 0 - 1 |
| 2206 | neg_one: i32 = 0 - 1 |
| 2207 | if all_ones == neg_one { |
| 2208 | return 0 |
| 2209 | } |
| 2210 | return 1 |
| 2211 | } |
| 2212 | "#, |
| 2213 | ); |
| 2214 | assert!( |
| 2215 | matches!(outcome, RunOutcome::Halted(0)), |
| 2216 | "bitwise all-ones check, got {outcome:?}" |