test/lang: absorb retired-carrier coverage
local_zeroinit_test.ww takes the 840/944 zero-init seam (dirty-frame prime and probe share one @test because the runtime forks per test); alias_cgen_b6, alloc_nested_field, array_static_init, and strarray_static gain the rows their retired wrappers held; the remaining files re-point reject-row citations at the r788_* and stage-matrix fixtures.
This commit is contained in:
@@ -9,12 +9,11 @@
|
||||
// helper in DST_PTR_SP mode (base reloaded from the pushed heap ptr at
|
||||
// (SP)), which recurses to arbitrary depth.
|
||||
//
|
||||
// Every row reads the heap struct back via `let o: T = *p` (a whole-
|
||||
// struct deref-load to a BP-rel local) so the assertions never traverse
|
||||
// the chained-dot-through-heap-ptr read path (a separate pre-existing
|
||||
// cs!=ww the C7c fill fix does not touch). Each row asserts the nested
|
||||
// leaf VALUE (reddens when the fix is reverted: the dropped leaf reads
|
||||
// 0) AND the sibling scalar leaves before/after it (no clobber).
|
||||
// The nested-field rows read the heap struct back via `let o: T = *p` so
|
||||
// they isolate heap filling from chained pointer traversal. The alias-head and
|
||||
// exact direct control both read p.x/p.y: together they preserve the old #26
|
||||
// wrapper's alias-vs-non-alias comparison. Every row asserts the affected
|
||||
// values independently.
|
||||
|
||||
package alloc_nested_field_test;
|
||||
|
||||
@@ -28,6 +27,21 @@ type WithArr = struct { lead: i64, arr: [3]i64, trail: i64 };
|
||||
|
||||
type TwoNest = struct { head: i64, s: Inner, arr: [2]i64, tail: i64 };
|
||||
|
||||
type AliasPoint = struct { x: i64, y: i64 };
|
||||
type AliasPt = AliasPoint;
|
||||
|
||||
@test fn alias_named_struct() void = {
|
||||
let p: *AliasPt = alloc(AliasPt{ x = 1, y = 2 })!;
|
||||
assert(p.x == 1);
|
||||
assert(p.y == 2);
|
||||
};
|
||||
|
||||
@test fn direct_named_struct_control() void = {
|
||||
let p: *AliasPoint = alloc(AliasPoint{ x = 1, y = 2 })!;
|
||||
assert(p.x == 1);
|
||||
assert(p.y == 2);
|
||||
};
|
||||
|
||||
@test fn depth1_nested_struct() void = {
|
||||
// Inner{q=10} is the field VALUE of x; pre-fix x.q dropped to 0.
|
||||
let p = alloc(Outer{ x = Inner{ q = 10 }, y = 5 })!;
|
||||
|
||||
Reference in New Issue
Block a user