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

Function run_while_loop_accumulator

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

Source from the content-addressed store, hash-verified

189
190#[test]
191fn run_while_loop_accumulator() {
192 let src = "
193main: () -> i32 {
194 sum: i32 = 0
195 i: i32 = 1
196 while i <= 10 {
197 sum = sum + i
198 i = i + 1
199 }
200 return sum
201}";
202 let (_, code) = run_hll(src);
203 assert_eq!(code, 55, "sum 1..=10 should be 55");
204}
205
206#[test]
207fn run_function_call() {

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected