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,18 @@
// issue 0105 / F2 / R1 — same-name const EXPRESSION CHAIN, coherent across a
// value read AND an array dimension. Two flat-imported modules each declare a
// same-name `M` and a same-name `K :: M + 1` that reads `M`. Each module uses
// ITS OWN `K` both as a runtime value (`return K`) and as an array dimension
// (`[K]u8`).
//
// The fold of a SELECTED const's RHS must resolve nested same-name leaves (the
// `M` inside `K :: M + 1`) in the SELECTED author's source context, not through
// the global last-wins `module_const_map`. Both observables agree per module:
// a_len=2 a_val=2, b_len=11 b_val=11.
#import "modules/std.sx";
#import "0788-modules-same-name-const-expr-chain-dim/a.sx";
#import "0788-modules-same-name-const-expr-chain-dim/b.sx";
main :: () -> i32 {
print("a_len={} a_val={} b_len={} b_val={}\n", a_len(), a_val(), b_len(), b_val());
0
}