(tmp_path, source, header="", extra=None)
| 13 | |
| 14 | |
| 15 | def _extract(tmp_path, source, header="", extra=None): |
| 16 | files = {"use.cpp": source} |
| 17 | if header: |
| 18 | files["types.hpp"] = header |
| 19 | files["use.cpp"] = '#include "types.hpp"\n' + source |
| 20 | files.update(extra or {}) |
| 21 | paths = [] |
| 22 | for name, text in files.items(): |
| 23 | path = tmp_path / name |
| 24 | path.parent.mkdir(parents=True, exist_ok=True) |
| 25 | path.write_text(text, encoding="utf-8") |
| 26 | paths.append(path) |
| 27 | return paths, extract(paths, root=tmp_path, cache_root=tmp_path / "cache", parallel=False) |
| 28 | |
| 29 | |
| 30 | def _calls(result, caller="Run()"): |
no test coverage detected