Audit-driven migrate-and-retire wave (one read-only auditor per carrier batch, verdicts row-checked through the full corpus gate): every retired carrier's assertions are now owned by declarative fixtures or an existing owner. 238 new fixtures land (corpus 1,239 -> 1,477; cells 2,954), covering enum/str/slice/tagged array elements, inferred-length arrays, global slice/str zero-init and literals, global array/pointer field reads and stores, struct-literal slice fields, struct returns, float arithmetic, size/int limits, sort and log-vstream behavior, place-addressed stores, and append places. Rejection rows STRENGTHEN the old nonzero-exit checks to required diagnostic fragments; all byte-id claims fold into the blanket test-data-byteid sweep (now 1,142 compared, 0 pinned-divergent). Four carriers were fully redundant with existing fixtures/lang tests (749, 722, 765, and 771's byteid rows) and retire without new rows. Native carriers 171 -> 147 (residual 135 -> 111).
29 lines
945 B
Plaintext
29 lines
945 B
Plaintext
//ww:run-exit 52
|
|
package main;
|
|
type capture = struct { content: str, start: size, end: size };
|
|
type t = struct { pc: size, cap: capture };
|
|
fn setcap(ts: *[]t, i: size) void = {
|
|
(*ts)[i].cap = capture { content = "hit", start = 2, end = 4 };
|
|
};
|
|
fn clearcap(ts: *[]t, i: size) void = {
|
|
(*ts)[i].cap = capture { content = "z", ... };
|
|
};
|
|
export fn main() i32 = {
|
|
let z: capture = capture { content = "", start = 0, end = 0 };
|
|
let ts: []t = [];
|
|
append(ts, t { pc = 7, cap = z });
|
|
append(ts, t { pc = 8, cap = z });
|
|
setcap(&ts, 1);
|
|
if (ts[1].cap.content.len != 3) { return 1; };
|
|
if (ts[1].cap.start != 2) { return 2; };
|
|
if (ts[1].cap.end != 4) { return 3; };
|
|
if (ts[1].pc != 8) { return 4; };
|
|
if (ts[0].cap.content.len != 0) { return 5; };
|
|
if (ts[0].pc != 7) { return 6; };
|
|
clearcap(&ts, 1);
|
|
if (ts[1].cap.content.len != 1) { return 7; };
|
|
if (ts[1].cap.start != 0) { return 8; };
|
|
if (ts[1].cap.end != 0) { return 9; };
|
|
return 52;
|
|
};
|