test: remove package-wide import assumptions

This commit is contained in:
2026-08-14 03:45:02 +09:00
parent a841278333
commit 04d9560d51
74 changed files with 121 additions and 154 deletions

View File

@@ -2470,11 +2470,22 @@ fn hexbytes(value: str) str = {
let roota: str = "package main;\n// ROOT_A\n";
i = 0;
for (i < packagecount) {
roota = strings.concat(roota, "import ", boundarypkgname(i), ";\n");
if (i != 150) {
roota = strings.concat(roota, "import ", boundarypkgname(i), ";\n");
};
i += 1;
};
i = 0;
for (i < packagecount) {
if (i != 150) {
let name: str = boundarypkgname(i);
roota = strings.concat(roota, "fn use_", name,
"() i32 = { return ", name, ".value(); };\n");
};
i += 1;
};
let rootz: str = strings.concat("package main;\nimport p150;\n",
"// ROOT_Z\nfn main() i32 = { return p000.value() - 42; };\n");
"// ROOT_Z\nfn main() i32 = { return p150.value() - 42; };\n");
writefile(strings.concat(target, "/a.ww"), roota);
writefile(strings.concat(target, "/z.ww"), rootz);
let chainsource: str = strings.concat("package main;\nimport p000;\n",
@@ -2847,9 +2858,9 @@ fn hexbytes(value: str) str = {
let totaldirectorycount: i32 = directorycount + aliascount;
let productcount: i32 = directorycount * 2 + aliascount;
// Each selected directory contributes production, internal, external, and
// two generated-main actions. The shared test support action and its nine
// two generated-main actions. The shared test support action and its eight
// ordinary dependencies are command-global actions too.
let directactioncount: i32 = directorycount * 5 + 10;
let directactioncount: i32 = directorycount * 5 + 9;
let coordinatoractioncount: i32 = directactioncount + aliascount * 2;
let i: i32 = 0;
for (i < directorycount) {
@@ -3218,7 +3229,7 @@ fn hexbytes(value: str) str = {
i += 1;
};
let supportactions: []str = ["ascii", "bytes", "encoding.utf8",
"fnmatch", "os", "rt", "strings", "test", "time", "types"];
"fnmatch", "os", "strings", "test", "time", "types"];
let ai: i32 = 0;
for (ai < supportactions.len) {
i = 0;
@@ -3643,7 +3654,6 @@ fn hexbytes(value: str) str = {
let clientbody: str = strings.concat(
"package main;\n",
"import domain.internal.secret;\n",
"import domain.internal.secret;\n",
"fn main() i32 = { return secret.value(); };\n");
writefile(strings.concat(leaf, "/leaf.ww"), leafbody);
writefile(strings.concat(secret, "/a.ww"), secreta);