Rename all example tests/companions to the XXXX-category-test-name scheme (per-category 100-blocks: basic 0010, types 0100, ... errors 1000, diagnostics 1100, ffi 1200, ffi-objc 1300, ffi-jni 1400, vectors 1500, platform 1600). Companions and dir/C fixtures move in lockstep with their parent test; #import/#source/#include paths rewritten to match. Expected output now lives in examples/expected/ (a sibling dir of the tests) split into three streams per the new convention: <name>.exit / <name>.stdout / <name>.stderr (+ optional <name>.ir) run_examples.sh rewritten: scans examples/ and issues/ for an expected/<name>.exit marker, captures stdout and stderr separately (no more 2>&1), compares each stream + exit + optional IR snapshot. Behavior validated unchanged: every renamed test reproduces its prior merged output + exit (diffs limited to file paths/basenames embedded in diagnostics + traces, which correctly reflect the new names). Suite: 292 passed, 0 failed. 50-smoke.sx split + issue relocation + docs follow in subsequent commits.
60 lines
1.4 KiB
Plaintext
60 lines
1.4 KiB
Plaintext
=== 1. literal == ===
|
|
s64 == s64: true
|
|
s64 == string: false
|
|
*u8 == *u8: true
|
|
?s64 == ?s64: true
|
|
?s64 == ?s32: false
|
|
=== 2. type_of(value) == T ===
|
|
type_of(a) == s64: true
|
|
type_of(b) == f64: true
|
|
type_of(s) == string: true
|
|
type_of(a) == f64: false
|
|
=== 3. Type variable storage ===
|
|
t == f64: true
|
|
t == string: false
|
|
after reassign t == string: true
|
|
t == bool: true
|
|
=== 4. type_name ===
|
|
type_name(s64): s64
|
|
type_name(*u8): *u8
|
|
type_name(Point): Point
|
|
type_name(Color): Color
|
|
type_name(t): f64
|
|
=== 5. print Type values ===
|
|
literal: s64
|
|
var: string
|
|
type_of(b): f64
|
|
=== 6. generic dispatch ===
|
|
describe(s64): int64
|
|
describe(string): text
|
|
describe(bool): boolean
|
|
describe(f64): other
|
|
=== 7. identity($T, val) ===
|
|
identity(s64, 7): 7
|
|
identity(string, hi): hi
|
|
identity(bool, true): true
|
|
=== 8. Wrap($T) ===
|
|
Wrap(s64).v: 42
|
|
Wrap(string).v: wrapped
|
|
=== 9. reflection on Type ===
|
|
size_of(s64): 8
|
|
size_of(*u8): 8
|
|
align_of(f64): 8
|
|
field_count(Point): 2
|
|
type_eq(s64, s64): true
|
|
type_eq(s64, string): false
|
|
=== 10. ..$args walking ===
|
|
type_list(): []
|
|
type_list(1): [s64]
|
|
type_list(1, "x"): [s64, string]
|
|
type_list(true, 3.14): [bool, f64]
|
|
=== 11. Type in struct field ===
|
|
h.t == s64: true
|
|
h.t == string: false
|
|
type_name(h.t): s64
|
|
=== 12. compound literals ===
|
|
type_name(*Point): *Point
|
|
type_name([4]s32): [4]s32
|
|
type_name([]bool): []bool
|
|
type_name(?f64): ?f64
|