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 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,4 @@
60
1 2 3 4 5
60
10 20 30

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,3 @@
42 hello true 3.140000
point: (10,20) 99
3

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
pack parse ok

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
pack type rep ok

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
pack impl match ok

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
7

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,2 @@
-1
42

View File

@@ -0,0 +1 @@
0

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
0 1 1 3 2

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
42 99

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
hello

View File

@@ -0,0 +1 @@
1

View File

@@ -0,0 +1,5 @@
error: pack index 2 out of bounds: 'args' has 1 element
--> examples/packs/0510-packs-pack-index-oob.sx:14:32
|
14 | foo :: (..$args) -> $R => args[2];
| ^

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
3

View File

@@ -0,0 +1 @@
1

View File

@@ -0,0 +1,5 @@
error: pack 'args' must be indexed by a compile-time constant — a pack is comptime-only and has no runtime value
--> examples/packs/0512-packs-pack-runtime-index.sx:18:24
|
18 | x : Any = args[i]; // ERROR: runtime index into a comptime-only pack
| ^

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
0

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,2 @@
703
900

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
42 first

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@
third 99 false

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
14

View File

@@ -0,0 +1,8 @@
i64 string bool
true false true false
inline-if folded: same
Allocator/CAllocator: true
Allocator/i64: false
Wrap(i64)/i32: true
Wrap(i64)/bool: false
Wrap(bool)/i32: false

View File

@@ -0,0 +1 @@
0

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,7 @@
i64
string
f64
got i64
got string
got bool
got other

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,4 @@
0
1
3
4

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1,3 @@
i64string
--- build done ---
rt

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,6 @@
[]
[i64]
[i64, string]
[bool, f64, string, i64]
--- build done ---
rt

View File

@@ -0,0 +1,6 @@
0: []
1: [i64]
3: [i64, string, bool]
5: [i64, f64, string, bool, i64]
--- build done ---
rt

View File

@@ -0,0 +1,4 @@
a
a/b
a/b/c/d

View File

@@ -0,0 +1,6 @@
0: len=0
1: len=1
2: len=2
4: len=4
--- build done ---
rt

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@
[i64 string bool ]

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@
42

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,3 @@
n0=0
n2=2
n3=3

View File

@@ -0,0 +1 @@
1

View File

@@ -0,0 +1,5 @@
error: pack argument of type 'Naked' does not conform to protocol 'Show'
--> examples/packs/0527-packs-pack-non-conform.sx:22:30
|
22 | print("{}\n", howmany(a, n)); // `n` does not conform to Show
| ^

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1 @@
0

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,3 @@
dog+cat=903
cat+dog=903
dog+dog=7

View File

@@ -0,0 +1,2 @@
first=11 second=hi
first=x second=99

View File

@@ -0,0 +1 @@
1

View File

@@ -0,0 +1,5 @@
error: 'v' is not part of protocol 'Box' — a pack element exposes only the protocol's interface
--> examples/packs/0530-packs-pack-interface-only.sx:16:12
|
16 | return xs[0].v; // `v` is not part of Box — error
| ^^^^^^^

View File

@@ -0,0 +1 @@

Some files were not shown because too many files have changed in this diff Show More