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.
This commit is contained in:
13
test/wcc/data/r809idx_fieldplace_slice/case.ww
Normal file
13
test/wcc/data/r809idx_fieldplace_slice/case.ww
Normal file
@@ -0,0 +1,13 @@
|
||||
//ww:run-exit 128
|
||||
package main;
|
||||
type capture = struct { content: str, start: size, start_bytesize: size, end: size, end_bytesize: size };
|
||||
type thr = struct { pc: size, caps: []capture };
|
||||
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 });
|
||||
let ts: []thr = []; append(ts, thr { pc = 5: size, caps = cs });
|
||||
ts[0].caps[1] = capture { content = "grp", start = 3: size, start_bytesize = 4: size, end = 60: size, end_bytesize = 61: size };
|
||||
if (ts[0].caps[0].start != 1) { return 250; };
|
||||
return (ts[0].caps[1].start + ts[0].caps[1].start_bytesize + ts[0].caps[1].end + ts[0].caps[1].end_bytesize): i32;
|
||||
};
|
||||
Reference in New Issue
Block a user