test: remove package-wide import assumptions
This commit is contained in:
@@ -13,8 +13,9 @@ package collide_test;
|
||||
// global), so a single-file fixture cannot express it.
|
||||
//
|
||||
// barefn (#84/#24a) — a `package main;` root `fn run` coexists with
|
||||
// imported aa.run: build+run exit 9 on BOTH stages (the user's
|
||||
// main.run wins, never aa.run=5); the concatenated
|
||||
// imported aa.run: build+run exit 9 on BOTH stages while an explicit
|
||||
// `aa.run()` use keeps the source import real; the user's unqualified
|
||||
// `run()` resolves to main.run, never aa.run=5. The concatenated
|
||||
// __root.s+aa.s (fixed #93 sep order) carries EXACTLY ONE
|
||||
// `TEXT main.run,` and EXACTLY ONE `TEXT aa.run,` (distinct symbols,
|
||||
// no #31-class w6l-tolerated duplicate, no silently-dead bare fn);
|
||||
@@ -65,7 +66,8 @@ fn runcode(dir: str, name: str, argv: []str) i32 = {
|
||||
"import bar;\n",
|
||||
"let slot: i64 = 7;\n",
|
||||
"let fp: *i64 = &slot;\n",
|
||||
"export fn main() int = { return (*fp): int; };\n"));
|
||||
"export fn main() int = { let _ = bar.slot(); ",
|
||||
"return (*fp): int; };\n"));
|
||||
let av: []str = [testenv.driver(drvs[i]), "build", "-I", "bar",
|
||||
"main.ww"];
|
||||
if (runcode(td, strings.concat("build_", drvs[i]), av) == 0) {
|
||||
@@ -102,7 +104,10 @@ fn textcount(s: str, sym: str) i32 = {
|
||||
"package main;\n",
|
||||
"import aa;\n",
|
||||
"fn run() i32 = { return 9; };\n",
|
||||
"export fn main() i32 = { return run(); };\n"));
|
||||
"export fn main() i32 = {\n",
|
||||
"\tlet foreign: i32 = aa.run();\n",
|
||||
"\treturn run() + foreign - foreign;\n",
|
||||
"};\n"));
|
||||
let drvs: []str = ["ww", "ww_ww"];
|
||||
let tags: []str = ["cs", "ww"];
|
||||
let asms: []str = ["", ""];
|
||||
|
||||
@@ -77,7 +77,7 @@ fn row(label: str, nfiles: i32) void = {
|
||||
};
|
||||
let mainww: str = strings.concat(td, "/main.ww");
|
||||
testenv.writefile(mainww,
|
||||
"package main;\nimport bigmod;\nfn main() void = {};\n");
|
||||
"package main;\nimport bigmod;\nfn main() i32 = { return bigmod.f000(); };\n");
|
||||
|
||||
let drvs: []str = ["ww", "ww_ww"];
|
||||
let stems: []str = ["X_c", "X_w"];
|
||||
|
||||
@@ -12,7 +12,7 @@ package modreset_test;
|
||||
// rejected against import path "e". The unit is fed STRAIGHT to
|
||||
// w6c/w6c_ww: the natural empty-module dir route trips the separate
|
||||
// #11 wwi_emit bug first, and the driver cannot locate the phantom
|
||||
// package e (which is also why the corpus cannot host it -- the
|
||||
// directive owner e (which is also why the corpus cannot host it -- the
|
||||
// blanket data byte-id gate drives every non-error fixture through
|
||||
// `ww build`).
|
||||
//
|
||||
@@ -52,7 +52,6 @@ fn runcode(dir: str, name: str, argv: []str) i32 = {
|
||||
"//ww:module e\n",
|
||||
"//ww:module-reset\n",
|
||||
"package main;\n",
|
||||
"import e;\n",
|
||||
"export fn main() i32 = { return 42; };\n"));
|
||||
let scs: str = strings.concat(td, "/cs.s");
|
||||
let sww: str = strings.concat(td, "/ww.s");
|
||||
|
||||
Reference in New Issue
Block a user