test: group examples into per-category folders

Move examples/*.sx and their expected/ snapshots into per-category
subfolders (examples/<category>/...). Folder = leading filename token,
with ffi-objc/ffi-jni kept whole; filenames are unchanged. The corpus
runner and LSP sweep now discover each category's expected/ dir, while
issues/ stays flat. Example 1058's repo-root-relative companion import
is made file-relative. Path strings embedded in 164 snapshots were
regenerated (path-only changes). Test-layout docs in CLAUDE.md updated.
This commit is contained in:
agra
2026-06-21 14:41:34 +03:00
parent 6d1409bc1f
commit 66bdc70bf1
3357 changed files with 456 additions and 363 deletions

View File

@@ -0,0 +1,11 @@
// a.sx is the first-wins winner for both names. `combine` is FIXED arity;
// `pick` is VARIADIC. `from_a_*` call them bare — a authors the winner, so
// they resolve through the existing path and pack against a's own shapes.
combine :: (x: i64, y: i64) -> i64 { return x + y; }
pick :: (..xs: []i64) -> i64 {
result := 0;
for xs (it) { result = result + it; }
result
}
from_a_combine :: () -> i64 { return combine(10, 20); }
from_a_pick :: () -> i64 { return pick(1, 2, 3); }

View File

@@ -0,0 +1,12 @@
// b.sx is the SHADOW author for both names, with the OPPOSITE shapes:
// `combine` is VARIADIC, `pick` is FIXED. Each `from_b_*` bare call must pack
// against b's OWN author's signature (the F1 fix) — combine sums its variadic
// pack, pick subtracts its two fixed args.
combine :: (..xs: []i64) -> i64 {
result := 0;
for xs (it) { result = result + it; }
result
}
pick :: (a: i64, b: i64) -> i64 { return b - a; }
from_b_combine :: () -> i64 { return combine(1, 2, 3, 4); }
from_b_pick :: () -> i64 { return pick(2, 7); }