Files
ww/test/wcc/data/r805_c4_range_byvalue/case.ww
Hojun-Cho f6628b985e test: migrate 24 residual carriers into the fixture corpus
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).
2026-08-08 01:29:15 +09:00

35 lines
872 B
Plaintext

//ww:run-exit 73
package main;
type th = struct { pc: size, weight: size };
type capture = struct { content: str, start: size, end: size };
export fn main() i32 = {
let xs: []th = [];
append(xs, th { pc = 7, weight = 100 });
append(xs, th { pc = 8, weight = 200 });
let total: size = 0;
for (let t .. xs) {
total += t.pc;
total += t.weight;
};
if (total != 315) { return 1; };
let cs: []capture = [];
append(cs, capture { content = "abc", start = 11, end = 13 });
append(cs, capture { content = "wy", start = 21, end = 23 });
let csum: size = 0;
for (let cp .. cs) {
csum += cp.content.len: size;
csum += cp.start;
csum += cp.end;
};
if (csum != 73) { return 2; };
let ss: []str = [];
append(ss, "hello");
append(ss, "worldly");
let slen: size = 0;
for (let s .. ss) {
slen += s.len: size;
};
if (slen != 12) { return 3; };
return 73;
};