test: port 732_def_const_fold residue to corpus fixtures

732_def_const_fold.c -> r732_def_xmod_fold (run-exit 42; stronger than
  the carrier's DATA-row grep — links AND reads the folded cross-module
  value), r732_def_xmod_cycle (error 'def value: reference chain too
  deep', upgrading the needle-less exit!=0 check).

The five same-module exec rows and both same-module fail-loud rows were
already owned by the r732_def_* fixtures; their cs-vs-ww byte identity
rides test-data-byteid, which now also covers the xmod fold row. The
timeout-124 hang distinction devolves to the wwfixture harness timeout.
This commit is contained in:
2026-08-08 14:29:08 +09:00
parent f45360bbec
commit be852d51d9
4 changed files with 26 additions and 365 deletions

View File

@@ -0,0 +1,9 @@
//ww:error "def value: reference chain too deep"
// migrated from test/wcc/732_def_const_fold.c: cross-module def cycle (a.J -> b.K -> a.J) must fail loud, not hang or emit silently.
package a;
import b;
export def J: i32 = b.K;
package b;
import a;
export def K: i32 = a.J;
export fn main() i32 = { return 0; };

View File

@@ -0,0 +1,12 @@
//ww:run-exit 42
// migrated from test/wcc/732_def_const_fold.c: cross-module def-RHS fold (`def K = a.J + 1`) must emit the folded DATA row; run-exit links AND reads the value.
package a;
export def J: i32 = 41;
package b;
import a;
def K: i32 = a.J + 1;
export fn main() i32 = {
let k: i32 = K;
if (k == 42) { return 42; };
return 1;
};