test: split 50-smoke.sx into per-section examples + add errors smoke

Break the monolithic examples/50-smoke.sx into 30 focused per-section examples,
filed into their category blocks (basic/types/comptime/memory/protocols/ffi),
each carrying only the top-level decls its section references (the protocols
section keeps the full preamble — its deps flow through UFCS method calls that
name-based extraction can't see). Outputs verified identical to the original
section blocks.

Add examples/1036-errors-failable-smoke.sx — an end-to-end error-handling example
(the E5.4 work): named + inferred error sets consumed via destructure, try (in
helpers), catch (bare-expr / match-body / diverging / no-binding), or
value-terminator, onfail+defer interleave, and error.X value + {} tag
interpolation.

Remove examples/50-smoke.sx. Suite: 324 passed, 0 failed.
This commit is contained in:
agra
2026-06-01 19:34:21 +03:00
parent ba3c094283
commit e12f817e52
125 changed files with 4667 additions and 3214 deletions

View File

@@ -0,0 +1,24 @@
#import "modules/std.sx";
#import "modules/math/math.sx";
#import "modules/compiler.sx";
#import "modules/test.sx";
pkg :: #import "modules/testpkg";
main :: () {
// ========================================================
// 25. ARRAY LOOP MUTATION
// ========================================================
print("=== 25. Array Loop Mutation ===\n");
{
arr : [4]s32 = .[0, 0, 0, 0];
i := 0;
while i < 4 {
arr[i] = xx (i + 1);
i += 1;
}
print("loop-fill: {} {} {} {}\n", arr[0], arr[1], arr[2], arr[3]);
arr[2] += 10;
print("compound: {}\n", arr[2]);
}
}