diff options
| author | Dominic <4678790+dweiller@users.noreply.github.com> | 2023-02-08 22:39:38 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-08 22:39:38 +1100 |
| commit | 948754c5d4b707c991c4db9cdfd968e6f4866ea4 (patch) | |
| tree | 186af6c30836699633d1fa26b18f69402fe90322 /src/Compilation.zig | |
| parent | edc0e84270c04acf432096c4772bfe199afdaf15 (diff) | |
| download | zig-948754c5d4b707c991c4db9cdfd968e6f4866ea4.tar.gz zig-948754c5d4b707c991c4db9cdfd968e6f4866ea4.zip | |
clone package table into custom test runner
Co-authored-by: Veikka Tuominen <git@vexu.eu>
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index f19e83680d..18d0e46892 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1627,10 +1627,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { const pkg = try Package.create(gpa, "root", test_dir, basename); // copy package table from main_pkg to root_pkg - var iter = main_pkg.table.valueIterator(); - while (iter.next()) |v| { - try pkg.add(gpa, v.*); - } + pkg.table = try main_pkg.table.clone(gpa); break :test_pkg pkg; } else try Package.createWithDir( gpa, |
