(files: Record<string, string>)
| 11328 | |
| 11329 | describe('Rust cross-module recall', () => { |
| 11330 | function rustProject(files: Record<string, string>): string { |
| 11331 | const dir = createTempDir(); |
| 11332 | fs.writeFileSync(path.join(dir, 'Cargo.toml'), '[package]\nname = "proj"\nversion = "0.1.0"\nedition = "2021"\n'); |
| 11333 | fs.mkdirSync(path.join(dir, 'src'), { recursive: true }); |
| 11334 | for (const [rel, content] of Object.entries(files)) { |
| 11335 | const full = path.join(dir, 'src', rel); |
| 11336 | fs.mkdirSync(path.dirname(full), { recursive: true }); |
| 11337 | fs.writeFileSync(full, content); |
| 11338 | } |
| 11339 | return dir; |
| 11340 | } |
| 11341 | |
| 11342 | it('extracts a struct literal `Foo { .. }` as an instantiation across modules', async () => { |
| 11343 | const dir = rustProject({ |
no test coverage detected