Files
ww/test/wcc/data/r805_compound_narrow/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

27 lines
913 B
Plaintext

//ww:run-exit 49
package main;
type t = struct { a: i8, b: u8, c: i16, d: u16, e: i32, f: u32 };
fn adda(ts: *[]t, i: size) void = { (*ts)[i].a += 1i8; };
fn addb(ts: *[]t, i: size) void = { (*ts)[i].b += 200u8; };
fn subc(ts: *[]t, i: size) void = { (*ts)[i].c -= 300i16; };
fn shld(ts: *[]t, i: size) void = { (*ts)[i].d <<= 3u16; };
fn mule(ts: *[]t, i: size) void = { (*ts)[i].e *= -3i32; };
fn orf(ts: *[]t, i: size) void = { (*ts)[i].f |= 8u32; };
export fn main() i32 = {
let ts: []t = [];
append(ts, t { a = -5i8, b = 50u8, c = 100i16, d = 2u16, e = 7i32, f = 5u32 });
adda(&ts, 0);
if (ts[0].a != -4i8) { return 1; };
addb(&ts, 0);
if (ts[0].b != 250u8) { return 2; };
subc(&ts, 0);
if (ts[0].c != -200i16) { return 3; };
shld(&ts, 0);
if (ts[0].d != 16u16) { return 4; };
mule(&ts, 0);
if (ts[0].e != -21i32) { return 5; };
orf(&ts, 0);
if (ts[0].f != 13u32) { return 6; };
return 49;
};