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:
23
test/wcc/data/r776_dynamicfrom_alt_rw/case.ww
Normal file
23
test/wcc/data/r776_dynamicfrom_alt_rw/case.ww
Normal file
@@ -0,0 +1,23 @@
|
||||
//ww:run-exit 44
|
||||
// Migrated from 776_memio_vstream_run row dynamicfrom_alt_rw.
|
||||
package main;
|
||||
import memio;
|
||||
import io;
|
||||
import os;
|
||||
export fn main() i32 = {
|
||||
let seed: [4]u8;
|
||||
seed[0] = 1u8; seed[1] = 2u8; seed[2] = 3u8; seed[3] = 4u8;
|
||||
let st: memio.stream = memio.dynamicfrom(seed[0:4]);
|
||||
let s: io.stream = &st.vt;
|
||||
let out: [4]u8;
|
||||
let rd = io.read(s, out[0:4]);
|
||||
let rn: size = 0;
|
||||
if (rd is size) { rn = rd as size; };
|
||||
let extra: [2]u8;
|
||||
extra[0] = 99u8; extra[1] = 100u8;
|
||||
let wr = io.write(s, extra[0:2]);
|
||||
let wn: size = 0;
|
||||
if (wr is size) { wn = wr as size; };
|
||||
if (rn == 4: size && wn == 2: size && out[0] == 1u8 && out[3] == 4u8) { return 44; };
|
||||
return 99;
|
||||
};
|
||||
Reference in New Issue
Block a user