MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / latch_resets_between_runs

Function latch_resets_between_runs

codegraph-kernel/src/stack.rs:264–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

262
263 #[test]
264 fn latch_resets_between_runs() {
265 let deep = format!("void foo(void) {{\n{}{}\n}}\n", "{".repeat(DEPTH), "}".repeat(DEPTH));
266 on_small_stack(move || {
267 assert!(run_guarded(|| crate::ccpp::extract("deep.c", &deep, "c")).is_err());
268 // The latch from the deep file must not poison the next, shallow one.
269 let ok = run_guarded(|| crate::ccpp::extract("ok.c", "int x;\n", "c"));
270 assert!(ok.is_ok(), "latch leaked into the next run: {:?}", ok.err());
271 });
272 }
273}

Callers

nothing calls this directly

Calls 3

on_small_stackFunction · 0.85
run_guardedFunction · 0.85
extractFunction · 0.70

Tested by

no test coverage detected