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

Function run_conditional_branch

tests/integration/cli_pipeline.rs:177–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175 assert_eq!(code, 1, "branch should be taken when x=7 > 5");
176}
177
178#[test]
179fn run_while_loop_accumulator() {
180 let src = "
181main: () -> i32 {
182 sum: i32 = 0
183 i: i32 = 1
184 while i <= 10 {
185 sum = sum + i
186 i = i + 1
187 }
188 return sum
189}";
190 let (_, code) = run_hll(src);
191 assert_eq!(code, 55, "sum 1..=10 should be 55");

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected