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

Function run_arithmetic_exit_code

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

Source from the content-addressed store, hash-verified

160
161#[test]
162fn run_arithmetic_exit_code() {
163 // (10 + 20) * 2 / 5 - (10 % 20) = 12 - 10 = 2; negated = -2
164 let src = "
165main: () -> i32 {
166 a: i32 = 10
167 b: i32 = 20
168 c: i32 = (a + b) * 2
169 d: i32 = c / 5 - (a % b)
170 return -d
171}";
172 let (_, code) = run_hll(src);
173 assert_eq!(code, -2);
174}
175
176#[test]
177fn run_conditional_branch() {

Callers

nothing calls this directly

Calls 1

run_hllFunction · 0.70

Tested by

no test coverage detected