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:
1
examples/packs/expected/0500-packs-varargs.exit
Normal file
1
examples/packs/expected/0500-packs-varargs.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/packs/expected/0500-packs-varargs.stderr
Normal file
1
examples/packs/expected/0500-packs-varargs.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
4
examples/packs/expected/0500-packs-varargs.stdout
Normal file
4
examples/packs/expected/0500-packs-varargs.stdout
Normal file
@@ -0,0 +1,4 @@
|
||||
60
|
||||
1 2 3 4 5
|
||||
60
|
||||
10 20 30
|
||||
1
examples/packs/expected/0501-packs-any-varargs.exit
Normal file
1
examples/packs/expected/0501-packs-any-varargs.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/packs/expected/0501-packs-any-varargs.stderr
Normal file
1
examples/packs/expected/0501-packs-any-varargs.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
3
examples/packs/expected/0501-packs-any-varargs.stdout
Normal file
3
examples/packs/expected/0501-packs-any-varargs.stdout
Normal file
@@ -0,0 +1,3 @@
|
||||
42 hello true 3.140000
|
||||
point: (10,20) 99
|
||||
3
|
||||
1
examples/packs/expected/0502-packs-pack-parse.exit
Normal file
1
examples/packs/expected/0502-packs-pack-parse.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/packs/expected/0502-packs-pack-parse.stderr
Normal file
1
examples/packs/expected/0502-packs-pack-parse.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/packs/expected/0502-packs-pack-parse.stdout
Normal file
1
examples/packs/expected/0502-packs-pack-parse.stdout
Normal file
@@ -0,0 +1 @@
|
||||
pack parse ok
|
||||
1
examples/packs/expected/0503-packs-pack-type-rep.exit
Normal file
1
examples/packs/expected/0503-packs-pack-type-rep.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/packs/expected/0503-packs-pack-type-rep.stderr
Normal file
1
examples/packs/expected/0503-packs-pack-type-rep.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/packs/expected/0503-packs-pack-type-rep.stdout
Normal file
1
examples/packs/expected/0503-packs-pack-type-rep.stdout
Normal file
@@ -0,0 +1 @@
|
||||
pack type rep ok
|
||||
1
examples/packs/expected/0504-packs-pack-impl-match.exit
Normal file
1
examples/packs/expected/0504-packs-pack-impl-match.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
pack impl match ok
|
||||
1
examples/packs/expected/0505-packs-pack-typed-index.exit
Normal file
1
examples/packs/expected/0505-packs-pack-typed-index.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
7
|
||||
1
examples/packs/expected/0506-packs-pack-if-return.exit
Normal file
1
examples/packs/expected/0506-packs-pack-if-return.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/packs/expected/0506-packs-pack-if-return.stderr
Normal file
1
examples/packs/expected/0506-packs-pack-if-return.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
2
examples/packs/expected/0506-packs-pack-if-return.stdout
Normal file
2
examples/packs/expected/0506-packs-pack-if-return.stdout
Normal file
@@ -0,0 +1,2 @@
|
||||
-1
|
||||
42
|
||||
1
examples/packs/expected/0507-packs-pack-mono-dedup.exit
Normal file
1
examples/packs/expected/0507-packs-pack-mono-dedup.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
16133
examples/packs/expected/0507-packs-pack-mono-dedup.ir
Normal file
16133
examples/packs/expected/0507-packs-pack-mono-dedup.ir
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0 1 1 3 2
|
||||
1
examples/packs/expected/0508-packs-pack-generic-ret.exit
Normal file
1
examples/packs/expected/0508-packs-pack-generic-ret.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
42 99
|
||||
1
examples/packs/expected/0509-packs-pack-hetero-ret.exit
Normal file
1
examples/packs/expected/0509-packs-pack-hetero-ret.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
hello
|
||||
1
examples/packs/expected/0510-packs-pack-index-oob.exit
Normal file
1
examples/packs/expected/0510-packs-pack-index-oob.exit
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
5
examples/packs/expected/0510-packs-pack-index-oob.stderr
Normal file
5
examples/packs/expected/0510-packs-pack-index-oob.stderr
Normal 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];
|
||||
| ^
|
||||
1
examples/packs/expected/0510-packs-pack-index-oob.stdout
Normal file
1
examples/packs/expected/0510-packs-pack-index-oob.stdout
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/packs/expected/0511-packs-pack-bare-args.exit
Normal file
1
examples/packs/expected/0511-packs-pack-bare-args.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/packs/expected/0511-packs-pack-bare-args.stderr
Normal file
1
examples/packs/expected/0511-packs-pack-bare-args.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
1
examples/packs/expected/0511-packs-pack-bare-args.stdout
Normal file
1
examples/packs/expected/0511-packs-pack-bare-args.stdout
Normal file
@@ -0,0 +1 @@
|
||||
3
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -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
|
||||
| ^
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
15955
examples/packs/expected/0513-packs-pack-mixed-comptime.ir
Normal file
15955
examples/packs/expected/0513-packs-pack-mixed-comptime.ir
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
703
|
||||
900
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
42 first
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
third 99 false
|
||||
1
examples/packs/expected/0516-packs-pack-type-fnptr.exit
Normal file
1
examples/packs/expected/0516-packs-pack-type-fnptr.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
14
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
16111
examples/packs/expected/0518-packs-pack-value-dispatch.ir
Normal file
16111
examples/packs/expected/0518-packs-pack-value-dispatch.ir
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
i64
|
||||
string
|
||||
f64
|
||||
got i64
|
||||
got string
|
||||
got bool
|
||||
got other
|
||||
1
examples/packs/expected/0519-packs-pack-bare-value.exit
Normal file
1
examples/packs/expected/0519-packs-pack-bare-value.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
0
|
||||
1
|
||||
3
|
||||
4
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
i64string
|
||||
--- build done ---
|
||||
rt
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[]
|
||||
[i64]
|
||||
[i64, string]
|
||||
[bool, f64, string, i64]
|
||||
--- build done ---
|
||||
rt
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
0: []
|
||||
1: [i64]
|
||||
3: [i64, string, bool]
|
||||
5: [i64, f64, string, bool, i64]
|
||||
--- build done ---
|
||||
rt
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
|
||||
a
|
||||
a/b
|
||||
a/b/c/d
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
0: len=0
|
||||
1: len=1
|
||||
2: len=2
|
||||
4: len=4
|
||||
--- build done ---
|
||||
rt
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
[i64 string bool ]
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
42
|
||||
1
examples/packs/expected/0526-packs-protocol-pack.exit
Normal file
1
examples/packs/expected/0526-packs-protocol-pack.exit
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
1
examples/packs/expected/0526-packs-protocol-pack.stderr
Normal file
1
examples/packs/expected/0526-packs-protocol-pack.stderr
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
3
examples/packs/expected/0526-packs-protocol-pack.stdout
Normal file
3
examples/packs/expected/0526-packs-protocol-pack.stdout
Normal file
@@ -0,0 +1,3 @@
|
||||
n0=0
|
||||
n2=2
|
||||
n3=3
|
||||
1
examples/packs/expected/0527-packs-pack-non-conform.exit
Normal file
1
examples/packs/expected/0527-packs-pack-non-conform.exit
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -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
|
||||
| ^
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
16816
examples/packs/expected/0528-packs-protocol-pack-methods.ir
Normal file
16816
examples/packs/expected/0528-packs-protocol-pack-methods.ir
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
dog+cat=903
|
||||
cat+dog=903
|
||||
dog+dog=7
|
||||
@@ -0,0 +1 @@
|
||||
0
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
first=11 second=hi
|
||||
first=x second=99
|
||||
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -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
|
||||
| ^^^^^^^
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user