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:
20
examples/0810-memory-slice-ptr.sx
Normal file
20
examples/0810-memory-slice-ptr.sx
Normal file
@@ -0,0 +1,20 @@
|
||||
#import "modules/std.sx";
|
||||
#import "modules/math/math.sx";
|
||||
#import "modules/compiler.sx";
|
||||
#import "modules/test.sx";
|
||||
pkg :: #import "modules/testpkg";
|
||||
|
||||
main :: () {
|
||||
|
||||
// ========================================================
|
||||
// 17. SLICE/ARRAY .ptr ACCESS
|
||||
// ========================================================
|
||||
print("=== 17. Slice Ptr ===\n");
|
||||
{
|
||||
sarr : [5]s32 = .[10, 20, 30, 40, 50];
|
||||
ssl := sarr[1..4];
|
||||
sp := ssl.ptr;
|
||||
print("sl-ptr[0]: {}\n", sp[0]);
|
||||
print("sl-ptr[1]: {}\n", sp[1]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user