test: remove package-wide import assumptions
This commit is contained in:
@@ -18,12 +18,10 @@ package sepimport_test;
|
||||
// emitting a bare `TEXT main` that collides with the root entry;
|
||||
// EXACTLY one column-0 `TEXT main,` across the whole sep build.
|
||||
//
|
||||
// declns (#23/#30 modfn leg) — a value-namespace `fn aa` coexists
|
||||
// with an imported MODULE aa (exit 6 = aa() + aa.helper()); the _vbu
|
||||
// layout flips decl order and must stay byte-identical on
|
||||
// {aa.s,aa.wwi,__root.s} (silent order-dependence in the SK_USE/value
|
||||
// promote is the regression); __root.s carries BOTH
|
||||
// `CALL aa.helper(SB)` and `CALL main.aa(SB)`.
|
||||
// declns (#23/#30 modfn leg) — a distinct local `fn localaa` and the
|
||||
// file-scoped imported qualifier aa both resolve (exit 6 = localaa() +
|
||||
// aa.helper()); the _vbu layout flips declaration/import order and must stay
|
||||
// byte-identical on {aa.s,aa.wwi,__root.s}; __root.s carries both calls.
|
||||
//
|
||||
// slttypepref (#58/#50 c1) — scopelookuptype must prefer the current
|
||||
// module's SK_TYPE when a param shadows a type leaf two modules both
|
||||
@@ -204,7 +202,7 @@ fn depmainrow(label: str, entry: str, want: i32, deps: str,
|
||||
if (runcode(td, strings.concat("r_", labs[l], "_", tags[s]),
|
||||
rav) != 6) {
|
||||
fail(labs[l], strings.concat(drvs[s],
|
||||
" exit != 6 (coexistence mis-resolved)"));
|
||||
" exit != 6 (qualified/local resolution failed)"));
|
||||
};
|
||||
s += 1;
|
||||
};
|
||||
@@ -264,9 +262,9 @@ fn depmainrow(label: str, entry: str, want: i32, deps: str,
|
||||
fail("declns", strings.concat("__root.s (", tags[t2],
|
||||
") lacks module-qualified `CALL aa.helper(SB)`"));
|
||||
};
|
||||
if (!testenv.has(rs, "CALL\tmain.aa(SB)")) {
|
||||
if (!testenv.has(rs, "CALL\tmain.localaa(SB)")) {
|
||||
fail("declns", strings.concat("__root.s (", tags[t2],
|
||||
") lacks local-fn `CALL main.aa(SB)`"));
|
||||
") lacks local-fn `CALL main.localaa(SB)`"));
|
||||
};
|
||||
t2 += 1;
|
||||
};
|
||||
@@ -287,11 +285,13 @@ fn sltbuild(drv: str, param: str) i32 = {
|
||||
"import xa;\n",
|
||||
"export type invalid = !i64;\n",
|
||||
"export fn f(", param,
|
||||
": i32) i64 = { return size(invalid): i64; };\n"));
|
||||
": i32) i64 = {\n",
|
||||
"\tlet foreign: i64 = size(xa.invalid): i64;\n",
|
||||
"\treturn (size(invalid): i64) + foreign - foreign;\n",
|
||||
"};\n"));
|
||||
testenv.writefile(strings.concat(dir, "/root.ww"), strings.concat(
|
||||
"package main;\n",
|
||||
"import xb;\n",
|
||||
"import xa;\n",
|
||||
"fn main() int = { return xb.f(0): int; };\n"));
|
||||
let bav: []str = [testenv.driver(drv), "build", "root.ww"];
|
||||
let brc: i32 = runcode(dir, "build", bav);
|
||||
|
||||
Reference in New Issue
Block a user