()
| 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 | } |
nothing calls this directly
no test coverage detected