MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / ir_cmp_slt_negative

Function ir_cmp_slt_negative

tests/integration/vm_execution.rs:2166–2186  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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]
2180fn ir_unary_neg() {
2181 let (_, outcome, _) = run_hll(
2182 r#"
2183main: () -> i32 {
2184 pos: i32 = 5
2185 neg: i32 = 0 - pos
2186 if neg == -5 {
2187 return 0
2188 }
2189 return 1

Callers

nothing calls this directly

Calls 3

pass_fail_irFunction · 0.85
run_irFunction · 0.85
push_instructionMethod · 0.45

Tested by

no test coverage detected