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