Files
ww/test/wcc/data/r809idx_slice_elem_str/case.ww
Hojun-Cho d456263f7e test/wcc/data: grow the declarative compiler corpus to 1,224 fixtures
The r-prefixed waves absorb the runtime, reject, and byte-compare rows
of the migrated native carriers; each fixture is one directory with one
case.ww and a //ww:error, //ww:compile, //ww:run, or //ww:run-exit
directive covering both frontends.
2026-08-07 23:21:04 +09:00

12 lines
681 B
Plaintext

//ww:run-exit 128
package main;
type capture = struct { content: str, start: size, start_bytesize: size, end: size, end_bytesize: size };
export fn main() i32 = {
let cs: []capture = [];
append(cs, capture { content = "a", start = 1: size, start_bytesize = 1: size, end = 1: size, end_bytesize = 1: size });
append(cs, capture { content = "b", start = 2: size, start_bytesize = 2: size, end = 2: size, end_bytesize = 2: size });
cs[1] = capture { content = "grp", start = 3: size, start_bytesize = 4: size, end = 60: size, end_bytesize = 61: size };
if (cs[0].start != 1) { return 250; };
return (cs[1].start + cs[1].start_bytesize + cs[1].end + cs[1].end_bytesize): i32;
};