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.
16 lines
600 B
Plaintext
16 lines
600 B
Plaintext
//ww:run-exit 15
|
|
package main;
|
|
type option = struct { flag: rune, value: str };
|
|
export fn main() i32 = {
|
|
let opts: []option = [];
|
|
append(opts, option { flag = 'a', value = "v0" });
|
|
append(opts, option { flag = 'b', value = "v1" });
|
|
append(opts, option { flag = 'c', value = "v2" });
|
|
append(opts, option { flag = 'd', value = "v3" });
|
|
append(opts, option { flag = 'e', value = "v4" });
|
|
append(opts, option { flag = 'f', value = "v5" });
|
|
append(opts, option { flag = 'g', value = "v6" });
|
|
append(opts, option { flag = 'h', value = "seventh" });
|
|
return (opts[7].value.len + opts.len): i32;
|
|
};
|