()
| 2164 | small: u32 = 1 |
| 2165 | if big > small { |
| 2166 | return 0 |
| 2167 | } |
| 2168 | return 1 |
| 2169 | } |
| 2170 | "#, |
| 2171 | ); |
| 2172 | assert!( |
| 2173 | matches!(outcome, StepOutcome::Halted(0)), |
| 2174 | "0xFFFF_FFFF > 1 should be true (unsigned), got {outcome:?}" |
| 2175 | ); |
| 2176 | } |
| 2177 | |
| 2178 | /// Unary negation: 0 - 5 = -5. |
| 2179 | #[test] |
| 2180 | fn ir_unary_neg() { |
| 2181 | let (_, outcome, _) = run_hll( |
| 2182 | r#" |
| 2183 | main: () -> i32 { |
| 2184 | pos: i32 = 5 |
| 2185 | neg: i32 = 0 - pos |
| 2186 | if neg == -5 { |
| 2187 | return 0 |
| 2188 | } |
| 2189 | return 1 |
nothing calls this directly
no test coverage detected